Jump to content

[Re-]Sync (on startup or login) seems to be generally flaky


shred00

Recommended Posts

shred00

I have been having issues with [re-]sync being generally flaky.  I used the square-bracketed "re-" because perhaps it is that use-case of it that is really at the root of the problems.  I am probably not the most typical user of this plugin so let me explain first.

 

I suspect most people, who do not experience sync issues with the addon, only have a single profile in Kodi which they leave running all of the time and so the addon only has to sync the databases once at startup and then is kept running and as such keeps the Kodi database synced with Emby content changes.

 

I do things a little differently than that here.  I have multiple Kodi profiles.  One for the kid(s).  One for each of the adults, one for shows the adults watch together, another for shows the adult(s) watch with the kids, etc.  So quite a few Kodi profiles with corresponding of Emby users/profiles.

 

Each Kodi box is also set to time out a user's session after a period of idleness using a "logout" screensaver so that when a user sits down to watch Kodi, they should always find themselves at the user/profile selection menu seeing as the previous user was idled out.

 

This of course means that every time a user logs into Kodi, their Kodi Movie and TV show database needs to be re-synced.  This is where things frequently go off the rails.  Last night was a very typical situation.  Here's what happened:

 

"Parents" logged into Kodi.  Fast sync started up and completed.  I went to watch the latest news "TV show" from Emby (which is something that records new every day, several times a day even, so content there is always being added and thus needs the resync for it to be available).  Fortunately the re-sync at login found the newest episodes but when I went to play one I got a "not found" error.  I tried several times (because sometimes simply trying again even works -- so some additional flakiness) but all attempts returned a "not found" error.

 

So I went to the Emby menu and did a "manual sync".  When that was done, some 4 minutes later, I went back to the news episode but the item was still "not found" when I tried to play it.

 

So back to the Emby menu for a Repair local database.  Some 6 or so minutes and that was completed.  Back to the news show.  Episode is still "not found" (to be clear, the item is in the list, just trying to play it reports that it cannot be found).

 

So back to the Emby menu to do a Perform local database reset, which of course restarts Kodi and starts a new full sync.  When that is finally done back to the news show and now not all of the episodes are there, and in particular the one I wanted to play is not even in the list any more.

 

So back to the Emby menu again, to do a Perform manual sync.  When that finally completes, the missing news episodes are now back in the and now finally playable.  No more "not found" type errors trying to play it.  But it took about 20 minutes and a lot of cussing to get here.

 

This is not an isolated event.  This happens quite a number of times a week on multiple Kodi boxes.

 

So what do we need to do to get to the bottom of this?  Is a big huge Kodi log that covers all of the above process to getting to a playable item sufficient?  Is it going to show why an item was "not found"?

 

I'm very willing to help as much as I can to getting this reliable.  Just tell me what you need and I will be happy to supply it.  I am a software developer/IT person.  I am quite competent so don't be afraid to just tell me what information you need.

Link to comment
Share on other sites

Angelblue05

The best thing to do is provide your kodi log when you expect content to appear the first time around (before trying to fix it). I want to see if it's being added or not and we'll go from there.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

shred00

@Angelblue05: Would you just like a regular no-debugging-enabled Kodi log or do you want me to do:

 

 4. Under Advanced tab, set the Log level to Info. If you are asked to provide a more detailed log, set it Debug instead. Usually, setting the Log level to Info is enough.

 

And if so, do you want that at Info or Debug?

  • Like 1
Link to comment
Share on other sites

Angelblue05

@Angelblue05: Would you just like a regular no-debugging-enabled Kodi log or do you want me to do:

 

 4. Under Advanced tab, set the Log level to Info. If you are asked to provide a more detailed log, set it Debug instead. Usually, setting the Log level to Info is enough.

 

And if so, do you want that at Info or Debug?

 

No Kodi debug, add-on log level set to info is good enough for now. I just want to see where the issue lies before digging deeper.

 

The best test you can generate is as follow:

  1. Turn off Kodi
  2. In the webclient, edit info of an episode, tvshow or movie (just change the title by one letter, hit save).
  3. Turn on Kodi, wait a minute. Grab the log. Does the title update if you open the information window in Kodi (context menu > information)
Edited by Angelblue05
Link to comment
Share on other sites

shred00

 

