XBMC Community Forum
[RELEASE] Artist Slideshow addon (for skin integration) - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Add-ons Help and Support (/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] Artist Slideshow addon (for skin integration) (/showthread.php?tid=102703)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28


- pkscuot - 2012-02-23 16:04

Oddsodz Wrote:That is my wish list anyway. And so far (yet to test the new patch from pkscuot) we have "Stage 1 LookUp" and "Stage 3 LookUp". Just need that little bit of extra magic for "Stage 2 LookUp". And I will be a very happy man/geek/nerd and the be the envy of all my mates when they come round to party. This thing looks epic on my projector system.

I was thinking about that this morning as well. I figure while Ronnie is making Eden safe for the world I might take a stab at that. It's going to require a "standard" structure, and I'm probably going to follow what Artwork Downloader uses (i.e. artist/extrafanart). I can probably make it case insensitive for the path so that Extrafanart or ExtraFanArt would work as well. I'd also like to add the ability to decide the priority. For me, I would want to use my local artist stuff first, then do a lookup, then use the fallback folder.


- pkscuot - 2012-02-23 16:11

pkscuot Wrote:There are two additional options now in the settings. Override slideshow folder will show the specified folder of images instead of downloading images. The Fallback slideshow folder will be used if no cached or downloaded artist images can be found.

Just a note for anyone testing this. I found a problem this morning (only on Windows) where once you have set the override or fallback folder there is no way to remove it. You can change it, you just can't remove it. On my Mac I could "blank out" the setting by traversing up the directory tree to root. At that point the setting was empty again. On Windows when you get to root it forces you to choose a drive letter.

The workaround if you are on Windows and need to remove the override folder setting is to use the DEFAULTS button on the settings. Unfortunately that resets all your choices.


- Oddsodz - 2012-02-23 23:58

pkscuot Wrote:I was thinking about that this morning as well. I figure while Ronnie is making Eden safe for the world I might take a stab at that. It's going to require a "standard" structure, and I'm probably going to follow what Artwork Downloader uses (i.e. artist/extrafanart). I can probably make it case insensitive for the path so that Extrafanart or ExtraFanArt would work as well. I'd also like to add the ability to decide the priority. For me, I would want to use my local artist stuff first, then do a lookup, then use the fallback folder.

Can I just say YES YES, oh and YES AngryAngryAngryNod


- pkscuot - 2012-02-24 02:28

I've got an updated fork at https://github.com/pkscout/script.artistslideshow. As before, the version number has not been revised, so when the script gets updated in the repo, these changes will get overwritten. I've been testing this all afternoon, and it appears to be working fine. The one exception is that the first time a download cache directory is created the slideshow will only show the first image downloaded until the artist plays again. I walked the code by hand, and I see where the refresh is suppose to happen, and I even see it happen on my screen (you see black for a second). But it just doesn't budge that first image. I don't think anything I did has altered the behavior, so I just decided to call it a feature that already existed in the plugin and move on with my life.

The settings now has a GENERAL and ADVANCED tab. The GENERAL tab is all the stuff that's always been there. I made one change to the GENERAL tab. In looking through the code, it looks like last.fm doesn't let you do minimum image size, so I set the min height and width options to show only if you select htbackdrops as a download option. The ADVANCED tab has all the stuff for the fallback options.

The script now does a three phase test to determine what images are shown.

1- If you set the Override folder path, those images will get shown and no artwork will be downloaded. This slideshow just runs in the background no matter what artist is playing.

2- If you set the Local artist folder by default the script will use those only if it can't find any images to download. If you set Prioritize local artist artwork, then the script will use the local stuff and only try to download images if it can't find any local artwork. In either case, what you see depends on the artist being played at the moment.

3- If you set the Fallback slideshow path, it will show that if the script can find local or remote artwork that matches.

The Override and Fallback folders must be a non-nested folder of images.

The Local artist folder has to be in the form of path/artist/extrafanart/. When you set the Local artist folder, you just set it up to path/. The artist directory name must match exactly what the script is getting from the tags of the music file.

On my Mac and Windows machine, the python call that gets the directory appears to be case insensitive. I don't have a Linux machine to test with, so it's possible that if you have something like Extrafanart or ExtraFanArt that the script won't find any local artwork. If someone could check that and let me know that would be great.

The only other thing I'd like to do is have the script set the fade time and image time for the slideshow, but that would require skin changes. I think I'll wait until Ronnie has a chance to look at what I've done before I take on anything else.

One last thing. These changes now let you use local images, but I still encourage people to upload their images to last.fm or htbackdrops so other folks get the benefit of your images. I mostly use the local stuff in cases where the script downloads either stuff I don't like or the wrong stuff (i.e. I got a bunch of Pink Floyd images when I was listening to Pink).


- kiboy6 - 2012-02-24 09:22

Wow...pkscout...thanks so much for this cool update.

While I have always loved this script, the one sadness for me was the inability to make use of the extrafanart images I had painstakingly collected.

One further request for the Advanced Options: Is there any chance of adding the option to show a slideshow comprising BOTH local and downloaded images. (ie not using one as a fallback for the other). That would be my perfect scenario.


pkscuot Wrote:The one exception is that the first time a download cache directory is created the slideshow will only show the first image downloaded until the artist plays again. I walked the code by hand, and I see where the refresh is suppose to happen, and I even see it happen on my screen (you see black for a second). But it just doesn't budge that first image. I don't think anything I did has altered the behavior, so I just decided to call it a feature that already existed in the plugin and move on with my life.
.

