Apply custom filtering to dynamic content?
@manfeed - Yeah with 22000 songs it is going to be slow because the filter is applied after the directory is retrieved -- so musicdb://songs/ path is essentially asking it to retrieve details for all 22000 songs and then filter by artist

I'll add some threading which should help speed up the process but the best approach would be to prefilter the list by using a more specific path if possible.

Do you have the Artist DBID? Because a much faster path to use will be :

Code:
musicdb://artists/ARTISTDBID/-1/-2/?albumartistsonly=true&artistid=ARTISTDBID

Otherwise you can use the standard filtering approach with an encoded smart playlist path to get only songs by artist first:

Code:
musicdb://songs/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22artist%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[ListItem.Label]%22%5D%7D%5D%7D%2C%22type%22%3A%22songs%22%7D

e.g. Assuming $INFO[ListItem.Label] is Artist name then this should work
Code:
plugin://script.skinvariables/?info=get_filter_dir&library=music&filter_key__one=songvideourl&filter_value__one=plugin://&&musicdb://songs/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22artist%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[ListItem.Label]%22%5D%7D%5D%7D%2C%22type%22%3A%22songs%22%7D


---

BTW "&" is what the paths actually use. The only reason we need to replace "&" with "&" in skins is because XML reserves "&" as a special character -- so to use "&" in a skin XML we need to replace it with its XML character reference "&" (which then becomes "&" when the XML is parsed).
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply


Messages In This Thread
RE: Apply custom filtering to dynamic content? - by jurialmunkey - 2023-11-11, 01:44
Logout Mark Read Team Forum Stats Members Help
Apply custom filtering to dynamic content?0