No Kodi debug, add-on log level set to info is good enough for now. I just want to see where the issue lies before digging deeper.

 

The best test you can generate is as follow:

  1. Turn off Kodi
  2. In the webclient, edit info of an episode, tvshow or movie (just change the title by one letter, hit save).
  3. Turn on Kodi, wait a minute. Grab the log. Does the title update if you open the information window in Kodi (context menu > information)

 

 

OK.  So Info in the Emby addon seems to be the default log level (unsurprisingly).

 

As for the 3 steps above to repro, it can be more subtle than that.  Frequently what happens is that the update process sees the new content and updates the database with it so that I do see it in the list of episodes but it's when I go to play it that I get an error notification that the item could not be found.  It's the same sort of result I'd expect if I were just scanning the filesystem for content like Kodi normally does and then after the scan, I renamed a file on the filesystem without telling Kodi to rescan.  If I tried to play such a file, I'd get an error about it not being found -- because of course, the name changed since the scan.

 

I think the Emby addon situation must be more complex than that simple example though since it can happen after the re-sync scan that happens on login, that it might give me a "not found" kind of error for something I try to play.  Clearly the actual file is not being renamed underneath Emby (i.e. if I were to ask the web client to play it it would play fine), but there is some mis-match between the identifier that the Kodi addon has and what is in Emby such that when the addon asks to play something, Emby doesn't know what it's referring to.

 

Anyway, the next time I get this kind of error, I will take a copy of the kodi.log and paste a link to it here.  It might be a day or two before it happens again.

 

Cheers.

Link to comment
Share on other sites

Angelblue05

Sometimes, new content is added, I can't play them via widgets (I get the file not found) but that is normal and simply because the paths have no been cached yet. Usually entering and backing out of a library will refresh widgets and get it working.

 

Beyond that, I guess I'll wait for your complete log as I can't see what would be the issue. Paths are always updated. With your other posts, you make it sound like nothing is added to the database. So why do you think the Fast sync is flaky? I think I'm not understanding that part.

Edited by Angelblue05
Link to comment
Share on other sites

Angelblue05

For sure, Emby for Kodi is not for your noob users. 1- It involves Kodi, 2- It's not instant.

 

At that point, I could not justify using the Kodi plugin approach for my main media center. Might as well install Theater or other windows support app that just work right out of the box. The only reason I use Kodi is for other add-ons and the use of custom smart playlists. No offence, of course.

 

When I see people that would be better off using Embycon, I always send them your way. I would still consider supporting music if I were you, that's one of the reason people give me when they don't want to move to your add-on. Otherwise your add-on is great for those remote setup and also if emby is not your main library.

Edited by Angelblue05
Link to comment
Share on other sites

shred00

Sometimes, new content is added, I can't play them via widgets (I get the file not found) but that is normal and simply because the paths have no been cached yet. Usually entering and backing out of a library will refresh widgets and get it working.

 

Beyond that, I guess I'll wait for your complete log as I can't see what would be the issue. Paths are always updated. With your other posts, you make it sound like nothing is added to the database. So why do you think the Fast sync is flaky? I think I'm not understanding that part.

 

By "widgets" do you just mean entries in a list of episodes?

 

"Backing out of a library" seems an interesting data point.  I will give that a try and report back.  How far do you have to back out?  Just to the previous level -- season list (if there are multiple seasons) or show name, or do you have to go further?

 

If backing out does seem to work, is there any way to fix the cacheing so that this backout is not necessary?

Link to comment
Share on other sites

shred00

I don't mean to cross pollute this thread with EmbyCon propaganda but I though I would just add my thoughts here.

 

Your scenario is exactly why I created EmbyCon, your scenario is my scenario, this is exactly how I have Kodi set up and with 4 or so profiles and a bunch of picky "crazy" users in the house that could not or would not wait for syncing.

Even with fast sync being only a few seconds it was the few seconds at start up that I got yells form the other end of the house. "Its not WORKING!!", then a few seconds later, "Oh there it goes", very frustrating.

No matter how many times I tried to explain it may take a few seconds to kick in and a few seconds to then sync the shows, they would not listen, and just jump to the shows and see it has not been updated with this weeks show yet and BOOM, waa waa waa it is not working.

 

