Smart playlists and video nodes issue

Hi guys

I have a problem with definition of a smart playlist or video node for a tv show stored in different sources and with same names. The reason why I have one tvshow in multiple sources really doesn’t matter (2D vs 3D, SD vd UHD, anotler languages etc.). In this cases (meaning duplicates in tvshow names) my filters or video nodes do not work correctly.

Let me explain this by an example… I have two folders containing one tv show with two episodes:

Code:
D:\MEDIA
+---tvshows_source_A
|   \---Arrow (2012)
|           S01E01.strm
|           S01E02.strm
|          
\---tvshows_source_B
    \---Arrow (2012)
            S01E01.mkv
            S01E02.mkv

I defined both folders as separated sources and I let them scan by tvdb.com scraper. Sources:

Code:
<source>
    <name>tvshows_source_A</name>
    <path pathversion="1">D:\media\tvshows_source_A\</path>
    <allowsharing>true</allowsharing>
</source>
<source>
    <name>tvshows_source_B</name>
    <path pathversion="1">D:\media\tvshows_source_B\</path>
    <allowsharing>true</allowsharing>
</source>

Now, I can see the Arrow in Tv Show section and there are four episodes. Yes! That correct because in database are four rows in episodes table: two for source ‘tvshows_source_A’ and two for ‘tvshows_source_B’. This is expected behavior.

[Image: arrow_kodi_tvshow_small.png]

So let’s make two smart playlists for each source:

Code:
+---playlists
|   \---video
|           tvshows_A.xsp
|           tvshows_B.xsp

tvshows_A.xsp:

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>tvshows_source_A</name>
    <match>all</match>
    <rule field="path" operator="contain">
        <value>tvshows_source_A</value>
    </rule>
</smartplaylist>

tvshows_B.xsp:

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>tvshows_source_B</name>
    <match>all</match>
    <rule field="path" operator="contain">
        <value>tvshows_source_B</value>
    </rule>
</smartplaylist>

Unfortunately neither of those filters seemed to work. I expected one tv show with two episodes for each one filter but result is really curious. You can see in screen shots:

[Image: arrow_kodi_tvshow_playlist_A_small.png] [Image: arrow_kodi_tvshow_playlist_B_small.png]

I really don’t know why result is incorrect maybe the rules defined in the smart filter are evaluated incorrectly or a sql query is wrong. Records in the video database seem to be okay, so why filters does not work properly is a mystery for me.

There are screen shots from database (MyVideos107.db):

[Image: arrow_sql_01_small.png] [Image: arrow_sql_02_small.png] [Image: arrow_sql_03_small.png] [Image: arrow_sql_04_small.png]

So my question is: Is this a bug or a behavior?

Note: please do not tell me that is a feature Smile

I tried example described above on clean installation of Krypton (17.1 RC2) and I attach “MyVideos107.db” file, both tv show sources (zero len files) and smart filters.

Attachments:
MyVideos107.rar
media.rar
playlists.rar