Jump to content

embyforkodi (next-gen) 7.X.X support


quickmic

Recommended Posts

quickmic
53 minutes ago, Seger said:

I think that waiting for the server leads to synchronisation problems.

It's exactly the other way around. Not waiting will lead into serious sync issues. The server sends "update" notification even if not all data are pulled/processed from server side. If the plugin doesn't wait, it could lead into incomplete data.

I cannot explain that any better, this is a very technical matter. You need detailed knowledge when and how Emby server reports changes.

Link to comment
Share on other sites

quickmic
1 hour ago, Seger said:

I also have the feeling that the interface/addon is always behind.

Cannot share this experience. What do you mean with behind? Out of sync, no it isn't. Delayed? Maybe content updates if server is busy (and no, the server is not always busy). Again it's the opposite. Server is idle 99% of the time unless you scan your libraries or some other tasks are running.

Quote

can't you expect a change on the client in the running process?

What?

 

Edited by quickmic
Link to comment
Share on other sites

quickmic

Also it's not true, that progress updates always comes from Emby server. Actually again it's quite the opposite. If you play synced content on a device, Kodi is FULLY in charge for progress updates. All incoming Emby progress updates (related to the played content on that box) are blocked, cause Kodi knows the progress already. No need to update it again.

The plugin only updates progress reported by Emby server if the progress updates was send from "other devices".

The kodi.log from @Pejamas shows exactly this behavior. He/she played the same file 3 times and 1 time a different file. On all 4 events, the plugin blocked ALL incoming progress updates from Emby server, but:

There was a non progress related "content update" send from Emby server, and this was not blocked (of course), cause it indicates a content change and not just a progress update. I assume this content update notification "messed" up the progress.

Also bit strange that the content update was reported for exactly this file, he/she was playing. Could be a coincidence, but still odd.

...I stop here explaining also too technical.

 

btw, I'm talking about relatime updates, not Kodi startup sync here

Edited by quickmic
Link to comment
Share on other sites

DarWun
16 hours ago, quickmic said:

Correct, but should be initiated automatically after plugin installation/update.

@DarWun Can you elaborate what's the problem? The log indicates no problem.

Sure @quickmic. After updating to 7.11.0 (and resetting the database), I watched a movie from beginning to end. Emby Server reported that playback completed and marked the movie as watched. But thirty minutes after I finished watching the movie, E4K was still showing it as unwatched with zero progress. I rebooted the Rpi4 that E4K is installed on. After Kodi started, the movie was still shown as unwatched. I then did a database reset. After adding the Movie library and rescanning, the movie was marked as watched and disappeared from the latest movies queue.

I then watched three or four episodes of a TV show (Cheers) with the next episode set to start immediately after the previous one ended. When I finished that watch session, all episodes were reported as watched in Emby. But E4K still showed them as being unwatched. The Kodi.log I attached to my previous post is from that session.

I'll post back after some additional testing tonight.

Edited by DarWun
Link to comment
Share on other sites

DarWun

@quickmicI have a new observation after some testing. I've watched several series episodes and partial movies. Nothing is updating in E4K after doing so. But as soon as I run "Scan Media Library" on the emby client, E4K updates all previously watched content. 

My recollection is that on earlier iterations of E4K, content updated in E4K immediately after it was watched. I'll rollback later tonight to confirm.

Link to comment
Share on other sites

quickmic

@DarWun

I still need even more details, let's see if I got it right:

You have a Kodi box which doesn't update the progress. This device is all the time online (huge difference if you are reporting a realtime update issue or a Kodi startup sync issue). So let's say it's always online.

