Search the Community
Showing results for tags 'sqlite3'.
-
I tried to change the Content Type of an existing library on Emby server installed on Synology. I followed the guide here: https://emby.media/community/index.php?/topic/99927-how-to-change-the-content-type-for-a-library/, but Synology stores libraries in an SQL database, so the process is not as straightforward. Therefore, I’m sharing the procedure that worked for me. I hope that it hepls someone. - Turn off the Emby server - Connect to NAS by SSH - Navigate to the directory: cd /var/packages/EmbyServer/var/data - Set correct permissions: sudo chmod 664 library.db sudo chmod 775 /var/packages/EmbyServer/var/data/ - Create a backup of the database: cp library.db library.db.bak - Open the database tool: sudo sqlite3 library.db - List the tables: .tables - Libraries are stored in the table `MediaItems`. - Get the column names for the library table: PRAGMA table_info(MediaItems); - Select data based on the name of the desired library (focus on entries with an existing `Path`): SELECT Id, Name, Path FROM MediaItems WHERE Name = 'LIBRARY_NAME'; - From the selected record, take the ID. - Select additional settings for the library based on the ID: SELECT * FROM ItemExtradata WHERE ItemId = ID; - It will show that one column contains JSON data with settings, including the `ContentType` value. - Valid `ContentType` values: - Audio books: `"ContentType":"audiobooks"` - Camera Uploads: `"ContentType":"homevideos"` - Collections: `"ContentType":"boxsets"` - Home videos & photos: `"ContentType":"homevideos"` - Movies: `"ContentType":"movies"` - Music: `"ContentType":"music"` - Music Videos: `"ContentType":"musicvideos"` - Playlists: `"ContentType":"playlists"` - TV shows: `"ContentType":"tvshows"` - Mixed content: `EMPTY` (no `ContentType` key) - Update the `ContentType` to Mixed content (original value is `ORIGINAL_CONTENT_TYPE`): UPDATE ItemExtradata SET Value = REPLACE(Value, '"ContentType":"ORIGINAL_CONTENT_TYPE",', '') WHERE ItemId = ID; - Alternatively, update `ContentType` to a new value (`NEW_CONTENT_TYPE`) (original value is `ORIGINAL_CONTENT_TYPE`): UPDATE ItemExtradata SET Value = REPLACE(Value, '"ContentType":"ORIGINAL_CONTENT_TYPE"', '"ContentType":"NEW_CONTENT_TYPE"') WHERE ItemId = ID; - Exit the database tool: .exit - Delete the database backup: sudo rm library.db.bak - Start the Emby server - Run the "Scan media library" task
-
Hello, my MediaBrowserServer is no longer starting and gives the following error: One or more errors occurred System.AggregateException at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) [0x00000] in <filename unknown>:0 at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) [0x00000] in <filename unknown>:0 at MediaBrowser.Server.Mono.MainClass.RunApplication (MediaBrowser.Server.Implementations.ServerApplicationPaths appPaths, ILogManager logManager, MediaBrowser.Server.Startup.Common.StartupOptions options) [0x00000] in <filename unknown>:0 at MediaBrowser.Server.Mono.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 InnerException: System.DllNotFoundException libsqlite3.so.0 libsqlite3.so.0 at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods:sqlite3_libversion () at System.Data.SQLite.SQLite3.get_SQLiteVersion () [0x00000] in <filename unknown>:0 at System.Data.SQLite.SQLiteConnection.get_SQLiteVersion () [0x00000] in <filename unknown>:0 at MediaBrowser.Server.Implementations.Persistence.SqliteExtensions+<ConnectToDb>c__async0.MoveNext () [0x00000] in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Data.IDbConnection].GetResult () [0x00000] in <filename unknown>:0 at MediaBrowser.Server.Implementations.Persistence.SqliteUserRepository+<Initialize>c__async0.MoveNext () [0x00000] in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0 at MediaBrowser.Server.Startup.Common.ApplicationHost+<GetUserRepository>c__async4.MoveNext () [0x00000] in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Controller.Persistence.IUserRepository].GetResult () [0x00000] in <filename unknown>:0 at MediaBrowser.Server.Startup.Common.ApplicationHost+<RegisterResources>c__async2.MoveNext () [0x00000] in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0 at MediaBrowser.Common.Implementations.BaseApplicationHost`1+<Init>c__async0[MediaBrowser.Server.Implementations.ServerApplicationPaths].MoveNext () [0x00000] in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0 at MediaBrowser.Server.Startup.Common.ApplicationHost+<Init>c__async1.MoveNext () [0x00000] in <filename unknown>:0 From what I can see, it does not see the sqlite lib. I use MediaBrowserServer-dev on a centos7 and use the repository from MediaBrowser. To make sure, I verified if sqlite is installed correctly: yum list sqlite sqlite.x86_64 3.8.2-2.1 @MediaBrowserServer-Dependancies so it is installed. Let's see if the files that it is unable to find are there: find / -name libsqlite3.so.0 /usr/lib64/libsqlite3.so.0 so the file does exist. Where is MediaBrowserServer looking for the file? Or what is going wrong?