Jump to content

Recommended Posts

Imagnius
Posted

I wasn't able to find an answer to this, so I hope I'm not duplicating anything.

I had two folders: one with "Films", and one with "Requested films." (and the same for Series, but the principle remains the same).

I wanted to view requested movies in their own library, but at the same time I want to have all requested films also in the "Films" Library.
That way, I can check in "Requests" what films are available after having been requested, but when browsing for a film to watch I can just go into "Films" and see every movie available. If that makes sense..

I figured I'd move all requested movies in the "Films" folder, having tagged them with "request", and filter that way. However, this virtual library thing is still being developed, I'm guessing.
Searching by keyword/tag isn't practical as every single keyword shows up, and even when I select "request" I get a horizontal list of movies rather than the normal top-down view.

What I did next was split the movies again. Films in their own folder, Requested films in their own folder because I figured I can have a "Requested" library with just requests, and a "Films" library with both the "Films" and "Requests" folder attributed to that all-in-one library. 

Wrong.

When I want to add the "Requests" folder as a second source to the "Films" library, I get: "There was an error adding the media path. Please ensure the path is valid and the Emby Server process has access to that location."

I really don't want to have to switch to a different program, especially since I paid for Emby premium, but is there any way I can get this sorted? Or is the only solution to wait for the virtual libraries? If so, when will that become reality? What version, when is it scheduled to be released?

Posted
Quote

When I want to add the "Requests" folder as a second source to the "Films" library, I get: "There was an error adding the media path. Please ensure the path is valid and the Emby Server process has access to that location."

Hi, please attach the emby server log from when the problem occurred:

Thanks.

Posted

HI, generally speaking with overlapping paths into multiple libraries, it will only work if the content types of the libraries are all the same. Additionally, you may want to use the 4.9 beta channel as there are fixes related to overlapping paths with mulitple libraries, although it's not necessarily going to correct a problem that might have already been created in 4.8.

Imagnius
Posted

You're not going to believe this, but when I went back in to check if the content types were the same, the requests folder was added to the library twice:

image.png.1c51b5a7f550d13a25a2bbe89d9c3863.png

 

When I removed one of the requests folders, I got a mysql error and both folders disappeared, leaving me with "Films" once more.
I again added a "requests" folder, got an error message, refreshed the page and I now have 2 folders in this library. I browsed the "Films" to ensure I can also see requested films in there, and I can.

Not quite sure why this works despite the errors, but I'm going to mark this now as solved..
Thanks for your time anyway. 

Still looking forward to virtual libraries though, but at least now it's not that urgent. :) 

Imagnius
Posted (edited)

I was a bit too hasty in marking it as solution, I think.. 
Just simply looked at the numbers in "Films" and in "Requests", and both show up with the same numbers within Emby.
So: Number of films = 55, number of requests also shows 55.
I would have expected films to be x + number of requests, so at least more than 55.

I'm going to let it carry on scanning for now, and I'll check again tomorrow.. 🤞

 

 

Edited by Imagnius
*edited for clarity. I hope.
Posted

Are there still sql errors in the log?

Imagnius
Posted

Unfortunately, yes:

2025-03-19 22:00:28.189 Error SqliteItemRepository: Error saving items
    *** Error Report ***
    Version: 4.8.11.0
    Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology72_{version}_x86_64.spk -noautorunwebapp
    Operating system: Linux version 4.4.302+ (root@build6) (gcc version 12.2.0 (GCC) ) #72806 SMP Thu Sep 5 13:41:01 CST 2024
    Framework: .NET 6.0.36
    OS/Process: x64/x64
    Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
    Processor count: 4
    Data path: /var/packages/EmbyServer/var
    Application path: /volume1/@appstore/EmbyServer/system
    SQLitePCL.pretty.SQLiteException: Constraint: FOREIGN KEY constraint failed
    SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
       at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
       at SQLitePCL.pretty.StatementImpl.MoveNext()
       at SQLitePCL.pretty.DatabaseConnection.Execute(IDatabaseConnection This, String sql)
       at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTranscation(IDatabaseConnection db, List`1 tuples, MetadataRefreshOptions metadataRefreshOptions)
       at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, MetadataRefreshOptions metadataRefreshOptions, Action`1 afterSave, Boolean disableForeignKeys, CancellationToken cancellationToken)
    Source: SQLitePCL.pretty
    TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)
    
