Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
v19 Smart playlists for alternate versions of TV Shows (4K/3D/HDR etc)
#1
After lots of tinkering I don't think what I'm trying to do is actually possible at the moment but I'm hoping someone can confirm and then maybe I can raise it as a Feature Request.

For some movies and TV shows, I have separate 4K and 1080p versions.  There are a couple of reasons for this but the most prominent is that I only have a 4k TV upstairs in the den and the other 2 Kodi machines are 1080p old-ish NUCs which aren't capable of good 4k playback.  In order to keep each Kodi instance only showing content it can actually play, I use a Smart Playlist to separate 4K movies from their 1080p counterparts.  Something like this works perfectly:

xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>4K &amp; HDR Movies</name>
    <match>one</match>
    <rule field="filename" operator="contains">
        <value>2160p</value>
    </rule>
    <rule field="filename" operator="contains">
        <value>HDR</value>
    </rule>
    <group mixed="true">sets</group>
    <order direction="ascending">title</order>
</smartplaylist>

Another Smart Playlist then simply lists all movies that aren't in the above playlist.  TV Shows on the other hand don't seem to allow this.  Firstly, there's no option to look at filenames for TV and I understand why that is, a single TV show will reference multiple files and may include a mix of formats making this messy.  There is a "path" option though and I thought this would do the trick but unfortunately not.  If I leverage the 'path' field like so:

xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>4K TV</name>
    <match>one</match>
    <rule field="path" operator="startswith">
        <value>smb://192.168.0.3/4K/TV/</value>
    </rule>
    <order direction="ascending">title</order>
</smartplaylist>
 

I get some of the results back correctly but not all.  As long as the 4k version of the show is the only version in my library, it shows up.  If there's a 1080p version as well though, that show does not appear in the playlist above.  I think this thread is asking the same question but it went unanswered.  This is an issue on Windows and Linux and is the same from Krypton through to the current Matrix nightlies.  Can anyone shed any light on this?  Thanks!
Reply
#2
Have you tried changing from match one to match all ?    Do you have the second playlist that does the exclusion?   I do this a lot to filter out Standup from Movies and TV records from downloads so I do have it working.
KODI Nexus - CoreELEC everywhere on Ugoos AM6 Plus&Pro, Plex Server, HDHomerun with TVHeadend on my NAS.
Reply
#3
I'm sure you're trying to help and thanks for having a go but you haven't read my post properly if you think this is the issue.  Firstly, why suggest match one/all when the issue occurs with only a single criteria (a path)?  One/all isn't applicable.

Secondly, the TV Show example I give does work but only if the show is unique in the database.  If another instance of the show exists elsewhere in the database e.g. a 1080p copy on another share/drive, it's not included in the results.  I assume this is a limitation of the database structure and that somewhere, in one of the tables/views a TV Show can only have one 'master' path but I'm not sure.

So just to re-iterate, if I deleted all the 1080p versions of my shows, the 4k/HDR playlist would work absolutely fine, it's only when you have 2 versions/formats of the same show in your database that you'll hit this problem.
Reply
#4
(2019-08-24, 11:57)beeswax Wrote: I'm sure you're trying to help and thanks for having a go but you haven't read my post properly if you think this is the issue.  Firstly, why suggest match one/all when the issue occurs with only a single criteria (a path)?  One/all isn't applicable.
 
I did read the post and have just read again in case I missed something.  The point I was making is that I do a similar thing on some lists but have mine set to 'all'.  It could have been it finds a first entry then exits the query rather than reading all results before filtering. The path would restrict the overall result sets.   

But that isn't the case ... as I just created a test set up with sample files to prove it.  Essentially your point about database limitation is it - the path held in the database is against the show and there is only one row for that in the tvshows table. The tvshow_view then only sees the one row.

You could do this with the resolution instead. Create a playlist of all 4 K episodes then nest that into a show level one to pull out shows with 4K episodes. And put an excludes in the othe playlist to ignore the episodes. With a match all.
KODI Nexus - CoreELEC everywhere on Ugoos AM6 Plus&Pro, Plex Server, HDHomerun with TVHeadend on my NAS.
Reply
#5
(2019-08-24, 21:17)jeffski10 Wrote:
(2019-08-24, 11:57)beeswax Wrote: I'm sure you're trying to help and thanks for having a go but you haven't read my post properly if you think this is the issue.  Firstly, why suggest match one/all when the issue occurs with only a single criteria (a path)?  One/all isn't applicable.
 
