How do I create a range in smart playlist titles?
#1
Here is the thing.
  • I want to create a smart playlist for large sections of music files of Mozart's Kochel catalog (you don't need to know much about the Kochel to help me)
  • This is a chronolological list of his 600+ works and each piece is designated somewhere in the title with a capital letter K.1 etc.  all the way up to K.600 etc...
  • Now if I can create a range I can have this come up chronologically in useful sections... EXAMPLE   Title includes K.1 to K.19
  • QUESTION: Is there a logical range operator for me to use or combination to get just the K.1 to k.19 result? (Then I can alter it for K.20 to K.29 etc. etc.)  I don't see it.
  • You see, without the range operator, I am only able to use K.1 and I will get K.1 all the way to K.199 which is not chronological because everything from K.20 onward in between will be omitted.

Thanks to anyone who knows how to use an operator or combination to get the range working.
(alternately, is there a way to get the first 20 results....(yes there is) but how about a way to get just the next 20 and skip the first 20.... that would also work for me)
Reply
#2
It would help if you provide a screenshot of the tags so we can see the placement of the numbering system. Is the numbering placement consistent in all titles?
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
(2020-02-01, 02:35)Karellen Wrote: It would help if you provide a screenshot of the tags so we can see the placement of the numbering system. Is the numbering placement consistent in all titles?
Thanks.  Are you referring to track/file titles or Mp3 tags?
Anyway, it does not really matter as I am using the K.1 etc in the value "title contains" or "track contains" ....because yes every title/track contains the value K.  That is the constant.

As in
K.1a Andante in C for Piano etc.
K.1b Allegro in C for Piano
K.1c Allegro in F for Piano
K.1d Minuet in F for Piano
K.1e Minuet in G for Piano
K.1f Minuet in C for Piano
K.2 Minuet in F for Piano
K.3 Allegro in B-flat for Piano
through K.20 to K.100 and so on

K.107 3 Concerti for Piano
K.111 Ascanio in Alba

So to reiterate:  I am creating a smart playlist the will search location (my mozart folder) then track contains K.1 (and hopefully a range value to) K.19.
That will give me a playlist of 20 tracks or so, all chronological by date of composiiton (because that is what the K value is in Mozarts canon) no matter where the pieces are scattered throughout the entire 600+ works in the dozens of folders within the Mozart folder. (They are scattered there of course because the pieces are of all types....sonatas, operas, etc. etc. and arranged in folders by type, not date)

And once again, if I cannot get the search to stop at K.19, the value K.1 by itself will find all the K.100 values beyond the intervening years of compositions in K.20 to K.99....and therefore not chronological.

Once I have one smart playlist I can edit it with new numbers.
Thanks for any help.
Reply
#4
Sorry, but the smart playlist rule interface is just not that sophisticated. You really want some kind of regular expression facility within SQL, and while something could be implemented for SQLite it does not exist by default and Kodi does not support such functionality.

What you do have is wildcards % and _
Code:
A percent symbol ("%") in the LIKE pattern matches any sequence of zero or more characters in the string.
An underscore ("_") in the LIKE pattern matches any single character in the string.
When you create a rule with operator "contains", "startswith" or "endswith" internally Kodi uses % in the SQL statement. You might be able to use % and _ creatively yourself too, but there is nothing to limit charater values to a range of say just numbers. I can not think of a way to get those like "K.1a ", "K.1b " etc. without also getting "K.10 " and "K.19 " etc., but "startswith" "K. 1_ " could get you K.1 to K.19

A totally different approach would be to use comment or genre tags (yes so a horrible retagging exercise) and enter a Kochel catalog value in a systematic way e.g. "K001" for all the "K.1a ", "K.1b " etc. songs. Not a user friendlyb suggestion I'm afraid.

Some day Kodi may support the work tag, that would probably offer the kind of things you want to do.
Reply
#5
Thanks, Dave.  (Sorry can't seem to get this forum reply edit working right... can't edit out that last quote put in by accident)

Anyway. I follow what you are saying even though I am just a retired old user and not familiar with programs.  I can use the operators you pointed out.

BTW Are you saying that the likelihood of there ever being a search function for titles or a search program or add on for Kodi (as on a laptop with a full operating system) is very remote?   I suppose that is because the little Kodi and librelec would not handle the indexing or something.

Relying on music file tags  is so hit and miss and then rewriting in some cases.

I really admire your team's work and have several of the little Rpis running kodi and librelec.
Reply
#6
Yes my replies usually have technical flavour, after all we have a lot of intelligent and knowledgeable users, then I adjust if needed Smile

Also I work on Kodi for the enthusiast that puts some effort in to understand, and not the couch potatoe that wants it all magically to work the way they dream without excercising their brain cell. Couch potatoes beware Devil

(2020-02-01, 16:56)Cisco2kid Wrote: BTW Are you saying that the likelihood of there ever being a search function for titles or a search program or add on for Kodi (as on a laptop with a full operating system) is very remote?   I suppose that is because the little Kodi and librelec would not handle the indexing or something.
Kodi sits on top a SQLite database (or MySQL/MariaDB if you have a client server setup), and SQL is a powerful thing even when running on a RPi. But extending the smart playlist rule functionality to include regular expressions (so you can say give me titles that start "K.1[a-z]") is unlikley simply because there is minimal user interest (even in smart playlists at all) and not enough dev hours in the day.
 
But what you want to do with smart playlists for Mozart is a nice idea, and so I will file it away for future dreams Smile
Reply

Logout Mark Read Team Forum Stats Members Help
How do I create a range in smart playlist titles?0