Habitual_Sinner 5 Posted July 3, 2016 Posted July 3, 2016 Hi All, I finally managed to get Emby to sync my music library in kodi after mutliple attempts. I was having the same trouble as others have reported with a large music library, I followed all of the suggestions in other posts but I ended up formatting my HTPC and reinstalled Windows 10 and Kodi 16.1, Everything sync'd first try and all was going well until I added nearly 2,000 songs to my library. the initial sync seems to run ok through the songs but then it crashes when it tries to update movies (I haven't touched or played any movies since the fresh install) saying "database is locked" the full error is below: 09:00:35 T:3588 ERROR: Exception in thread Thread-10: Traceback (most recent call last): File "C:\Program Files (x86)\Kodi\system\python\Lib\threading.py", line 810, in __bootstrap_inner self.run() File "C:\Users\robpa\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\librarysync.py", line 899, in run self.run_internal() File "C:\Users\robpa\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\librarysync.py", line 979, in run_internal self.incrementalSync() File "C:\Users\robpa\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\librarysync.py", line 851, in incrementalSync doupdate = items_process.itemsbyId(items, process_type, pDialog) File "C:\Users\robpa\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\itemtypes.py", line 200, in itemsbyId actions[process](item) File "C:\Users\robpa\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\itemtypes.py", line 307, in add_update viewtag, viewid, mediatype = self.emby.getView_embyId(itemid) File "C:\Users\robpa\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\read_embyserver.py", line 112, in getView_embyId cursor_emby.execute(query, (viewId,)) OperationalError: database is locked I can post the rest of the log if needed but there are no errors or warnings in it. Any help will be greatly appreciated, I don;t really want to have to rebuild the database as I have spent quite a while getting to this point.
Angelblue05 4132 Posted July 3, 2016 Posted July 3, 2016 (edited) Please post the full log. http://emby.media/community/index.php?/topic/17599-how-to-report-a-problem/ Edited July 3, 2016 by Angelblue05
Habitual_Sinner 5 Posted July 3, 2016 Author Posted July 3, 2016 Full log attached. HTPC Windows 10 Kodi 16.1 Emby Beta Addon V.2.2.12 Emby Server Windows Server 2012 R2 VM Emby Server Beta V.3.1.54.0 kodi.log 1
Angelblue05 4132 Posted July 3, 2016 Posted July 3, 2016 (edited) Ok, that gives me a good idea what's happening. Thanks. By the way, you should review your advancedsettings.xml and remove this <cleanonupdate>true</cleanonupdate>. That setting will mess with the add-on. For now, what I would suggest you do is disable the following settings in the add-on: Enable Fast startup sync while you import your music. That should hopefully do it. If not, I will try to review how we can fix this as soon as I have the time. Edited July 3, 2016 by Angelblue05
Habitual_Sinner 5 Posted July 3, 2016 Author Posted July 3, 2016 Ok, that gives me a good idea what's happening. Thanks. By the way, you should review your advancedsettings.xml and remove this <cleanonupdate>true</cleanonupdate>. That setting will mess with the add-on. For now, what I would suggest you do is disable the following settings in the add-on: Enable Fast startup sync while you import your music. That should hopefully do it. If not, I will try to review how we can fix this as soon as I have the time.Thanks for the help, I've removed the <cleanonupdate> line (I should have spotted that, it was left over from when I had my library on a mysql dB...) and I've disabled fast sync. It's running through now but it'll take a while as it's comparing 43.6tb of music. I'll report back, Thanks again [emoji2] Sent from my LG-H815 using Tapatalk 1
Habitual_Sinner 5 Posted July 4, 2016 Author Posted July 4, 2016 Ok so it's finished it's sync now and the sync thread didn't exit this time so thanks for that, only problem now is that it's imported the same song 8 or 9 times in each new album... Should I clean the kodi library or is there a way to do it with the emby add-on? Sent from my LG-H815 using Tapatalk
Angelblue05 4132 Posted July 4, 2016 Posted July 4, 2016 The duplicates play content? That's weird, because we pull your song list from Emby, and process them only once. You could try to run a manual sync to see if it removes the extra entries. Let me know.
Habitual_Sinner 5 Posted July 5, 2016 Author Posted July 5, 2016 Thanks for the reply, Yes the duplicates play content. If I play one of the new albums it plays each song 9 times. I started a "repair local database" before I left this morning so I'll check that when I'm home and run a manual sync if it hasn't removed them Sent from my LG-H815 using Tapatalk
Angelblue05 4132 Posted July 5, 2016 Posted July 5, 2016 (edited) A repair database would not do it - it just force all existing content to update (maybe it should be renamed to "refresh"). A manual sync will do the compare and actually remove what doesn't belong - however, I'm not sure if it will remove these duplicates...It almost sounds like they are reminiscent of previous attempts at syncing. Maybe there's a bug we haven't discovered yet. Edited July 5, 2016 by Angelblue05
Habitual_Sinner 5 Posted July 5, 2016 Author Posted July 5, 2016 You're right, neither of them have removed the duplicates and I agree that they're remnants of previous sync attempts. How can I remove the duplicates without rebuilding the entire db? The only thing I can think of is to move the albums with duplicates to a folder that isn't part of the emby library, run a manual sync and then move them back again... Sent from my LG-H815 using Tapatalk 1
Angelblue05 4132 Posted July 5, 2016 Posted July 5, 2016 Indeed, that should do it. In fact, you can remove them, run a library sync server side, then the add-on should automatically remove them without your intervention (manual sync).
Habitual_Sinner 5 Posted July 5, 2016 Author Posted July 5, 2016 Ok, I'll give that a try. Is there anything you need from my end to help track down the bug before I go ahead? A log taken from when I play one of the duplicates maybe? Sent from my LG-H815 using Tapatalk
Angelblue05 4132 Posted July 5, 2016 Posted July 5, 2016 No, unfortunately. We just have to make the process more resilient. Keep me posted.
Recommended Posts