If you play content on a a different device (other Kodi box, Emby's WebUI or any other device) , the progress is not synced? Is this correct, or are you talking about playing content on the same device and progress is wrong? (Also huge difference, as explained a couple of posts before).

If so, two possible issues comes to mind. The progress was correctly synced, but the widgets wasn't refreshed. -> not a sync problem, probably a refresh problem.

or

Progress was really not synced.I also need a kodi.log when this happens. You don't need to wait 30 minutes, it should be synced in seconds. Give Kodi 1 or 2 minutes even if it's delay what actually should not be the case.

As soon as the problem is identified, I can tell you a couple of tests to perform to break if even more down.

 

Link to comment
Share on other sites

I have also just managed to do some tests.

When I set episodes to watched/unwatched via "Next episode", it initially takes over everything. As soon as I go to an episode via the "Next Episode" widget using the "i" key and then set individual episodes as watched/unwatched in the menu, it is not always adopted in the widgets. Only a restart causes everything to be displayed cleanly. Unfortunately, a skin reload is not enough. In the log it is stated that the server is busy, but no automatic task was running at the time.

 

kodi.log

Link to comment
Share on other sites

quickmic
3 hours ago, Seger said:

I have also just managed to do some tests.

When I set episodes to watched/unwatched via "Next episode", it initially takes over everything. As soon as I go to an episode via the "Next Episode" widget using the "i" key and then set individual episodes as watched/unwatched in the menu, it is not always adopted in the widgets. Only a restart causes everything to be displayed cleanly. Unfortunately, a skin reload is not enough. In the log it is stated that the server is busy, but no automatic task was running at the time.

 

kodi.log 200.01 kB · 1 download

Sounds skin specific, I don't even have an option setting a watched status on the info screen (i-key).

Link to comment
Share on other sites

quickmic
4 hours ago, Seger said:

In the log it is stated that the server is busy, but no automatic task was running at the time.

 

I bet the server was busy, enable the debug mode and you'll see the server tasks. Look out for "Incoming data:" messages.

However, it's not a problem when server is busy. Just content updates are delayed (not progress updates).

Link to comment
Share on other sites

DarWun
21 hours ago, quickmic said:

@DarWun

I still need even more details, let's see if I got it right:

You have a Kodi box which doesn't update the progress. This device is all the time online (huge difference if you are reporting a realtime update issue or a Kodi startup sync issue). So let's say it's always online.

If you play content on a a different device (other Kodi box, Emby's WebUI or any other device) , the progress is not synced? Is this correct, or are you talking about playing content on the same device and progress is wrong? (Also huge difference, as explained a couple of posts before).

If so, two possible issues comes to mind. The progress was correctly synced, but the widgets wasn't refreshed. -> not a sync problem, probably a refresh problem.

or

Progress was really not synced.I also need a kodi.log when this happens. You don't need to wait 30 minutes, it should be synced in seconds. Give Kodi 1 or 2 minutes even if it's delay what actually should not be the case.

As soon as the problem is identified, I can tell you a couple of tests to perform to break if even more down.

 

Emby server is a Synology 918+ NAS. I stream media from the server using LibreElec 10.0.3 installed on an Rpi4. E4K is installed on the Rpi4. Both the Emby server and the Rpi4 client are on 24/7. Not sure if this is relevant, but I am using the Embuary skin. After updating to E4K 7.11.0, playback is no longer updated in Kodi even though it is on the Emby Server. After watching media to completion, the Emby server reports playback as complete but Kodi still shows the media as unplayed. Many minutes later (up to 30minutes) the media is still being reported as unplayed by Kodi/E4K 7.11.0.

I rolled back to E4K 7.10.5 last night. After watching media, Kodi/E4K immediately updated to reflect playback status. I didn't need to do anything for that to happen (i.e. update happens with no rescan of the library in Emby on the server, database reset in E4K, Rpi4 restart, etc.).

This could be a "widget not being refreshed" issue. Media that has been played is still being shown as unplayed on the main screen on the Rpi4 Kodi client. Restarting Kodi did not result in it being removed from the playback queue. I did not at any point reload the skin or reset nodes to see if that would result in them being removed.

Unfortunately, I'm away from home (and my Emby server) for the next week or so. I won't be able to do any additional troubleshooting until I return. The log I provided previously captures when this happened. I played multiple episodes of a series, and after doing so Kodi reported episodes as being unplayed even though the Emby server reported them as have been played to completion.

Edited by DarWun
Link to comment
Share on other sites

quickmic
2 hours ago, DarWun said:

Emby server is a Synology 918+ NAS. I stream media from the server using LibreElec 10.0.3 installed on an Rpi4. E4K is installed on the Rpi4. Both the Emby server and the Rpi4 client are on 24/7. Not sure if this is relevant, but I am using the Embuary skin. After updating to E4K 7.11.0, playback is no longer updated in Kodi even though it is on the Emby Server. After watching media to completion, the Emby server reports playback as complete but Kodi still shows the media as unplayed. Many minutes later (up to 30minutes) the media is still being reported as unplayed by Kodi/E4K 7.11.0.

I rolled back to E4K 7.10.5 last night. After watching media, Kodi/E4K immediately updated to reflect playback status. I didn't need to do anything for that to happen (i.e. update happens with no rescan of the library in Emby on the server, database reset in E4K, Rpi4 restart, etc.).

This could be a "widget not being refreshed" issue. Media that has been played is still being shown as unplayed on the main screen on the Rpi4 Kodi client. Restarting Kodi did not result in it being removed from the playback queue. I did not at any point reload the skin or reset nodes to see if that would result in them being removed.

Unfortunately, I'm away from home (and my Emby server) for the next week or so. I won't be able to do any additional troubleshooting until I return. The log I provided previously captures when this happened. I played multiple episodes of a series, and after doing so Kodi reported episodes as being unplayed even though the Emby server reported them as have been played to completion.

Ok, this definitely needs more testing. Only thing I which comes to mind:

  

On 11/29/2022 at 6:41 AM, quickmic said:

The progress still syncs but according to limits set by Kodi, not by Emby server. If you used this option before, maybe you need to delete your advancedsettings.xml in your ./kodi/data/userdata/advancedsettings.xml  and restart Kodi twice.

Maybe the old "limits" are still included there.

Please try that, and report if this solves the problem.

 

EDIT:

I checked your log again, and yes, this is the problem:

2022-11-28 19:18:12.217 T:1151     INFO <general>: Loaded settings file from special://profile/advancedsettings.xml
2022-11-28 19:18:12.218 T:1151     INFO <general>: Contents of special://profile/advancedsettings.xml are...
                                                   <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
                                                   <advancedsettings>
                                                     <network>
                                                       <curlclienttimeout>120</curlclienttimeout>
                                                       <curllowspeedtime>120</curllowspeedtime>
                                                       <disablehttp2>false</disablehttp2>
                                                     </network>
                                                     <video>
                                                       <playcountminimumpercent>101</playcountminimumpercent>
                                                       <ignorepercentatend>101</ignorepercentatend>
                                                     </video>

                                                   </advancedsettings>

 

Those lines disables Kodi's internal progress updates. They must be removed!

Delete the file "special://profile/advancedsettings.xml" -> in your user folder, or: as you have 7.10.5 installed, disable the option in plugin menu and then update to 7.11.0.

This will fix the issue.

Also I see, you use Kodi profiles. This means, you have multiple advancedsettings.xml files (for each profile). All of them needs to be removed/fixed.

 

Background info:

I removed the option in 7.11.0 -> too experimental. You experienced what this option actually did. It disabled all Kodi's internal progress updates and the plugin was fully responsible for all updates. In theory, this is a very good thing cause the plugin is fully in charge but on the other side. The plugin must take care of each and every progress/content update for plugins and also third party content.

7.10.5 covered 90% of all cases where an update needs to be triggered but not all of them. Also the code was not that "good" and needs lot of addition work to make it stable. Therefore I removed this function and put it on the 8.X todo list.

 

 

Edited by quickmic
  • Thanks 1
Link to comment
Share on other sites

quickmic

To all users, let me know if there are any showstoppers in 7.11.0

I'm thinking to upload this version in Emby's Kodi beta repository so more people will participate in testing.

Thanks.

Link to comment
Share on other sites

nuentes
12 hours ago, quickmic said:

let me know if there are any showstoppers in 7.11.0

Here are the outstanding issues on my end:

  1. We've been working together on playback from widgets. I just finally updated and reset my database completely, and whenever I try to play from my widget, Kodi crashes entirely. I've tried several different times. I've attached a couple of logs of this issue (kodi1.log and kodi2.log).
  2. I tried to cache artwork (I really like that I can now select what artwork to cache), and I got a prompt that said my disk was low on space, so it didn't do it. I know there was sufficient space on there, but I cleared 2GB off the disk anyway and tried again, and got the same message. I use path substitution, so the artwork is located on a NFS share. What drive space is being used to determine if there is sufficient space? Because my OS has under 1GB free, so I feel like Emby is seeing my OS is low on space, and not checking the actual destination disk, which has plenty of space. I've mentioned this to you before, but I'm still having this issue in 7.11.0
  3. Since I had to reset the DB, I reset all artwork as well. Since I can't cache automatically, it has to happen manually as I scroll through nodes. The issue is that if I scroll through too many too fast, Kodi crashes. Now - I'll admit I'm not certain this is an E4K issue. And it's been happening for a long time, and I usually just suffer through it immediately after a DB reset, as the issue clears up after enough images are cached. But I would appreciate if you take a look. I got it in a log (kodi3.log). If this is a general Kodi issue, I don't mind if you forward me to the kodi forums at all.
  4. I also often get the prompt that my advancedsettings.xml has changed, and kodi has to restart. I have not edited this file in more than a year, but I'll get this message every 3-4 days. Additionally, I'll often get it 2-3 times in a row. Meaning I start up kodi, and then it automatically restarts, and then it restarts again.

kodi1.log kodi2.log kodi3.log

Edited by nuentes
Added 4th open issue
Link to comment
Share on other sites

quickmic
28 minutes ago, nuentes said:

I tried to cache artwork (I really like that I can now select what artwork to cache), and I got a prompt that said my disk was low on space, so it didn't do it. I know there was sufficient space on there, but I cleared 2GB off the disk anyway and tried again, and got the same message. I use path substitution, so the artwork is located on a NFS share. What drive space is being used to determine if there is sufficient space? Because my OS has under 1GB free, so I feel like Emby is seeing my OS is low on space, and not checking the actual destination disk, which has plenty of space. I've mentioned this to you before, but I'm still having this issue in 7.11.0

There is only one thing I could do, adding an option to disable the free space check. The plugin uses "regular" API looking for free space. This also works if you mount you folders to a NAS but obviously you are using some Kodi internal mechanism.

If you disable it, it's up to you to taking case about the free space.

Link to comment
Share on other sites

quickmic

About 1 and 3 (crashes). Can you please disable the path substitution for a test. I don't know how this exactly works but when I have a look into your logs, seems to be a bit odd.

FileNFS::OpenForWrite() called with overwriting enabled! - //Thumbnails/8/8d598e6c.jpg

 

I'll also have a look again into this issue.

Edited by quickmic
Link to comment
Share on other sites

nuentes
1 hour ago, quickmic said:

About 1 and 3 (crashes). Can you please disable the path substitution for a test. I don't know how this exactly works but when I have a look into your logs, seems to be a bit odd.

FileNFS::OpenForWrite() called with overwriting enabled! - //Thumbnails/8/8d598e6c.jpg

 

I'll also have a look again into this issue.

I removed my advancedsettings.xml entirely and tested again, and had the same result for both 1 and 3. I've attached the log for the image cache crash. I also had a 4th issue, which I'll add to my prior post. I've mentioned it to you before. I continually received the prompt that my advancedsettings.xml had changed. I got it like 3 times in a row. And I get it like every 3-4 days. Except for today when I removed the file temporarily to test, the file has not been touched in more than a year.

kodi.old.log

Link to comment
Share on other sites

quickmic
23 minutes ago, nuentes said:

I removed my advancedsettings.xml entirely and tested again, and had the same result for both 1 and 3. I've attached the log for the image cache crash. I also had a 4th issue, which I'll add to my prior post. I've mentioned it to you before. I continually received the prompt that my advancedsettings.xml had changed. I got it like 3 times in a row. And I get it like every 3-4 days. Except for today when I removed the file temporarily to test, the file has not been touched in more than a year.

kodi.old.log 106.25 kB · 0 downloads

At least I found one issue, will be fixed in next version.

I'll release it tomorrow.

  • Thanks 1
Link to comment
Share on other sites

quickmic
33 minutes ago, nuentes said:

I removed my advancedsettings.xml entirely and tested again, and had the same result for both 1 and 3. I've attached the log for the image cache crash. I also had a 4th issue, which I'll add to my prior post. I've mentioned it to you before. I continually received the prompt that my advancedsettings.xml had changed. I got it like 3 times in a row. And I get it like every 3-4 days. Except for today when I removed the file temporarily to test, the file has not been touched in more than a year.

kodi.old.log 106.25 kB · 0 downloads

Also you still use path substitution.

Link to comment
Share on other sites

quickmic
12 minutes ago, nuentes said:

Yup. You're absolutely right. I moved the wrong file. My mistake. Did it again, and was once again able to reproduce both crashes.

kodi-error1.log 87.45 kB · 0 downloads kodi-error3.log 79.88 kB · 0 downloads

Please try this version

 

plugin.video.emby-next-gen-7.11.1-build 1.zip

Link to comment
Share on other sites

nuentes
9 minutes ago, quickmic said:

Playback from a widget is working again, but the metadata is hit-or-miss. About 50/50 videos playing with correct metadata/images, and videos playing with no metadata/images.

I didn't get a prompt that advancedsettings changed. I was able to get kodi to crash by scrolling through images. And I did not find a new setting to disable the free space check, which I think would be appreciated.

Link to comment
Share on other sites

quickmic
6 minutes ago, nuentes said:

Playback from a widget is working again, but the metadata is hit-or-miss. About 50/50 videos playing with correct metadata/images, and videos playing with no metadata/images.

I didn't get a prompt that advancedsettings changed. I was able to get kodi to crash by scrolling through images. And I did not find a new setting to disable the free space check, which I think would be appreciated.

try this version:

 

plugin.video.emby-next-gen-7.11.1-build 2 (ex1).zip

Link to comment
Share on other sites

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...