Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
v19 Cannot get Smart Playlists to properly split content
#1
I've been able to properly split my UHD and HD/SD movies using either a custom library node or a smart playlist. That's worked out flawlessly, especially since I can split it based on resolution size. I cannot, however, get my TV episodes to behave the same way. I've tried multiple methods, and each time I keep getting the TV episodes in either my HD/SD category or I get them in the UHD category. I cannot keep them separated, and it's really frustrating. I'm using a MySQL DB backend, as I have multiple clients I want this connecting to. This is what my current Smart Playlists look like:

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>4K TV Shows</name>
    <match>all</match>
    <rule field="path" operator="doesnotcontain">
        <value>nfs://192.168.1.18/mnt/media/tv/</value>
    </rule>
    <rule field="playlist" operator="isnot">
        <value>TV Shows</value>
    </rule>
    <order direction="ascending">sorttitle</order>
</smartplaylist>
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>TV Shows</name>
    <match>all</match>
    <rule field="path" operator="doesnotcontain">
        <value>nfs://192.168.1.18/mnt/media/uhd/tv/</value>
    </rule>
    <rule field="playlist" operator="isnot">
        <value>4K TV Shows</value>
    </rule>
    <order direction="ascending">sorttitle</order>
</smartplaylist>

Things I've done:
  • Created custom library nodes for both libraries using either resolution or path.
  • Created Smart Playlists, as seen above.
  • Changed from TheTVDb to The TVDb (New) for either of the libraries.
  • Tried refreshing both libraries for each of the TV shows that are in both UHD and HD/SD.
  • Wiping MySQL Video DB and starting over.
None of which have worked for what I want, and I'm pulling my hair out. is what I want just not possible using Kodi, which would seem crazy, or am I missing something (semi) obvious?
Reply
#2
oml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
<name>4K TV</name>
<match>all</match>
<rule field="videoresolution" operator="greaterthan">
<value>1080</value>
</rule>
<order direction="ascending">sorttitle</order>
</smartplaylist>
oml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
<name>HD/SD TV</name>
<match>all</match>
<rule field="videoresolution" operator="lesserthan">
<value>1080</value>
</rule>
<order direction="ascending">sorttitle</order>
</smartplaylist>
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#3
(2021-07-06, 13:09)Lunatixz Wrote: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <smartplaylist type="tvshows">
<name>HD/SD TV</name>
<match>all</match>
<rule field="videoresolution" operator="lesserthan">
<value>1080</value>
</rule>
<order direction="ascending">sorttitle</order>
</smartplaylist>

When I try that, I'm unable to browse into the playlist. It just doesn't respond to the "Enter" key.

Try lessthan rather than lesserthan.
Reply
#4
I tried changing it to lessthan instead of lesserthan (as your edit to my post suggested), however I don't think it's related to that. I turned on debug logging and I'm seeing this:

Code:
2021-07-06 19:42:23.544 T:1183289   ERROR <general>: SQL: [MyVideos119] Undefined MySQL error: Code (1054)
                                                   Query: SELECT * FROM tvshow_view  WHERE ((tvshow_view.idFile IN (SELECT DISTINCT idFile FROM streamdetails WHERE iVideoWidth > 1920)))
                                                   
