Smart Playlist That Finds 30 Minute TV Shows
#1
I would like to create a smart playlist that finds all TV shows that are half hour based (vs the hour long TV shows).  I can't find any information on the episode "Time" field.  Is this the total time of the episode?  In progress time?

Has anyone already created such a playlist?  Is there a central place where playlists have been uploaded and saved?

Any help is appreciated.
Reply
#2
You should look under episodes then you will also find durations for episodes.
Reply
#3
According to this the time value should be in HH:MM:SS format but I've tested that here on Nexus and it's not working for me.  This xsp seems to return all episodes, I think.  If it's not all episodes, it certainly contains lost of episodes over 30 minutes.

xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>Episodes under 30m</name>
    <match>any</match>
    <rule field="time" operator="lessthan">
        <value>00:31:00</value>
    </rule>
</smartplaylist>

Other references here.
Reply
#4
I was able to get the half hour episodes to work (that is a huge list).  I was hoping to use "tv shows" and not "episodes" for the type of playlist.  Looks like this is impossible to do (create a TV Show playlist containing only half hour shows).
Reply
#5
Can you post your xsp?  The one I came up with is returning episodes much longer than 30 mins.  I tried seconds, minutes, HH:MM and HH:MM:SS for the value and it didn't seem to work right with any of them.
Reply
#6
(2023-01-11, 10:59)beeswax Wrote: Can you post your xsp? 
This works for me...
xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
<name>30 minutes</name>
<match>all</match>
<rule field="time" operator="lessthan">
<value>00:30:00</value>
</rule>
</smartplaylist>
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#7
(2023-01-11, 11:58)Karellen Wrote:
(2023-01-11, 10:59)beeswax Wrote: Can you post your xsp? 
This works for me...

Are you sure?  Your one and the one I posted both work as far as they return a list of episodes but the results don't look correct at all.  There are lots of episodes in the returned list longer than 30 minutes e.g. 43 minutes.
Reply
#8
(2023-01-11, 15:46)beeswax Wrote: Are you sure? 
Yep.
Although I didn't check every single episode as there are close to a thousand, looking at the tv shows they belong to confirms they come from the shorter type episodes - The Big Bang Theory, I am Groot, The Neighbours, Futurama etc

I noticed you used <match>any</match> whereas I used <match>all</match>
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#9
(2023-01-11, 21:55)Karellen Wrote:
(2023-01-11, 15:46)beeswax Wrote: Are you sure? 
Yep.
Although I didn't check every single episode as there are close to a thousand, looking at the tv shows they belong to confirms they come from the shorter type episodes - The Big Bang Theory, I am Groot, The Neighbours, Futurama etc

I noticed you used <match>any</match> whereas I used <match>all</match>
OK, weird, I'm not sure how/why it works for you.  I tried your full xsp copied/pasted into a new playlist and it returns what looks like all episodes just the same as mine does.  Maybe it's not all episodes, I have too many to count but it definitely returns episodes longer than 30 mins.  Some of the examples I picked out were close to an hour.

edit: I use MySQL, maybe that stores the episode data differently and doesn't support the time attribute in Smart Playlists?
Reply
#10
(2023-01-11, 22:17)beeswax Wrote: edit: I use MySQL, maybe that stores the episode data differently and doesn't support the time attribute in Smart Playlists?
Possibly, but I don't really know. I've never touched MySQL.

Check C09 in the episode table. Then check iVideoDuration in the streamdetails table. Both are in seconds. Is there a difference?
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#11
Well over half of my c09 column in the episodes table is zeroes, is this one of those attributes that only gets checked and entered into the db when you access the episode in some way via the Kodi GUI?

SELECT * FROM episode:
39,707 results

SELECT * FROM episode WHERE c09 = 0
23,306 results
Reply
#12
(2023-01-11, 23:02)beeswax Wrote: Well over half of my c09 column in the episodes table is zeroes
That should be ok. The value in the StreamDetails table has priority.
IIRC, the episode value is scraped, the streamdetails value is from the actual video file, and overrides the scraped value.

Can't think of any other discrepancy that would cause your playlist to list non-conforming episodes.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#13
I know this is an old thread, but I'm seeing the same behavior on Kodi 20.3
My Smart Playlist
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>Short TV Shows</name>
    <match>all</match>
    <rule field="playlist" operator="is">
        <value>LazyTV</value>
    </rule>
    <rule field="time" operator="lessthan">
        <value>00:20:00</value>
    </rule>
</smartplaylist>

In my case the MySQL DB also has empty value for
Episode View
Image

Streamdetails is also mostly empty
Image

When I enter 00:20:00, I don't even see short TV episodes. Just hour long or so
When I enter 01:20:00, it then shows all the previous shows plus shorter shows like 25 minutes
Reply
#14
It look to be an issue if you have more than 1 rule

This doesn't work
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>Short TV Shows</name>
    <match>all</match>
    <rule field="playcount" operator="is">
        <value>0</value>
    </rule>
    <rule field="time" operator="lessthan">
        <value>35:00</value>
    </rule>
</smartplaylist>

This does work
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>Short TV Shows</name>
    <match>all</match>
    <rule field="time" operator="lessthan">
        <value>35:00</value>
    </rule>
</smartplaylist>
Reply
#15
edit: ok, ok, I've got it, kind of.  It turns out I have to browse into a show in the server before it will update the c09 value.  New question - is there a way to get Kodi to grab all this info with out have to browse into 1,000 shows on my server?

Bringing up this old one with some new info on my setup.  If I create a playlist that queries only "Time", I still get most of my db returned as results.  The very first results is s01e01 of 24: Legacy which is 42 mins.  If I use Karellen's tip about checking the db values, this file (fileID=1) has no duration in C09 in the episode table and isn't even present in the streamdetails table.  When I browse to the episode and Info it - there's no duration displayed there either.

I have a feeling the answer is "You need to rescan your entire library" but is there a way to just populate the streamdetails table without doing that?  The server that does all the library scanning/updating already has the "Extract video information from files" option enabled.
Reply

Logout Mark Read Team Forum Stats Members Help
Smart Playlist That Finds 30 Minute TV Shows0