Kodi native "next episodes" widget
#1
One of my biggest pain points with kodi is, that there does not seem to be a performant "next episode" widget. There is of course the script.skin.helper.widgets and it works and I am very grateful that it exists, but for some reason (and my python is really not good enough yet to understand why) it is very slow. I have a mysql setup with ~ 7.500 episodes and it sometimes takes the widget more than 1 minute (form start of kodi), sometimes even more, to populate the widget (which is not bad, but it is simply not "nice" to watch the wait animation for a minute instead of watching the next episode).
I realize that the following sql does not sort by last seen shows, like script.skin.helper.widgets (which is very nice to have, but no "must) but with this quick select 
"SELECT strFileName, MIN(c12), MIN(c13) FROM episode_view WHERE episode_view.playCount IS NULL and c12 <> 0 GROUP BY idShow" I have results in 0.094 seconds. Also plex, emby & co have this list for me in instantaneaously.
For people that watch more than one show at the same time such a widget is a "must" in my opinion and - again - although I am very grateful for marcelveldt's work !! - I think a native and perfromant widget would be very, very great.

If there is already something like this, please point me in the right direction...
Reply
#2
Well there's add-ons like Lazy TV, or Up Next, then there's just the old Queue playlist handled with the keyboard q or simple Play All, not to  mention in settings 'Play next video automatically' and I knew nothing about 'script.skin.helper.widgets'
(2019-05-13, 16:32)hermann_x5 Wrote: is very slow. I have a mysql setup with ~ 7.500 episodes
Humm.. now let me think about that. I can assure you that keeping the show local, will have an almost instantaneous response.
Reply
#3
Tried a smart playlist?
Reply
#4
performant "next episode" widget to add to Categories
use script.skin.helper.widgets
make new node add path plugin

set plugin://script.skin.helper.widgets/?action=next&mediatype=episodes&reload=$INFO[Window(Home).Property(widgetreload)]
https://github.com/kodi-community-addons.../README.md


https://forum.kodi.tv/showthread.php?tid=344482
Reply
#5
(2019-06-15, 05:50)PatK Wrote: Well there's add-ons like Lazy TV, or Up Next, then there's just the old Queue playlist handled with the keyboard q or simple Play All, not to mention in settings 'Play next video automatically' and I knew nothing about 'script.skin.helper.widgets'
(2019-05-13, 16:32)hermann_x5 Wrote: is very slow. I have a mysql setup with ~ 7.500 episodes
Humm.. now let me think about that. I can assure you that keeping the show local, will have an almost instantaneous response. 

thanks for the many tips:

1.) Lazy TV: did not know this, but seems nice. Main problem: As I wrote I really want a *widget*. And that does not seem to be possible with LazyTV - or did I overlook something ?
2.) Up Next and Playlist: I do not want to binge watch, but start kodi and see what the next episode for the shows that I am currently watching is.
3.) The Skin.Helper.Widgets do exactly what I described in point 2 - but, unfortunately, it takes some time to fill the widgets - undependent on the skin I use (I tested with Estuary MOD V2, Bingie, Titan, Embuary), it's always a bit slow.
4.) "keeping it local": and what would be the use of this ? Having a centralized database and the media files on a NAS and a few clients around the house is essential for me. "Local only" Kodi would be absolutely useless for me...
Reply
#6
(2019-06-15, 08:33)the_other_guy Wrote: performant "next episode" widget to add to Categories
use script.skin.helper.widgets
make new node add path plugin

set plugin://script.skin.helper.widgets/?action=next&mediatype=episodes&reload=$INFO[Window(Home).Property(widgetreload)]
https://github.com/kodi-community-addons.../README.md


https://forum.kodi.tv/showthread.php?tid=344482
thanks for the tip. But as I wrote in my opening post, I use the skin helper widgets since at least a year and *love* them. However, I find them too slow. As they are not developed any more I was opening this post to suggest to implement this natively in Kodi....
Reply
#7
you could try a tv node
xml:
<?xml version='1.0' encoding='UTF-8'?>
<node order="1" type="filter">
 <label>nextup</label>
 <content>episodes</content>
 <limit>1</limit>
 <order direction="ascending">inprogress</order>
</node>
Reply
#8
(2019-06-24, 03:14)the_other_guy Wrote: you could try a tv node
xml:
<?xml version='1.0' encoding='UTF-8'?>
<node order="1" type="filter">
<label>nextup</label>
<content>episodes</content>
<limit>1</limit>
<order direction="ascending">inprogress</order>
</node>
hmm, have not yet tested this but for me that looks like it would give me episodes in progress, which I do not need. I want the next unplayed episode from all of the shows I am currently watching...
Reply
#9
(2019-06-24, 14:53)hermann_x5 Wrote:
(2019-06-24, 03:14)the_other_guy Wrote: you could try a tv node
xml:
<?xml version='1.0' encoding='UTF-8'?>
<node order="1" type="filter">
<label>nextup</label>
<content>episodes</content>
<limit>1</limit>
<order direction="ascending">inprogress</order>
</node>
hmm, have not yet tested this but for me that looks like it would give me episodes in progress, which I do not need. I want the next unplayed episode from all of the shows I am currently watching... 
You could use the in progress TV shows node/playlist as a widget.
In Kodi settings set "Flatten TV show seasons" to Always and "Select first unwatched TV Show season/episode" to Always.
It's 1 more click because it will open the window of the episodes, but the last unwatched episode will be auto-selected.
It's 2 clicks instead of 1, if you don't want to use Skin Helper Widgets this is the fastest way.
Reply
#10
None of the suggestions here will work as replacement for 'Next Episodes' in its current Skin Helper Widgets implementation.
'Next Episodes' logic is as far as I can remember:
1) Get all last played EPISODES sorted by last played
2) Extract from each TV SHOW only one EPISODE - the first unwatched - either the last episode played that has <1 playcount or the next first unwatched
3) Return list (is sorted by last played because of the first sort)

Now the big difference here is that it return EPISODES, and only one from each TV SHOW, that is either last played unwatched and resumable or first unwatched after that.

The closest built-in alternatives are:
1) in-progress tv shows sorted by last played, this comes close but it points to the tvshow not an episode
3) in-progress episodes/last played episodes - will return only resumable episodes and also can and will return more than one episode per tvshow depending on watch state meta

It will always be slower getting it from plugin based in comparison to native-based.
I have a decent but not big (200~ tv shows) LOCAL LIBRARY and this widget still takes a few seconds to load on decent machines.

I would actually improve upon the current 'next episodes' logic to fetch the last played resumable or the next episode after the last played, without consideration for playcount since I might have fell asleep and kodi kept running a few more episodes and I want to go back a few episodes OR I just want to rewatch it (if all episodes have >0 playcount they wouldn't show up in this widget anymore).
I'll probably implement it for skin helper widgets but my C++ is lacking unfortunately to achieve this for Kodi core.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi native "next episodes" widget1