Yes this is a longstanding problem, which is especially problematic with a slow or otherwise occupied internet connection. Problem is, i think, that that one image, or else slideshow of some previously downloaded images for one artist will keep displaying until all further images for that artist are downloaded. On a slow connection this regularly leads to the wrong artists images being displayed for several subsequent artists.

It may not be noticeable on a good connection, but there is definitley major room for improvement in this script when used on a slow connection. This was discussed with Ronie earlier in this thread. IIRC the timing of the image display refreshing was based on completed downloads, not on a new song playing becuase Ronie was unable to have a separate python thread monitoring changes to the now playing song. (or something like that!)

If this is an issue you were able to lend your expertise to it would be a massive help Smile

Thanks again for all your valuable work on this!


- pkscuot - 2012-02-24 15:46

kiboy6 Wrote:One further request for the Advanced Options: Is there any chance of adding the option to show a slideshow comprising BOTH local and downloaded images. (ie not using one as a fallback for the other). That would be my perfect scenario.

I'm not sure that's going to be feasible. What the script is doing (both the original and my updates) is using the slideshow options available to a skin to show a bunch of images. That skin function (from what I can tell) requires all the files to be in a single directory. The only way to show both local and remote stuff would be to either copy both sets to a third directory and use that or copy the contents on one directory to the other (i.e. copy all the downloaded files to your extrafanart directory). I'll look at it, but it could really get messy.

Quote:If this is an issue you were able to lend your expertise to it would be a massive help Smile

That one may be beyond my ability. While I've been programming awhile, I only picked up python a couple of months ago. If Ronnie hasn't been able to figure that one out, I don't know that I can do any better. But I'll do some poking.


- kiboy6 - 2012-02-24 17:12

pkscuot Wrote:The only way to show both local and remote stuff would be to either copy both sets to a third directory and use that or copy the contents on one directory to the other (i.e. copy all the downloaded files to your extrafanart directory). I'll look at it, but it could really get messy.

The most logical way I could think of would be to change the location of the scripts' downloaded images to be \MusicFolder\artist\extrafanart. In other words to make the script download images directly to the local extrafanart folders. This probably isn't feasible for some reason, but it would be great if it were.

Quote:That one may be beyond my ability. While I've been programming awhile, I only picked up python a couple of months ago. If Ronnie hasn't been able to figure that one out, I don't know that I can do any better. But I'll do some poking.

No worries..hope you have some fruitful poking anyway Wink

Thanks again for all your work on tweaking this awesome script


- ronie - 2012-02-24 20:32

pkscuot Wrote:The one exception is that the first time a download cache directory is created the slideshow will only show the first image downloaded until the artist plays again. I walked the code by hand, and I see where the refresh is suppose to happen, and I even see it happen on my screen (you see black for a second). But it just doesn't budge that first image.

try increasing the sleep time in the script.
it's currently set to 1 second (iirc), some users reported they have better luck when setting it to three seconds.

on my end, i've never had any issues with it. i'm clueless as to why it works for some, but doesn't for others.

pkscuot Wrote:I made one change to the GENERAL tab. In looking through the code, it looks like last.fm doesn't let you do minimum image size, so I set the min height and width options to show only if you select htbackdrops as a download option.

it's correct that last.fm doesn't let you specify the images size, so it's handled by the script instead in this case. it will filter out all images below the specified width/height

pkscuot Wrote:The only other thing I'd like to do is have the script set the fade time and image time for the slideshow, but that would require skin changes.

i'm not sure if it can be done... so just give it a shot. :-)

pkscuot Wrote:I think I'll wait until Ronnie has a chance to look at what I've done before I take on anything else.

feel free to make whatever changes you like.
i'm always pleased when someone picks up my code and improves it ;-)


- pkscuot - 2012-02-24 23:26

ronie Wrote:try increasing the sleep time in the script.
it's currently set to 1 second (iirc), some users reported they have better luck when setting it to three seconds.

I'll try that.

Quote:it's correct that last.fm doesn't let you specify the images size, so it's handled by the script instead in this case. it will filter out all images below the specified width/height

OK, I'll move the size mins back where they were then. It didn't seem to be working for me when I was using last.fm, but I'll try again. I had min height set to 720 and min width to 1280, but it would download an 800x800 image from last.fm. At least that's what I think it did. As I said, I'll check it again.


- pkscuot - 2012-02-24 23:33

I found what I would consider an edge case bug. htbackdrops.com went down briefly today. I was testing something and noticed the script had failed with an error. When I restarted and tried again with a different artist, the script did not fail even though htbackdrops.com was still down.

The difference was the artist causing the failure had a valid .nfo file in the cache directory, and the other artist had nothing. It looks like the script checks for connection errors when generating the .nfo, but not when you download the actual images. So if there is a valid .nfo file, the script doesn't notice that the site is down until it errors out.

I added another try/except clause around the actual image download to fix that. I wasn't sure if Ronnie would want to patch that separately, so I went ahead and added a patch file to my github site for just this bug. It's at:

https://github.com/pkscout/script.artistslideshow/blob/master/downloaderror.patch

My forked branch now includes that patch, and the full patchfile has been updated as well. If you're being brave and trying this out, you should download the zip file again from:

https://github.com/pkscout/script.artistslideshow/

The only thing you really have to replace is default.py.