Is there a way to enter some raw SQL instead of the form? I could
probably manage that. If not I'll just have to add an additional 'avoid'
tag to all special tracks.

Oh, if you're willing to dig SQL and code, then yes, there are more options. Your GUI will be your text editor :-).

First you could try to edit the virtualLibraries.pref file in your preferences folder (see Settings/Information):

- create a library view based on one genre
- shut down LMS
- take a backup copy of said file
- edit the library definition
- restart LMS

My "kids music" section looks like this:

vlid_2da2d7ab:
  id: advSrch_1421096771
  name: Kinder
  params:
  - KINDER%
  - '% KINDER%'
  - KASPERLI%
  - '% KASPERLI%'
  - KINDERMUSIK%
  - '% KINDERMUSIK%'
  - 1
sql: INSERT OR IGNORE INTO library_track (library, track) SELECT '%s', id FROM ((SELECT me.id FROM tracks me LEFT JOIN genre_track genreTracks ON genreTracks.track = me.id WHERE ( ( genre IN ( SELECT me.id FROM genres me WHERE ( ( ( me.namesearch LIKE ? OR me.namesearch LIKE ? ) OR ( me.namesearch LIKE ? OR me.namesearch LIKE ? ) OR ( me.namesearch LIKE ? OR me.namesearch LIKE ? ) ) ) ) AND me.audio = ?
    ) ) GROUP BY me.id))

Edit the SQL to your liking. Just make sure the number of params corresponds in number and position to the question marks in the SQL. And don't break the file's structure...

An alternative would be to write your own little plugin with the library definitions. Take a look at the LibraryDemo plugin (https://github.com/Logitech/slimserver/blob/public/7.9/Slim/Plugin/LibraryDemo/Plugin.pm)

--

Michael
_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter

Reply via email to