• 1
  • 4
  • 5
  • 6
  • 7(current)
  • 8
Apply custom filtering to dynamic content?
#91
..
Reply
#92
(2023-02-28, 15:58)3000 Wrote: @realcopacetic 

I appreciate your long answer and since yesterday evening I am trying to make sense of it but honestly I don't know what to do.

Now I could ask you bunch of questions regarding option 1) "Doing it in skin with xsp only"... but I think it's more reasonable to tell you what I got:

I have created two .xsp files for each tag. Let's take tag CHAOS as an example:

1) CHAOS TV.xsp (All of us are dead)
2) CHAOS MOVIES.xsp (2012, #Alive, San Andreas, Train to Busan, War of the Worlds, and a few more)

(This is a good example why it's necessary to make TV shows and movies appear in one place. As you can see I have currently only one TV show for the tag. So it kinda doesn't make sense to separate it from the movies.)

Now: Which files do I need to modify to make them appear all in one folder in Kodi? 

Thanks again!

Where is it you want to display these? As a widget? Are you using a skin that lets you customise widgets or editing your own skin?
Reply
#93
..
Reply
#94
Is it possible somehow to use the field 'DBID' to filter in a xsp line? Thanks!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#95
(2023-07-26, 12:04)manfeed Wrote: Is it possible somehow to use the field 'DBID' to filter in a xsp line? Thanks!
No unfortunately I don't think so, it's a shame because it would allow for exact matching, but you're limited to the field available via smart playlists. You can have multiple fields in the XSP to improve the accuracy, though.
Reply
#96
AFAIK in the music database there are 2 fields for genres; one of them is the 'Artist' genre y the other one is 'Album' genre, and both are unrelated, I mean, I have Kylie Minogue with 'Pop' artist genre and Aphrodite with 'Disco' album genre, like in here:

Image

Image
What I would like to achieve is to perform a search in the artist's genre field, but I'm unable to do it, the search is always performed in the 'album' genre, no matter what. I'm using the next xsp...

Code:
musicdb://artists/?xsp={"rules":{"and":[{"field":"genre","operator":"contains","value":["Pop"]},{"field":"artist","operator":"isnot","value":["$INFO[Window(Home).Property(EncodedTitlem)]"]}]},"type":"artists"}

...and it returns the artists that have at least an album with the genre 'Pop', but not the artists with the genre 'Pop'. For instance, in this case it doesn't return Kylie Minogue. Is there anything I could do to get that? Thanks!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#97
@manfeed - The same behaviour is in the smart playlist creator and in the genres directory, so I think you might be out of luck.

I'm the same as you though - I'd expect an artists playlist to filter by the artist genre, not their albums. The way it is now seems wrong to me.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#98
@manfeed @jurialmunkey - I had this conversation with @DaveBlake a while ago - https://forum.kodi.tv/showthread.php?tid=371118
Quote:Genres in the music database are collected from the genre tag of the music files. Clicking on a genre on the genres node then shows you he artists with albums with songs with that genre. It means that "genre" in Kodi is inplicitly song genre.

It is possible via NFO files to give artists and albums a genre string, this is just text which Kodi will show on the info dialog, but it is not used for navigation or filtering.
From memory, what I did was use MusicBrainz Picard to update all of my artist/album genres to match the musicbrainz database, then I think if you use Universal Artist/Album scraper, you can choose to scrape genres using MusicBrainz. That way what's in the MP3 tags, which Kodi uses for xsp filtering, will match what's in the genre fields for Artists/Albums, so you can make an xsp rule that genre = $INFO[ListItem.Genre] and should get good matching in most cases without needing a bunch of manual updating of genres.

This is how I fill my widget for similar artists based on the select artists' genre and the results are as I would expect from memory of my collection. Before I figured this out I had the same problem that the matching was all over the place and as an interim I found I got pretty good results by doing the xsp filtering using artist bio contains ListItem.Genre. But if you're happy to update your mp3 tags using MusicBrainz database as the source, you can get it working pretty well.
Reply
#99
I know that there are some fields that can’t be used to filter in a xsp line, but then, is there any other method to fill a container with a conditional content? I mean, let’s suppose I want to fill a container with all the movies that have a trailer, so the condition would be !String.IsEmpty(ListItem.Trailer). Is there any method to get that? Thanks!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
(2023-09-22, 10:06)manfeed Wrote: I know that there are some fields that can’t be used to filter in a xsp line, but then, is there any other method to fill a container with a conditional content? I mean, let’s suppose I want to fill a container with all the movies that have a trailer, so the condition would be !String.IsEmpty(ListItem.Trailer). Is there any method to get that? Thanks!

Version 1.1.20+ of Skin Variables can do this
https://github.com/jurialmunkey/script.s...irectories

xml:

<content>plugin://script.skinvariables/?info=get_filter_dir&amp;library=video&amp;filter_key=trailer&amp;filter_value=:&amp;&amp;videodb://movies/titles/</content>

Will get all items from videodb://movies/titles where ListItem.Trailer contains ":"
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
Thanks! It’ll be very useful for a lot of situations!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
@jurialmunkey

I tried the line that you provided and it works well, however I'm unable to get any result when the source is the music database... I've made a lot of tests and no one works, neither for artists nor songs, for instance (sorry for being an image, but I'm unable to get the ampersan symbols to show properly):

Image

Am I doing anything wrong? Thanks!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
(2023-09-23, 17:07)manfeed Wrote: @jurialmunkey

I tried the line that you provided and it works well, however I'm unable to get any result when the source is the music database... I've made a lot of tests and no one works, neither for artists nor songs, for instance (sorry for being an image, but I'm unable to get the ampersan symbols to show properly):

Image

Am I doing anything wrong? Thanks!

Nothing wrong with your code, I just don't retrieve bitrate so every item fails to match your filter.

I couldn't see a way in the Python API to set bitrate back to the listitem, so I wasn't retrieving it -- but I can add for filtering purposes if it will be useful.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
@manfeed - Okay music should be fixed now and bitrate working as a filter for songs in v1.1.24
https://github.com/jurialmunkey/script.s...g/v1.1.24b

Will be up on my repo soon.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
(2023-09-24, 03:43)jurialmunkey Wrote: @manfeed - Okay music should be fixed now and bitrate working as a filter for songs in v1.1.24
Thanks! Now it works well for music too. I somehow thought I could filter by any field. I'm afraid I will have to ask you to add another filter then, but that will be for a new song field that will be available for Omega, so everything is fine for now.   Smile
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
  • 1
  • 4
  • 5
  • 6
  • 7(current)
  • 8

Logout Mark Read Team Forum Stats Members Help
Apply custom filtering to dynamic content?0