2025-03-19 22:00:28.195 Error Server: Error processing request
    *** Error Report ***
    Version: 4.8.11.0
    Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology72_{version}_x86_64.spk -noautorunwebapp
    Operating system: Linux version 4.4.302+ (root@build6) (gcc version 12.2.0 (GCC) ) #72806 SMP Thu Sep 5 13:41:01 CST 2024
    Framework: .NET 6.0.36
    OS/Process: x64/x64
    Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
    Processor count: 4
    Data path: /var/packages/EmbyServer/var
    Application path: /volume1/@appstore/EmbyServer/system
    SQLitePCL.pretty.SQLiteException: Constraint: FOREIGN KEY constraint failed
    SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
       at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
       at SQLitePCL.pretty.StatementImpl.MoveNext()
       at SQLitePCL.pretty.DatabaseConnection.Execute(IDatabaseConnection This, String sql)
       at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTranscation(IDatabaseConnection db, List`1 tuples, MetadataRefreshOptions metadataRefreshOptions)
       at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, MetadataRefreshOptions metadataRefreshOptions, Action`1 afterSave, Boolean disableForeignKeys, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, MetadataRefreshOptions metadataRefreshOptions, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Library.LibraryManager.UpdateItems(List`1 items, BaseItem parent, ItemUpdateType updateReason, Boolean setDateLastSaved, Boolean saveMetadata, MetadataRefreshOptions metadataRefreshOptions, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Library.LibraryManager.UpdateItem(BaseItem item, BaseItem parent, ItemUpdateType updateReason, MetadataRefreshOptions metadataRefreshOptions)
       at MediaBrowser.Controller.Entities.BaseItem.UpdateToRepository(ItemUpdateType updateReason)
       at Emby.Server.Implementations.Library.LibraryManager.AddPhysicalFolderId(CollectionFolder item, BaseItem child)
       at Emby.Server.Implementations.Library.LibraryManager.AddMediaPathInternal(CollectionFolder item, MediaPathInfo mediaPathInfo, FileSystemMetadata pathInfo, Folder physicalParent)
       at Emby.Server.Implementations.Library.LibraryManager.AddMediaPaths(CollectionFolder item, MediaPathInfo[] pathInfos, Boolean refreshLibrary)
       at Emby.Api.Library.LibraryStructureService.Post(AddMediaPath request)
       at Emby.Server.Implementations.Services.ServiceController.<>c__DisplayClass8_0.<VoidActionDelegate>b__0(Object service, Object request)
       at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req, Type serviceType)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IServerApplicationHost appHost, IRequest httpReq, IResponse httpRes, IStreamHelper streamHelper, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: SQLitePCL.pretty
    TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)
    

Today as well:

 

2025-03-20 15:12:00.238 Error SqliteItemRepository: Error saving items
    *** Error Report ***
    Version: 4.8.11.0
    Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology72_{version}_x86_64.spk -noautorunwebapp
    Operating system: Linux version 4.4.302+ (root@build6) (gcc version 12.2.0 (GCC) ) #72806 SMP Thu Sep 5 13:41:01 CST 2024
    Framework: .NET 6.0.36
    OS/Process: x64/x64
    Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
    Processor count: 4
    Data path: /var/packages/EmbyServer/var
    Application path: /volume1/@appstore/EmbyServer/system
    SQLitePCL.pretty.SQLiteException: Constraint: FOREIGN KEY constraint failed
    SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
       at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
       at SQLitePCL.pretty.StatementImpl.MoveNext()
       at SQLitePCL.pretty.DatabaseConnection.Execute(IDatabaseConnection This, String sql)
       at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTranscation(IDatabaseConnection db, List`1 tuples, MetadataRefreshOptions metadataRefreshOptions)
       at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, MetadataRefreshOptions metadataRefreshOptions, Action`1 afterSave, Boolean disableForeignKeys, CancellationToken cancellationToken)
    Source: SQLitePCL.pretty
    TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)
    
2025-03-20 15:12:00.239 Error App: Error refreshing metadata for library Series 44990
    *** Error Report ***
    Version: 4.8.11.0
    Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology72_{version}_x86_64.spk -noautorunwebapp
    Operating system: Linux version 4.4.302+ (root@build6) (gcc version 12.2.0 (GCC) ) #72806 SMP Thu Sep 5 13:41:01 CST 2024
    Framework: .NET 6.0.36
    OS/Process: x64/x64
    Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
    Processor count: 4
    Data path: /var/packages/EmbyServer/var
    Application path: /volume1/@appstore/EmbyServer/system
    SQLitePCL.pretty.SQLiteException: Constraint: FOREIGN KEY constraint failed
    SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
       at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
       at SQLitePCL.pretty.StatementImpl.MoveNext()
       at SQLitePCL.pretty.DatabaseConnection.Execute(IDatabaseConnection This, String sql)
       at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTranscation(IDatabaseConnection db, List`1 tuples, MetadataRefreshOptions metadataRefreshOptions)
       at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, MetadataRefreshOptions metadataRefreshOptions, Action`1 afterSave, Boolean disableForeignKeys, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, MetadataRefreshOptions metadataRefreshOptions, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Library.LibraryManager.UpdateItems(List`1 items, BaseItem parent, ItemUpdateType updateReason, Boolean setDateLastSaved, Boolean saveMetadata, MetadataRefreshOptions metadataRefreshOptions, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Library.LibraryManager.UpdateItem(BaseItem item, BaseItem parent, ItemUpdateType updateReason, MetadataRefreshOptions metadataRefreshOptions)
       at Emby.Providers.Manager.MetadataService`2.SaveItem(MetadataResult`1 result, Boolean isFirstRefresh, LibraryOptions libraryOptions, ItemUpdateType reason, IDirectoryService directoryService, MetadataRefreshOptions metadataRefreshOptions, CancellationToken cancellationToken)
       at Emby.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, BaseItem[] collectionFolders, LibraryOptions libraryOptions, CancellationToken cancellationToken)
       at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, BaseItem[] collectionFolders, LibraryOptions libraryOptions, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Library.LibraryManager.ValidateTopLibraryFolders(IDirectoryService directoryService, CancellationToken cancellationToken)
    Source: SQLitePCL.pretty
    TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

 

 

 

Posted

OK, are you willing to make a fresh start? You could do this with the 4.9 beta channel, or on 4.8 as long as the use of overlapping folders is kept to a minimum.

Imagnius
Posted

If you mean a fresh start as in removing the existing libraries and creating new ones, yes. 
I was considering that already, tbh.

I hope you don't mean having to recreate all users. Will I lose all 'watched'/'progress' information?

Posted

You could try removing all libraries, then completing a scan of all libraries to clean out the database, and then see if that is enough. You shouldn’t lose watch data if that is successful.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...