How to fill a list with all the music video from an artist? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12) +--- Thread: How to fill a list with all the music video from an artist? (/showthread.php?tid=363057) |
How to fill a list with all the music video from an artist? - manfeed - 2021-06-11 I'm trying to fill a list with all the music videos from an artist, no matter the album they belong to. I'm trying with (and all kind of variations based on it...):
...but it doesn't work, the reason behind this is that I do get all the songs from an artist bypassing the album with something similar...
...can anyone tell me what I'm doing wrong? Thanks! RE: How to fill a list with all the music video from an artist? - Fuchs2468 - 2021-06-11 (2021-06-11, 01:18)manfeed Wrote: Have you already tried XSP? RE: How to fill a list with all the music video from an artist? - ronie - 2021-06-11 not sure if it will work, but try this:
RE: How to fill a list with all the music video from an artist? - manfeed - 2021-06-11 (2021-06-11, 12:20)ronie Wrote: not sure if it will work, but try this:Thanks, but unfortunately it doesn't work... My fault... it works ok. Thanks! RE: How to fill a list with all the music video from an artist? - manfeed - 2021-06-11 (2021-06-11, 11:59)Fuchs2468 Wrote:Thanks, no, I don't know how XSP works...(2021-06-11, 01:18)manfeed Wrote: RE: How to fill a list with all the music video from an artist? - roidy - 2021-06-12 (2021-06-11, 21:05)manfeed Wrote:(2021-06-11, 11:59)Fuchs2468 Wrote:Thanks, no, I don't know how XSP works...(2021-06-11, 01:18)manfeed Wrote: This xsp works, I've tested it:- Code: {"rules":{"and":[{"field":"artist","operator":"is","value":["$INFO[Container(50).ListItem.Artist]"]}]},"type":"musicvideos"} You then need to URL encode it (don't encode the $INFO[...]) to give:- Code: %7b%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[Container(50).ListItem.Artist]%22%5d%7d%5d%7d%2c%22type%22%3a%22musicvideos%22%7d Then make the <content> out of it to give:- Code: <content>videodb://musicvideos/titles/?xsp=%7b%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[Container(50).ListItem.Artist]%22%5d%7d%5d%7d%2c%22type%22%3a%22musicvideos%22%7d</content> This thread will help with xsp https://forum.kodi.tv/showthread.php?tid=341640 I don't know what your Container(50) contains so you may need to use ListItem.Title or ListItem.label RE: How to fill a list with all the music video from an artist? - mardukL - 2021-06-12 i use some of this paths depending on use case and available dbid's | labels musicvideos videodb://musicvideos/artists/ mvidalbums videoodb://musicvideos/artists/[artists video dbid ]/ all by artist videodb://musicvideos/artists/[artists video dbid ]/-1/?artistid=[artists video dbid] all by album of artist videodb://musicvideos/artists/[artists video dbid ]/[album id]/?artistid=[artists video dbid]
RE: How to fill a list with all the music video from an artist? - manfeed - 2021-06-12 (2021-06-12, 10:09)roidy Wrote:(2021-06-11, 21:05)manfeed Wrote:(2021-06-11, 11:59)Fuchs2468 Wrote: Have you already tried XSP?Thanks, no, I don't know how XSP works... Thanks! It works very well! RE: How to fill a list with all the music video from an artist? - manfeed - 2021-06-12 (2021-06-11, 12:20)ronie Wrote: not sure if it will work, but try this: Thanks @ronie The option given by @roidy didn't work for me at first, but since he said he was sure it worked I double checked my code and I realized I had made a silly mistake (that's often the case when you spend hours trying different options...) after fixing it roidy's code worked and then I tested yours and it also worked!... apologies for the mistake, and thanks again for your help! RE: How to fill a list with all the music video from an artist? - roidy - 2021-06-12 (2021-06-11, 21:04)manfeed Wrote:(2021-06-11, 12:20)ronie Wrote: not sure if it will work, but try this:Thanks, but unfortunately it doesn't work... May I ask what the issue was?
Doesn't work for me either. RE: How to fill a list with all the music video from an artist? - manfeed - 2021-06-12 (2021-06-12, 13:11)roidy Wrote:A visibility condition... this code works ok under "Artists" in Music Videos section... (container 597 is the number of the view being used)(2021-06-11, 21:04)manfeed Wrote:(2021-06-11, 12:20)ronie Wrote: not sure if it will work, but try this:Thanks, but unfortunately it doesn't work...
RE: How to fill a list with all the music video from an artist? - roidy - 2021-06-12 (2021-06-12, 13:24)manfeed Wrote: this code works ok under "Artists" in Music Videos section... That's the problem I'm trying to get the Music Videos for artists under the main music library not the music video library. For some reason artist dbid's are not the same between the main music section and the music video section, even though the artists are the same.... guess I'll stick to the xsp method. RE: How to fill a list with all the music video from an artist? - manfeed - 2021-06-12 (2021-06-12, 15:38)roidy Wrote:Only difference I found between your xsp metod and ronie’s is that with yours, Aly&AJ returned nothing, whereas ronie’s one worked. There must be an issue with special characters like ‘&’ with xsp…(2021-06-12, 13:24)manfeed Wrote: this code works ok under "Artists" in Music Videos section... RE: How to fill a list with all the music video from an artist? - roidy - 2021-06-12 (2021-06-12, 16:04)manfeed Wrote:(2021-06-12, 15:38)roidy Wrote:Only difference I found between your xsp metod and ronie’s is that with yours, Aly&AJ returned nothing, whereas ronie’s one worked. There must be an issue with special characters like ‘&’ with xsp…(2021-06-12, 13:24)manfeed Wrote: this code works ok under "Artists" in Music Videos section... Yep, special characters need to be encoded. I use onload to run Code: <onload>RunScript(script.embuary.helper,action=encode,string='$INFO[ListItem.Artist]',prop=EncodedArtistName)</onload> Then use the resulting window property in the xsp request:- Code: <content>videodb://musicvideos/titles/?xsp=%7b%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[Window(home).Property(EncodedArtistName)]%22%5d%7d%5d%7d%2c%22type%22%3a%22musicvideos%22%7d</content> Seems to work fine for any special character's I've come across so far. Just don't try using this method in a list, python will never keep up with the scrolling. |