Help to get "own" ordering in a movie smart playlist (using rule field="path")
#1
Help to get "own" ordering in a movie smart playlist using rule field="path" once for every movie in the list

I'm using Kodi 19.4 stable in Android.
What I'm trying to do?
I'm using a bash script (could be a nice start-idea for a Kodi-Plugin) which:
-get some movie list from a website (imdb-official, imdb-userlists, icheckmovies, goodmovieslist etc)
-looks in my movie-library if the movies from list are available
-build a xsp smart-list with all available movies
-buld a text file with missing movies from the list
-copy the xsp file to Kodi playlist folder
Sometimes the ordering in such lists is not important but sometimes it really make sense to have/keep the ordering from the original list from web (like "IMDb's Top 250" or "Rotten Tomatoes's Top 100 Movies of All Time").

Here are some examples i have generated:
-using "one" match and "more" rules
xml:


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
     <name>IMDb's Top 250</name>
     <!-- The IMDb top 250 is probably the most well-known movie list in the world. It
has earned this reputation through the fact that it has been composed by
aggregating the votes of many normal moviegoers. In other words, this is a list
by and for the people and not some elite movie-critics list. -->
     <match>one</match>
        <rule field="path" operator="is">
          <value>nfs://192.168.178.100/export/MOVIE1/The.Shawshank.Redemption[1994]/</value>
        </rule>
        <rule field="path" operator="is">
          <value>nfs://192.168.178.100/export/MOVIE0/The.Godfather[1972]/</value>
        </rule>
        <rule field="path" operator="is">
          <value>nfs://192.168.178.100/export/MOVIE0/The.Godfather.Part.II[1974]/</value>
        </rule>
        <rule field="path" operator="is">
          <value>nfs://192.168.178.100/export/MOVIE0/The.Dark.Knight[2008]/</value>
        </rule>
        <rule field="path" operator="is">
          <value>nfs://192.168.178.100/export/MOVIE0/12.Angry.Men[1957]/</value>
        </rule>
        <rule field="path" operator="is">
          <value>nfs://192.168.178.100/export/MOVIE0/Schindlers.List[1993]/</value>
        </rule>
</smartplaylist>

-using match "all" and "one" rule with multiple path
xml:


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
     <name>IMDb's Top 250 ns2</name>
     <!-- The IMDb top 250 is probably the most well-known movie list in the world. It
has earned this reputation through the fact that it has been composed by
aggregating the votes of many normal moviegoers. In other words, this is a list
by and for the people and not some elite movie-critics list. -->
    <match>all</match>
        <rule field="path" operator="is">
          <value>nfs://192.168.178.100/export/MOVIE1/The.Shawshank.Redemption[1994]/</value>
          <value>nfs://192.168.178.100/export/MOVIE0/The.Godfather[1972]/</value>
          <value>nfs://192.168.178.100/export/MOVIE0/The.Godfather.Part.II[1974]/</value>
          <value>nfs://192.168.178.100/export/MOVIE0/The.Dark.Knight[2008]/</value>
          <value>nfs://192.168.178.100/export/MOVIE0/12.Angry.Men[1957]/</value>
          <value>nfs://192.168.178.100/export/MOVIE0/Schindlers.List[1993]/</value>
        </rule>
</smartplaylist>
When browsing the list i want to have the order in which movies appear in the list.
But I can't get the order from the list to be displayed. Every time this will be overwritten by the ordering from the Skin (mostly title->ascending)
I have tried also to add one of the xmls lines to my list:
xml:

     <order>playlist</order>
     <order>ignore</order>
     <order>none</order>
None of this works. I can't get "my order" in the list.
All other ordering rules from wiki (title, premiered, director etc.) are working fine when used in the xsp file in a line like:
xml:
<order direction="ascending">title</order>->

I know that you can get your own order in  *.m3u or  *.pls playlist but such lists are not really nice to browse ;-)

Any idea how to get this? Is that actually possible in Kodi? Or is not implemented yet? Could be that implemented?

Thank You in advance
Reply
#2
@PatK will love what you have done here...

(2022-04-20, 10:46)genuk360 Wrote: None of this works. I can't get "my order" in the list.
Here is the wiki page for xsp files. section3.8 has the order
Here is the list of the available rules/orders/groupings... https://kodi.wiki/view/Smart_playlists/R..._groupings

But to get the order the same as they are in the xsp file, I don't think you can. The Order has to be based on a database field value.

Maybe you can hijack one of the available fields that you don't use and add a positioning number. The Top250 is already available and you could use it. <order direction="descending">top250</order>

But in short, there is no way to order the smart playlist by the listing in the xsp file.

Might be of interest... https://kodi.wiki/view/HOW-TO:Movie_universe
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
#3
Thanks.
-the Wiki page is already known and I have test some of the orderings available for movies. They all work well.
-hijacking the DB fields can be useful but only if the movie appear in just one list ... same problem as for the DB field "top250"
-"Movie Universe" solution is also known. Here you have to rename the Movie Folder with a "prefix" including the "list-name" and the "sort-number". Works too but just for the case the move appear in just one list.

I have expected that the "playlist", "none"  or "ignore" - ordering can do what I'm expecting...
Quote:But in short, there is no way to order the smart playlist by the listing in the xsp file.O
As I understand it seem to be no solution at this time.

As an Ideea: maybe the xml in the playlist can be used to achieve the wanted order something like in the "Movie Universe" solution
xml:

<rule field="path" operator="is">
<value order="top250001" >nfs://192.168.178.100/export/MOVIE1/The.Shawshank.Redemption[1994]/</value>
<value order="top250002" >nfs://192.168.178.100/export/MOVIE0/The.Godfather[1972]/</value>
<value order="top250003" >nfs://192.168.178.100/export/MOVIE0/The.Godfather.Part.II[1974]/</value>
<value order="top250004" >nfs://192.168.178.100/export/MOVIE0/The.Dark.Knight[2008]/</value>
<value order="top250005" >nfs://192.168.178.100/export/MOVIE0/12.Angry.Men[1957]/</value>
<value order="top250006" >nfs://192.168.178.100/export/MOVIE0/Schindlers.List[1993]/</value>
or simply
xml:

<rule field="path" operator="is">
<value order="1" >nfs://192.168.178.100/export/MOVIE1/The.Shawshank.Redemption[1994]/</value>
<value order="2" >nfs://192.168.178.100/export/MOVIE0/The.Godfather[1972]/</value>
<value order="3" >nfs://192.168.178.100/export/MOVIE0/The.Godfather.Part.II[1974]/</value>
<value order="4" >nfs://192.168.178.100/export/MOVIE0/The.Dark.Knight[2008]/</value>
<value order="5" >nfs://192.168.178.100/export/MOVIE0/12.Angry.Men[1957]/</value>
<value order="6" >nfs://192.168.178.100/export/MOVIE0/Schindlers.List[1993]/</value>

On the other way I understand that the smart playlist can use and combine many rule fields and a good-solution can be more complex than that...
Reply

Logout Mark Read Team Forum Stats Members Help
Help to get "own" ordering in a movie smart playlist (using rule field="path")0