The point I was making is that I do a similar thing on some lists but have mine set to 'all'.  It could have been it finds a first entry then exits the query rather than reading all results before filtering. The path would restrict the overall result sets.    
Yeah, I still don't know where you're going with this, one/all applies to <rule> nodes in the XML - if you set it to 'one' then the results only have to match one rule.  If you set it to 'all', results must match all rules.  So in cases like my '4K TV' example, where there is only 1 rule, one/all has zero effect.  one/all is nothing to do with how many matches you get back from a rule, it's about how many rules the results must match.

Anyway, I had a quick try with using resolution of episodes in rules and it's a bit wonky.  I was getting very few results but I found that if I browsed into the a TV show that was missing, forcing Kodi to run whatever MediaInfo lookup it does, that episode then gets added to the results.  Effectively, this means having to manually browse into each 4k show/episode to populate the required metadata.  I believe this can only be circumvented if your entire library is nfo'd up with full MediaInfo stats for every episode.

Edit: ok, I can get all 4k episodes using the 'File' rule rather than resolution (File contains 2160p), I'm just trying to work out your nesting scenario for the rest.
Reply
#6
(2019-08-24, 21:17)jeffski10 Wrote:
(2019-08-24, 11:57)beeswax Wrote: I'm sure you're trying to help and thanks for having a go but you haven't read my post properly if you think this is the issue.  Firstly, why suggest match one/all when the issue occurs with only a single criteria (a path)?  One/all isn't applicable.
 
then nest that into a show level one to pull out shows with 4K episodes. And put an excludes in the othe playlist to ignore the episodes. With a match all.
This is the bit I can't work out - how do you do that?  I've got a playlist that gives me all 4K episodes (File contains 2160p) but how do I get from there to a listing of the actual shows?  I don't think it's possible, at least not in a way that only show the 4k versions of the episodes when viewing as a show.
Reply
#7
For resolution I've always gone with greater than 1920. Tends to find entries even for movies which are not cleanly 16:9.

Home this morning so I could try out referencing the 4K playlist in a shows one and nothing outputs. Seems like there isn't a clean way with the library to do this. 

I did think of creating separate video nodes and then you could only include the relevant one in the menus but it still fails with filename. 

Are you using a shared or separately library? I was thinking about creating multiple sources for importing and then ignore the 4K one on the NUC's.
KODI Nexus - CoreELEC everywhere on Ugoos AM6 Plus&Pro, Plex Server, HDHomerun with TVHeadend on my NAS.
Reply
#8
@beeswax

A little bit confused with your setup.

Do you have...

1. Two identical tv shows listed in your library complete with episodes, the only difference between the two is their resolution
2. You have one tv show in your library and in that listing you have every episode duplicated, the only difference being their resolution
3. You have on tv show and the episodes are a mix of 1080p and 4k, some episodes are one or the other, other episodes might have both
3. None of the above. Explain further.
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
Hello Karellen,

Pretty much mostly 2. For some shows I have only a 4k version but there's no issue with those.  The problem only exists for content in scenario 2.

Because only 1 room in the house has 4k/HDR capability, I'll often have a 1080p version of the whole show for evenings when I'm watching on the old NUCs and a 4k version as well for if I'm watching in the den/office.

The problem occurs when I try to create a Smart Playlist based on 'path' to show only one or the other (see the '4K TV' example in my first post). All my 4k stuff is on a separate drive/share so this should be really simple but it seems Kodi will only store one path for a TV Show, even if it exists in duplicate in another location.  Because of this, the Smart Playlist for '4K TV' only returns shows that are uniquely on the 4k drive/share.  Anything that falls under your scenario 2. does not appear in the '4K TV' playlist.  I hope this makes sense, I can see why it would seem like a total mess looking in from the outside but it's not as complicated as it sounds.
Reply

Logout Mark Read Team Forum Stats Members Help
Smart playlists for alternate versions of TV Shows (4K/3D/HDR etc)0