2021-07-06 19:42:23.544 T:1183289   ERROR <general>: GetTvShowsByWhere failed
2021-07-06 19:42:23.544 T:1183289   ERROR <general>: GetDirectory - Error getting special://profile/playlists/video/4K TV Shows.xsp
2021-07-06 19:42:23.544 T:1183289   DEBUG <general>: Thread waiting 139730100410112 terminating
2021-07-06 19:42:23.548 T:1183213   ERROR <general>: CGUIMediaWindow::GetDirectory(special://profile/playlists/video/4K TV Shows.xsp) failed
2021-07-06 19:42:23.548 T:1183213   DEBUG <general>: CGUIMediaWindow::GetDirectory (special://videoplaylists/)
2021-07-06 19:42:23.548 T:1183213   DEBUG <general>:   ParentPath = []
2021-07-06 19:42:23.548 T:1183290   DEBUG <general>: Thread waiting start, auto delete: false
2021-07-06 19:42:23.548 T:1183290   DEBUG <general>: CMultiPathDirectory::GetDirectory(multipath://special%3a%2f%2fprofile%2fplaylists%2fvideo/special%3a%2f%2fprofile%2fplaylists%2fmixed/)
2021-07-06 19:42:23.548 T:1183290   DEBUG <general>: Getting Directory (special://profile/playlists/video)
2021-07-06 19:42:23.549 T:1183290   DEBUG <general>: Getting Directory (special://profile/playlists/mixed)
2021-07-06 19:42:23.549 T:1183290   DEBUG <general>: CMultiPathDirectory::MergeItems, items = 4
2021-07-06 19:42:23.549 T:1183290   DEBUG <general>: Testing path: [000] special://profile/playlists/video/4K Movies.xsp
2021-07-06 19:42:23.549 T:1183290   DEBUG <general>: Testing path: [001] special://profile/playlists/video/4K TV Shows.xsp
2021-07-06 19:42:23.549 T:1183290   DEBUG <general>: Testing path: [002] special://profile/playlists/video/TV Shows.xsp
2021-07-06 19:42:23.549 T:1183290   DEBUG <general>: CMultiPathDirectory::MergeItems, items = 4,  took 0 ms
2021-07-06 19:42:23.549 T:1183290   DEBUG <general>: Thread waiting 139730100410112 terminating
2021-07-06 19:42:23.552 T:1183291   DEBUG <general>: Thread BackgroundLoader start, auto delete: false
2021-07-06 19:42:23.552 T:1183291   DEBUG <general>: connect replacing configured host 192.168.1.17 with resolved host 192.168.1.17
2021-07-06 19:42:23.561 T:1183291   DEBUG <general>: Thread BackgroundLoader 139731174151936 terminating
2021-07-06 19:42:24.285 T:1183213   DEBUG <general>: Keyboard: scancode: 0x74, sym: 0x274, unicode: 0x0000, modifier: 0x0
2021-07-06 19:42:24.285 T:1183213   DEBUG <general>: HandleKey: down (0xf081) pressed, action is Down
2021-07-06 19:42:24.368 T:1183213   DEBUG <general>: Keyboard: scancode: 0x74, sym: 0x274, unicode: 0x0000, modifier: 0x0
2021-07-06 19:42:24.702 T:1183213   DEBUG <general>: Keyboard: scancode: 0x24, sym: 0x13, unicode: 0x000d, modifier: 0x0
2021-07-06 19:42:24.803 T:1183213   DEBUG <general>: Keyboard: scancode: 0x24, sym: 0x13, unicode: 0x0000, modifier: 0x0
2021-07-06 19:42:24.803 T:1183213   DEBUG <general>: HandleKey: return (0xf00d) pressed, action is Select
2021-07-06 19:42:24.803 T:1183213   DEBUG <general>: CGUIMediaWindow::GetDirectory (special://profile/playlists/video/TV Shows.xsp)
2021-07-06 19:42:24.803 T:1183213   DEBUG <general>:   ParentPath = [special://videoplaylists/]
2021-07-06 19:42:24.803 T:1183292   DEBUG <general>: Thread waiting start, auto delete: false
2021-07-06 19:42:24.803 T:1183292   DEBUG <general>: connect replacing configured host 192.168.1.17 with resolved host 192.168.1.17
2021-07-06 19:42:24.812 T:1183292   DEBUG <general>: This query part contains a like, we will double backslash in the next field:  LIKE '
2021-07-06 19:42:24.813 T:1183292   ERROR <general>: SQL: [MyVideos119] Undefined MySQL error: Code (1054)
                                                   Query: SELECT * FROM tvshow_view  WHERE ((tvshow_view.idFile IN (SELECT DISTINCT idFile FROM streamdetails WHERE iVideoWidth )))
                                                   
2021-07-06 19:42:24.813 T:1183292   ERROR <general>: GetTvShowsByWhere failed
2021-07-06 19:42:24.813 T:1183292   ERROR <general>: GetDirectory - Error getting special://profile/playlists/video/TV Shows.xsp
2021-07-06 19:42:24.813 T:1183292   DEBUG <general>: Thread waiting 139730100410112 terminating
2021-07-06 19:42:24.816 T:1183213   ERROR <general>: CGUIMediaWindow::GetDirectory(special://profile/playlists/video/TV Shows.xsp) failed
2021-07-06 19:42:24.816 T:1183213   DEBUG <general>: CGUIMediaWindow::GetDirectory (special://videoplaylists/)
2021-07-06 19:42:24.816 T:1183213   DEBUG <general>:   ParentPath = []
2021-07-06 19:42:24.816 T:1183293   DEBUG <general>: Thread waiting start, auto delete: false

According to my attempt to Google it, it looks like the column doesn't exist in MySQL, which doesn't make sense.

EDIT: Additionally, I tried using the SQLite DB instead of MySQL, and this is what I get when I try to activate the Smart Playlist for SD/HD TV:

Code:

2021-07-06 20:10:09.243 T:1186195    INFO <general>: Loading skin file: Home.xml, load type: KEEP_IN_MEMORY
2021-07-06 20:10:12.751 T:1186195   ERROR <general>: SQL: [MyVideos119.db] SQLite error SQLITE_ERROR (no such column: tvshow_view.idFile)
                                                   Query: SELECT * FROM tvshow_view  WHERE ((tvshow_view.idFile IN (SELECT DISTINCT idFile FROM streamdetails WHERE iVideoWidth < 1281)))
2021-07-06 20:10:12.751 T:1186195   ERROR <general>: GetTvShowsByWhere failed
2021-07-06 20:10:12.751 T:1186195   ERROR <general>: GetDirectory - Error getting special://profile/playlists/video/TV Shows.xsp
2021-07-06 20:10:12.752 T:1186195   ERROR <general>: CGUIMediaWindow::GetDirectory(special://profile/playlists/video/TV Shows.xsp) failed
2021-07-06 20:10:13.020 T:1186332   ERROR <general>: GetDirectory - Error getting
2021-07-06 20:10:18.677 T:1186431   ERROR <general>: Skipped 3 duplicate messages..
Reply
#5
My bad, "TVShow" type does not offer sort by resolution use the following, tested and working...

xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>HD/SD Episodes</name>
    <match>all</match>
    <rule field="videoresolution" operator="lessthan">
        <value>2160</value>
    </rule>
</smartplaylist>

xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>HD/SD TV Shows</name>
    <match>all</match>
    <rule field="playlist" operator="is">
        <value>HD/SD Episodes</value>
    </rule>
</smartplaylist>
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#6
OK, cool, and then I'd do something similar for the 4K episodes?
Reply
#7
(2021-07-06, 22:01)Offsprin Wrote: OK, cool, and then I'd do something similar for the 4K episodes?

Yes...
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#8
I'm doing something wrong, because I got the HD/SD to work, but I can't get Kodi to read the 4K TV Episodes playlist. I've got all 4 created, but if I try to search for the playlist, all I get in the options is HD/SD Playlist. This is what my files look like:

xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>4K TV Shows</name>
    <match>all</match>
    <rule field="playlist" operator="is">
        <value>4K TV Episodes</value>
    </rule>
</smartplaylist>

xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>4K TV Episodes</name>
    <match>all</match>
    <rule field="videoresolution" operator="greaterthan">
        <value>1080</value>
    </rule>
</smartplaylist>

xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>HD/SD Episodes</name>
    <match>all</match>
    <rule field="videoresolution" operator="lessthan">
        <value>2160</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>/mnt/media/uhd/tv/</value>
    </rule>
</smartplaylist>

xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>HD/SD TV Shows</name>
    <match>all</match>
    <rule field="playlist" operator="is">
        <value>HD/SD Episodes</value>
    </rule>
</smartplaylist>
Reply
#9
Any idea why I can only get the HD/SD episodes playlist to show up in the 4K TV Shows playlist, even though I'm telling it to use the 4K Episodes smart playlist?
Reply
#10
As an update, if I split the shows by folder, I can get most of them to properly show up in the 4K Smart Playlist, however the metadata and amount of episodes will not show up in the HD/SD playlist. If I refresh the metadata in the HD/SD playlist, the episodes will disappear from the 4K Playlist, so something is just refusing to let me have two copies of the same show, even though Kodi knows there's two different files and paths.
Reply
#11
(2021-07-08, 20:54)Offsprin Wrote: so something is just refusing to let me have two copies of the same show

There's your problem. You can't have 2 versions of the same show in your library.
Reply

Logout Mark Read Team Forum Stats Members Help
Cannot get Smart Playlists to properly split content0