MoojMidge / service.upnext

GNU General Public License v2.0
19 stars 5 forks source link

A question about Next-up episode listing #5

Closed notoco closed 1 year ago

notoco commented 1 year ago

Next-up episode listing - works great - the widget that I set up updates really quickly and without errors. Unfortunately - opening an item from this list causes that the next-up window is not displayed. I hope that full integration is planned?

MoojMidge commented 1 year ago

I'm surprised anyone is using this. Is the automatic credits detection working for you?

Regarding the widget, does it work if you play those same items from your library directly, rather than through the widget? Further integration shouldn't be necessary, but there may be a problem elsewhere.

A log will help identify what the problem may be.

notoco commented 1 year ago

I have been using it for a long time ;) More than one year :) (https://github.com/notoco/univk19/tree/master/zip/service.upnext - my own repo for testing many addons - don't look at commits - because I make a lot of mistakes - I undo, restore, test.) Automatic credits detection - I haven't checked in a long time - because it used to cause Ambilght lights (Coreelec + hyperion) to flash at the end of the episode, which was quite annoying. But then I had other box (s905x3 - now s922x) - and it worked. I will try to check.

As for this new feature - when played directly from the video add-ons -> upnext - everything works. However, it does not work with the widget in the skin (Arctic Horizon). I mainly use the kodi library, based on strm files - normally everything works great - only from the widget it won't work. I'll try to send the log tomorrow.

BTW - For my own use, I changed this part of the code. Gives better results on Disney / Netflix series (I have disabled integration in those plugins - I use it through the kodi library)

<setting label="30617" type="slider" id="autoPlaySeasonTime" default="10" range="5,5,600" option="int" subsetting="true" visible="eq(-1,false)"/>
<setting label="30619" type="slider" id="autoPlayTimeXS" default="15" range="5,5,600" option="int" subsetting="true" visible="eq(-2,true)"/>
<setting label="30621" type="slider" id="autoPlayTimeS" default="30" range="5,5,600" option="int" subsetting="true" visible="eq(-3,true)"/>
<setting label="30623" type="slider" id="autoPlayTimeM" default="40" range="5,5,600" option="int" subsetting="true" visible="eq(-4,true)"/>
<setting label="30625" type="slider" id="autoPlayTimeL" default="50" range="5,5,600" option="int" subsetting="true" visible="eq(-5,true)"/>
<setting label="30627" type="slider" id="autoPlayTimeXL" default="60" range="5,5,600" option="int" subsetting="true" visible="eq(-6,true)"/>

and use this settings in addon:

<setting id="autoPlayTimeXS">120</setting>
<setting id="autoPlayTimeS">180</setting>
<setting id="autoPlayTimeM">180</setting>
<setting id="autoPlayTimeL">420</setting>
<setting id="autoPlayTimeXL">480</setting>

Great job with this plug - I check what's new every day;)

MoojMidge commented 1 year ago

That sounds like this problem: https://github.com/im85288/service.upnext/issues/255

I thought I had worked around it, but I recently changed some of the related code to try and reduce the number of JSON-RPC queries, so may have introduced some regressions.

Good news is that @CastagnaIT might have fixed one of the underlying problems in Kodi itself (https://github.com/xbmc/xbmc/pull/21667).

In the meantime send a log through and I'll check if I have missed something.

Regarding the time delay settings, one of the benefits to having the detector is that you don't need to extend the other timers. Just let the detector do its job, assuming it works, and then it doesn't really matter what the fixed timer delays are set to.

    <setting id="autoPlayCountdown">5</setting>
    <setting id="customAutoPlayTime">true</setting>
    <setting id="autoPlaySeasonTime">10</setting>
    <setting id="autoPlayTimeXS">15</setting>
    <setting id="autoPlayTimeS">30</setting>
    <setting id="autoPlayTimeM">40</setting>
    <setting id="autoPlayTimeL">50</setting>
    <setting id="autoPlayTimeXL">60</setting>
    <setting id="detectPlayTime">true</setting>
    <setting id="detectPeriod">180</setting>

I use it on an Amlogic s922x box with CoreELEC too, and it works reasonably well, was looking to see if it worked on other low powered devices (Raspberry Pi, Fire TV, or Nvidia Shield, etc).

notoco commented 1 year ago

I tested the detection on a few episodes of Family Guy yesterday, it worked great, the hyperion didn't flash the lights. What type of logs to send? Info/Debugging - or full logs from kodi?

notoco commented 1 year ago

Maybe an explanation of the main problem. I only use strm files (made by various add-ons - Osmosis). If I play directly from the library, everything works. If I play via UpNext / Last episodes ... - everything works. However, if I play through the widget created in the skin, leading to UpNext / last episode ... - does not work - the window does not pop up (when setting the time to a hard, as well as when setting auto-detection). The problem is probably in calling up the episode from the widget. I've seen it somewhere (or reported it to the first UpNext developer) - but can't find it ///edit: - ok, I have - I found the same PR Skin - AH by JurialMunkey https://github.com/jurialmunkey/skin.arctic.horizon

notoco commented 1 year ago

Ok, I read this PR - let's wait until the stable 19.5 comes out and then it will be tested.

MoojMidge commented 1 year ago

You can send through a Kodi debug log, or alternatively change the logging settings in the UpNext settings (Expert > Troubleshooting > Log Level) to Debug. Send the log through after trying to play something from the widget and observing that the UpNext popup doesn't show up.

Edit: it would be useful to send through a log prior to the 19.5 release, as this may not be the actual fix for the problem.

notoco commented 1 year ago

Ok.

notoco commented 1 year ago

From widget: https://gist.github.com/notoco/742602964c01723c1f9aaaae42256027

From library: https://gist.github.com/notoco/8fe6bb6c4088a31fb9aa21ba62fe981e

(using autodetect - works awsome)

MoojMidge commented 1 year ago

It seems like this is a slightly different problem. While the video playback is still using the music player, this is correctly detected by the script.

For some reason on your system the JSON-RPC response when checking what is actually playing takes a long time to produce a valid response. Must be some combination of using strm files, the use of the PlayMedia builtin function, and maybe slow network/storage access. I was only able to replicate this once, all other times the current 3 retries with 1 second delay between attempts was eventually able to get the correct information.

I have changed the delay to 2s between attempts and added an addon setting (Expert > Troubleshooting > Kodi JSON-RPC retry attempts) to be able to increase the number of retry attempts. Try increasing that value and seeing if playback from the widget now works.

notoco commented 1 year ago

The connection is fast - local 1000Mb / s - outside 300Mb / s. But - strm files either lead directly to plugins like Netflix / Amazon / Disney - where it takes a while to start playing, or to, say, the "aggregator" that we often use in Poland - FanFilm - which calls up sources from various plugins (so I don't wonder if movie / series is in Netflix / Hbo / Disney / Amazon) and then runs this plugin. I'll try. But the difference is only when running from the widget - directly from the library (or from UpNext / next episodes ...) - the second log - it works.

notoco commented 1 year ago

It works! I set the maximum for 10 seconds - started from the widget, waited a moment, scrolled closer to the end, upnext popped out, another and another and another started. Great addon - great dev :) I'll check Polish translation ;)