Anyway I use logout and then in the master profile use the Google image Screen saver, all works great, logs them out after 3 min, and then the master screen saver kicks in and shows a nice google pic. When they want to play something they log into their profile and navigate to their TV shows, there is no sync and what is returned is what is on the server at that time, no delay or caching issues.

 

With a few small tweaks to the Estuary Skin home page (takes 2 min) it all looks just like the native interface and everyone is happy.

 

I think my users can handle the "it takes a few seconds to update" condition readily enough, if it were reliable so I don't really have that problem.  Plus I think the situations where a user wants that very latest episode which only recorded last night is rare (but strangely frequent).  That is, for most users and most shows, they don't keep up to date with the very latest episode so login-refresh is a non-issue.  It can update the most recent episodes while they watch the episode from 2 weeks ago that synced some time in the last couple of weeks.

 

The one very frequent exemption to that is the nightly news.  We of course always want to watch the most recently recorded episode and so refresh/resync needs to be bullet-proof for that.  That is where I am experiencing all of the pain.

 

As for skin hacking to make EmbyCon more native, indeed, that is one way to handle it, but it means having to manually update all of the users private copies of a skin when there are skin updates upstream.  I don't want to have this much hands-on fixing of Kodi machines.  Kodi really should allow addons to add widgets (possibly with user confirmation) to their default skins.  Or they should open up the Movies and TV shows menu items as I have described previously.  :-D

 

Skin hacking also assumes everyone is using Estuary.  I have some users still using Confluence just because that is what they are used to.  Confluence->Estuary was a pretty radical skin change.

Link to comment
Share on other sites

arztonyou

I think my users can handle the "it takes a few seconds to update" condition readily enough, if it were reliable so I don't really have that problem.  Plus I think the situations where a user wants that very latest episode which only recorded last night is rare (but strangely frequent).  That is, for most users and most shows, they don't keep up to date with the very latest episode so login-refresh is a non-issue.  It can update the most recent episodes while they watch the episode from 2 weeks ago that synced some time in the last couple of weeks.

 

The one very frequent exemption to that is the nightly news.  We of course always want to watch the most recently recorded episode and so refresh/resync needs to be bullet-proof for that.  That is where I am experiencing all of the pain.

 

As for skin hacking to make EmbyCon more native, indeed, that is one way to handle it, but it means having to manually update all of the users private copies of a skin when there are skin updates upstream.  I don't want to have this much hands-on fixing of Kodi machines.  Kodi really should allow addons to add widgets (possibly with user confirmation) to their default skins.  Or they should open up the Movies and TV shows menu items as I have described previously.  :-D

 

Skin hacking also assumes everyone is using Estuary.  I have some users still using Confluence just because that is what they are used to.  Confluence->Estuary was a pretty radical skin change.

 

Just a quick comment on your last paragraph.  Have you tried the Titan skin?  It has a lot of configuration options.  You can make it look essentially like Confluence so your users still feel comfortable if that's what they want, but you would also be able to edit the menu items, the sub-menu items, the backgrounds, and a lot more.  You can also backup and restore the skin settings so you don't have to configure all the settings over and over again.  And it integrates the smart shortcuts from the Emby for Kodi addon.

Edited by arztonyou
Link to comment
Share on other sites

SkyBehind

Just a quick comment on your last paragraph. Have you tried the Titan skin? It has a lot of configuration options. You can make it look essentially like Confluence so your users still feel comfortable if that's what they want, but you would also be able to edit the menu items, the sub-menu items, the backgrounds, and a lot more. You can also backup and restore the skin settings so you don't have to configure all the settings over and over again. And it integrates the smart shortcuts from the Emby for Kodi addon.

+1 for Titan skin

 

Sent from my Nexus 6 using Tapatalk

Link to comment
Share on other sites

shred00

@@Angelblue05

 

Too early to say still.  Given the time of year, television watching is at a low volume.  Should pick up in the coming few days to a week I would think.

 

I did experience one of my other annoyances last night, which is that the [re-]sync stalls for minutes on a single item.  But I will save that for another thread if and when we get this more basic issue worked out.  :-)

Link to comment
Share on other sites

shred00

@Angelblue05: Yes, understood.  As I mentioned, if/when we get this basic syncing fixed I will open a new thread for any other issues I see, like that one I described in #16 but I don't want to muddy up this thread with multiple issues.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...