SwanStream 59 Posted April 8, 2015 Share Posted April 8, 2015 Great effort from the development team so far! Very much appreciated. Here's a little stream of consciousness related to the scanning (again). Maybe this is a feature request in disguise I'm not sure.... When I add new episodes to the Emby's auto-organize monitored directory, the app slurps it up and dumps in the right spot with the right naming convention and quickly I get the new episode indicator popping up in emby... so far so good. Kodi on the other hand after 3 hours hasn't picked up the new episode(s). It has been scanning, but has been focused on updating watched status, movies, shows, episodes, etc. So two thoughts come to mind: 1 - Is it in the plans/possible to hook into Emby a little more dynamically to poll "new/changed" items as the priority or intermittently while doing other house-keeping so fresh adds can be watched before they spoil? 2- Seems to me with or without "1" it would be helpful/useful for the instant gratification crowd to have a manual scan button within TV to have Kodi look specifically for new shows NOW... or is that just me? Of coarse I know not what I ask for, if it's possible, already in the plans, or even available and I'm just not knowing about it. Feel free to educate my foolish question. 1 Link to comment Share on other sites More sharing options...
xnappo 1593 Posted April 8, 2015 Share Posted April 8, 2015 (edited) That is how it is supposed to work. Something is broken, so please help debug. As soon as the server sees the file, it sends out a web socket blast with the information about the new file. The addon should see this and add it. Set your level to 1 to be sure you see these events. The background scanning is a safety net for this not working. xnappo Edited April 8, 2015 by xnappo Link to comment Share on other sites More sharing options...
SwanStream 59 Posted April 8, 2015 Author Share Posted April 8, 2015 That is how it is supposed to work. Something is broken, so please help debug. As soon as the server sees the file, it sends out a web socket blast with the information about the new file. The addon should see this and add it. Set your level to 1 to be sure you see these events. The background scanning is a safety net for this not working. xnappo No problem, happy to help. I'm guessing the right order of operations is to 1 - turn on debug logging in kodi (maybe you need Emby's debug logging as well?) 2 - move a new file to Emby's scanned folder 3 - wait for Emby to find/move the file appropriately and pop up the notice. 4 - give Kodi a few minutes to 'react' to that. 5 - pack and ship the log(s). yes? 1 Link to comment Share on other sites More sharing options...
xnappo 1593 Posted April 8, 2015 Share Posted April 8, 2015 Exactly. Thanks! Link to comment Share on other sites More sharing options...
SwanStream 59 Posted April 8, 2015 Author Share Posted April 8, 2015 So after Emby found the file and moved it I got a windows pop-up error saying "Unhandled exception: Collection was modified; enumeration operation may not execute." It doesn't say what app that error goes with. I've also noticed that Kodi is very slow on updating and using lots of pc resources. Between Kodi and emby I'm running at about 30%cpu. After restarting both apps This time however the new episode was available in Kodi pretty quickly... though to be fair it was in the middle of updating episodes anyway and approx at the right percent based on alphabet letter. It be a bad test, but here's the log in case it helps sort something. https://www.dropbox.com/s/ze4o1y9yfz86qk6/kodi%20-%20Copy.log?dl=0 1 Link to comment Share on other sites More sharing options...
xnappo 1593 Posted April 8, 2015 Share Posted April 8, 2015 (edited) I am thinking we may need to disable the background scanning to fully test this. This is helpful for now though - but can you tell me what you added? (show name, episode season/number?). Edited April 8, 2015 by xnappo Link to comment Share on other sites More sharing options...
xnappo 1593 Posted April 8, 2015 Share Posted April 8, 2015 Looking at the code, I think it may not work well when a scan is in progress. If you want to try an experiment, comment out lines 107 and 119 of service.py, restart, and do your experiment again. xnappo Link to comment Share on other sites More sharing options...
SwanStream 59 Posted April 8, 2015 Author Share Posted April 8, 2015 I am thinking we may need to disable the background scanning to fully test this. This is helpful for now though - but can you tell me what you added? (show name, episode season/number?). Wish I could remember for certain... could be Sirens - S02E12 or Justified - S06E12 ... maybe both 1 Link to comment Share on other sites More sharing options...
SwanStream 59 Posted April 8, 2015 Author Share Posted April 8, 2015 Looking at the code, I think it may not work well when a scan is in progress. If you want to try an experiment, comment out lines 107 and 119 of service.py, restart, and do your experiment again. xnappo Where's the file? the only service.py I can find is under C:\Program Files (x86)\Kodi\addons\service.xbmc.versioncheck... and I know that's not it cause it stops at line 109.... Link to comment Share on other sites More sharing options...
xnappo 1593 Posted April 8, 2015 Share Posted April 8, 2015 Sorry: %appdata%\Kodi\addons\plugin.video.emby Link to comment Share on other sites More sharing options...
SwanStream 59 Posted April 8, 2015 Author Share Posted April 8, 2015 commented 107 - # xbmc.log("Doing_Db_Sync: updatePlayCounts (Started)") commented 119 - # xbmc.log("Not authenticated yet") started Kodi moved Yukon Gold - S02E03 to the monitored folder. Emby found it, moved it. Looked in Emby TV and it was there. looked at Kodi TV recently added, wasn't there. (more than once.) uploaded the mega-log to here:https://www.dropbox.com/s/5hidcrjmtbqxg6t/kodi.log?dl=0 Let me know if that helps or you need something else to track it down. BTW I've left the logging on and kodi running in case longer time is whats needed. Link to comment Share on other sites More sharing options...
xnappo 1593 Posted April 8, 2015 Share Posted April 8, 2015 Lol, really should have told you what the lines should be. Sorry. worked = librarySync.syncDatabase() and worked = librarySync.updatePlayCounts() Link to comment Share on other sites More sharing options...
SwanStream 59 Posted April 8, 2015 Author Share Posted April 8, 2015 Yeah... that's why I quoted the lines, it seemed kinda random... My fault, steering wheel was loose and went to the wrong directory ! Did it all over again, this time we're using,... wait for it,... Yukon Gold - S02E04. all else remains the same(ish) This time I got a script error in kodi, and a windows pop-up - Unhandled exception: Exception of type System.OutOfMemoryException' was thrown. after restarting both apps only got the script error in kodi, but no new episodes. Emby shows the new episode. logs here:https://www.dropbox.com/sh/a8usoywzao0wyt2/AABO5XK8wepZAi3W0Y9FYYRta?dl=0 Link to comment Share on other sites More sharing options...
xnappo 1593 Posted April 8, 2015 Share Posted April 8, 2015 Ok - obviously we will need to dig in when we get some time. At any rate - you can take heart in the fact that it is supposed to work better, and will eventually Link to comment Share on other sites More sharing options...
justpig 27 Posted April 9, 2015 Share Posted April 9, 2015 Thanks for looking into this. I am having the same problem. Link to comment Share on other sites More sharing options...
Recommended Posts