• 1
  • 152
  • 153
  • 154(current)
  • 155
  • 156
  • 191
Release Artist Slideshow addon (with skin and addon integration)
(2019-11-05, 01:01)DaveBlake Wrote: It is true, the new handling of artist artwork in v18 onwards didn't consider the Artist Slideshow at all, or any other addon come to that. I only use one addon myself (the Audio Profile switcher), so am totally oblivious to addon needs unless authors talk to me. I write about the design changes I'm making in the music support subforum, and welcome input, I don't see how else I can be more open and communicative.

@DaveBlake in fairness, I've been watching at least one thread on this, and the entire time it never even dawned on me that there would be more than fanart in the folders. I use so little other artwork in folders that it didn't even dawn on me. So that one is on me.
(2019-11-05, 01:01)DaveBlake Wrote: I like the idea of adding a new image control that allows for a "family" of art types e.gf fanart1, fanart2... but have to admit that the GUI engine is a steep learning curve of old code and no one about to give hints, so I may never get to create such a thing let alone for v19.

So meanwhile is there some other more simple core change that could help? 

I'm going to try some tests and see what happens when I change the skin texture programmatically (via an InfoLabel). I'm either going to try and change Player.Art(fanart) - which would make it skin independent - or create a new AS InfoLabel like ArtistSlideshow.Image and see what happens. I'm afraid the skin won't update, but we'll see. That would mean a new way of supporting AS, but I could work through that.

The other options are variations on a theme:
  1. Could we add a way to have the multi-image control have an option to exclude files based on, perhaps, a grep pattern? That would still mean a small change for skins, but it would be less re-coding of AS.
  2. Could we somehow programmatically pre-screen a folder so that Kodi knows what to display when it's passed to the multi-image control? I suspect this is the hardest core change but would mean no skin changes for AS support.  Just code changes on my end.
Thanks.
Reply
I guess a fundamental question is "should downloaded AS images be added to the library?"  I would answer no.   If they aren't library images, then skin will have to load from a folder location, either via a  multiimage or sequence of image controls.  Multiimage is easier programatically for a skin, but  implies all images in a folder will be displayed the same way.

scott s.
.
Reply
(2019-11-05, 01:38)pkscout Wrote: create a new AS InfoLabel like ArtistSlideshow.Image and see what happens. I'm afraid the skin won't update, but we'll see

Skins should update just fine.  My radio helper does a similar thing in that if there are multiple artists, it rotates the artist logos into a custom infolabel (srh.Logo) every x seconds (user definable time period) and every skin I've tried it with has worked.
Learning Linux the hard way !!
Reply
I just thought I’d let folks know I have started a rewrite on AS to use a single image control instead of a multi-image control so it can support the new Kodi artist image storage. I have a really ugly kind of working prototype and may have something worth trying yet this week. It will require skins to be updated, but I think I’ve just about figured out how they could add support before the update comes out *and* a way to tell users if their skin needs to be updated.

Honestly, while I resisted this it ends up that this is going to make some other things related to image and slideshow management easier and cleaner. So now is probably the time to do this.

I may end up holding the official release until Matrix comes out so Estuary can be updated to support this, although if there’s another v18 release maybe I can get it in there. Regardless there will at least be an extended beta, and the final version will support all currently supported versions of Kodi as well as Matrix.
Reply
New Test Version Available on GitHub

FOR THE LOVE OF ALL THAT IS HOLY, BACKUP YOUR IMAGE DIRECTORIES BEFORE TESTING THIS VERSION.

v.3.0.0 Beta
- rewrite to use a single image control instead of multi-image control in skin
- reworked settings
- added option to disable extranfanart folder
- added option to control time between slide transitions
- outdated language files removed, so AS is English only for now (sorry)
- removed option to have a pop up displayed when downloading artwork
- AS can now store images and information files in separate directory structure
- updated settings to allow for storing music in Kodi music folder
- AS now deletes empty artist information and artwork folders

This requires skin updates to work. If you aren't able to manually update your skin, it's too early for you to be testing this.

In order to get the support for the new Kodi music artist folder to work, I had to fundamentally change the way AS displays images.  With 3.0.0~beta3, AS now uses a single image control to show artwork and programmatically gets the list of images *and* controls the timing and order of the slideshow.  There are a couple things left to do, but it's far enough long for folks to test as long as they can make changes to their skin.  This weekend I'll be posting something in the skin dev area somewhere to alert skinners to the coming change and help them make changes now that will support both the 2.x and 3.x image display methodology.  Hopefully we can get most skins updated before the final release of AS 3.0.0 so that the transition will be mostly seamless for users.

Skin Updates
I'll show my Estuary update as an example, but if you're using any other skin, you're on your own.  If you're using my Estuary mod, the update pushed out yesterday already has support for both the 2.x and 3.x display mechanisms.

Original Estuary code in MusicVisualization.xml (lines 17 - 32):
xml:

<control type="image">
    <aspectratio>scale</aspectratio>
    <fadetime>400</fadetime>
    <animation effect="fade" start="0" end="100" time="400">WindowOpen</animation>
    <animation effect="fade" start="100" end="0" time="300">WindowClose</animation>
    <texture background="true" colordiffuse="88FFFFFF">$INFO[Player.Art(fanart)]</texture>
</control>
<control type="multiimage">
    <aspectratio>scale</aspectratio>
    <timeperimage>10000</timeperimage>
    <randomize>true</randomize>
    <fadetime>600</fadetime>
    <loop>yes</loop>
    <imagepath background="true">$INFO[Window(Visualisation).Property(ArtistSlideshow)]</imagepath>
    <visible>System.HasAddon(script.artistslideshow)</visible>
</control>

To get both 2.x and 3.x support, replace the above with:
xml:

<control type="image">
    <aspectratio>scale</aspectratio>
    <fadetime>400</fadetime>
    <animation effect="fade" start="0" end="100" time="400">WindowOpen</animation>
    <animation effect="fade" start="100" end="0" time="300">WindowClose</animation>
    <texture background="true">$INFO[Player.Art(fanart)]</texture>
    <visible>String.IsEmpty(Window(Visualisation).Property(ArtistSlideshow.Image))</visible>
</control>
<control type="image">
    <aspectratio>scale</aspectratio>
    <fadetime>400</fadetime>
    <animation effect="fade" start="0" end="100" time="400">WindowOpen</animation>
    <animation effect="fade" start="100" end="0" time="300">WindowClose</animation>
    <texture background="true">$INFO[Window(Visualisation).Property(ArtistSlideshow.Image)]</texture>
    <visible>!String.IsEmpty(Window(Visualisation).Property(ArtistSlideshow.Image))</visible>
</control>
<control type="multiimage">
    <aspectratio>scale</aspectratio>
    <timeperimage>10000</timeperimage>
    <randomize>true</randomize>
    <fadetime>600</fadetime>
    <loop>yes</loop>
    <imagepath background="true">$INFO[Window(Visualisation).Property(ArtistSlideshow)]</imagepath>
    <visible>!String.IsEmpty(Window(Visualisation).Property(ArtistSlideshow.ArtworkReady)</visible>
</control>

Because this is very experimental and breaks skin support, I'm not pushing this to my beta repo yet.  There are two things yet to complete on my end:
  1. I need to put something in place so a user gets some notification that AS has "broken" their skin.
  2. I still need to write the code to rename existing fanart into the Kodi music artist folder naming convention and move it.  There's a button in the settings to do this on demand, but it doesn't do anything right now.  Note: this will be a one way rename and move with no undo.
OK, I think that's it.  If you want to download the new test version, go to:

https://github.com/pkscout/script.artist...ew-version

You'll have to unzip and rename the folder to ensure you have only one version of AS and then either manually copy the folder (I recommend deleting the old AS first) or rezipping it and installing from Kodi's install from zip option.

P.S. now I wish I had done this years ago. Switching to a single image control cut almost 15% of the code from AS that was apparently dealing with nothing more than moving files around and changing directories for the multi-image control.
Reply
(2019-11-09, 04:17)pkscout Wrote: New Test Version Available on GitHubFOR THE LOVE OF ALL THAT IS HOLY, BACKUP YOUR IMAGE DIRECTORIES BEFORE TESTING THIS VERSION.

v.3.0.0~beta3
- rewrite to use a single image control instead of multi-image control in skin
- reworked settings
- added option to disable extranfanart folder
- added option to control time between slide transitions
- outdated language files removed, so AS is English only for now (sorry)
- removed option to have a pop up displayed when downloading artwork
- AS can now store images and information files in separate directory structure
- updated settings to allow for storing music in Kodi music folder
- AS now deletes empty artist information and artwork folders

This requires skin updates to work. If you aren't able to manually update your skin, it's too early for you to be testing this.

In order to get the support for the new Kodi music artist folder to work, I had to fundamentally change the way AS displays images.  With 3.0.0~beta3, AS now uses a single image control to show artwork and programmatically gets the list of images *and* controls the timing and order of the slideshow.  There are a couple things left to do, but it's far enough long for folks to test as long as they can make changes to their skin.  This weekend I'll be posting something in the skin dev area somewhere to alert skinners to the coming change and help them make changes now that will support both the 2.x and 3.x image display methodology.  Hopefully we can get most skins updated before the final release of AS 3.0.0 so that the transition will be mostly seamless for users.

Skin Updates
I'll show my Estuary update as an example, but if you're using any other skin, you're on your own.  If you're using my Estuary mod, the update pushed out yesterday already has support for both the 2.x and 3.x display mechanisms.

Original Estuary code in MusicVisualization.xml (lines 17 - 32):
xml:

<control type="image">
    <aspectratio>scale</aspectratio>
    <fadetime>400</fadetime>
    <animation effect="fade" start="0" end="100" time="400">WindowOpen</animation>
    <animation effect="fade" start="100" end="0" time="300">WindowClose</animation>
    <texture background="true" colordiffuse="88FFFFFF">$INFO[Player.Art(fanart)]</texture>
</control>
<control type="multiimage">
    <aspectratio>scale</aspectratio>
    <timeperimage>10000</timeperimage>
    <randomize>true</randomize>
    <fadetime>600</fadetime>
    <loop>yes</loop>
    <imagepath background="true">$INFO[Window(Visualisation).Property(ArtistSlideshow)]</imagepath>
    <visible>System.HasAddon(script.artistslideshow)</visible>
</control>

To get both 2.x and 3.x support, replace the above with:
xml:

<control type="image">
    <aspectratio>scale</aspectratio>
    <fadetime>400</fadetime>
    <animation effect="fade" start="0" end="100" time="400">WindowOpen</animation>
    <animation effect="fade" start="100" end="0" time="300">WindowClose</animation>
    <texture background="true">$INFO[Player.Art(fanart)]</texture>
    <visible>String.IsEmpty(Window(Visualisation).Property(ArtistSlideshow.Image))</visible>
</control>
<control type="image">
    <aspectratio>scale</aspectratio>
    <fadetime>400</fadetime>
    <animation effect="fade" start="0" end="100" time="400">WindowOpen</animation>
    <animation effect="fade" start="100" end="0" time="300">WindowClose</animation>
    <texture background="true">$INFO[Window(Visualisation).Property(ArtistSlideshow.Image)]</texture>
    <visible>!String.IsEmpty(Window(Visualisation).Property(ArtistSlideshow.Image))</visible>
</control>
<control type="multiimage">
    <aspectratio>scale</aspectratio>
    <timeperimage>10000</timeperimage>
    <randomize>true</randomize>
    <fadetime>600</fadetime>
    <loop>yes</loop>
    <imagepath background="true">$INFO[Window(Visualisation).Property(ArtistSlideshow)]</imagepath>
    <visible>!String.IsEmpty(Window(Visualisation).Property(ArtistSlideshow.ArtworkReady)</visible>
</control>

Because this is very experimental and breaks skin support, I'm not pushing this to my beta repo yet.  There are two things yet to complete on my end:
  1. I need to put something in place so a user gets some notification that AS has "broken" their skin.
  2. I still need to write the code to rename existing fanart into the Kodi music artist folder naming convention and move it.  There's a button in the settings to do this on demand, but it doesn't do anything right now.  Note: this will be a one way rename and move with no undo.
OK, I think that's it.  If you want to download the new test version, go to:

https://github.com/pkscout/script.artist...ew-version

You'll have to unzip and rename the folder to ensure you have only one version of AS and then either manually copy the folder (I recommend deleting the old AS first) or rezipping it and installing from Kodi's install from zip option.

P.S. now I wish I had done this years ago. Switching to a single image control cut almost 15% of the code from AS that was apparently dealing with nothing more than moving files around and changing directories for the multi-image control. 
Thanks, I will test it sometime over the weekend  Smile
Setup: LG OLED65B7 | Denon AVR X7200WA | OPPO UDP-203 4K Blu-Ray player | Nvidia Shield TV | KEF T205
My Favorite Skin: Arctic Horizon
Reply
New Test Version Available

I found a bug this morning when I tested this on my OSMC setup that didn't show up on my Mac (which is where I do my development) that causes a crash at startup.  3.0.0~beta4 fixes that.  Same instructions for download as in this post.
Reply
Thanks for the update!
Glad you figured a way out.

If I listen to radio, As will still download images and create a Artist folder on my custom path and save them in there without the extrafanart folder, right?

If you digging in the code right know I would like to add a request, I'm sure I'm in the minority but hey, I don't care about the extra info, all I wannt is the slideshow. So if you could add a option to disable the artist info search, witch will bring down the api request, or just let as not create the info folder with the nfos, would be great.

Again thanks for keep As futere proof! Unfortunately I can't test the new version till my new vero arrives :/
Reply
New Beta Update Available

v.3.0.0~beta5
- added routine in settings to move images to Kodi artist information folder
- added alert image that skins will show if they have not been updated for new display method
- fixed cache trim so it also deletes the image download cache list
- added code so AS will delete empty artist folders more often

You probably need to restart Kodi after this update.  There are updated language strings, and I think those only get loaded when Kodi starts.

Same download instructions as in this post.  And seriously, if you are going to test the option to move all your images to the Kodi artist information folder, BACKUP YOUR IMAGE FOLDERS FIRST. It's worked fine for me in testing, but the move is one way and HAS NO UNDO.

Beta 5 is probably stable enough to release into my beta repo, but I'm going to be a little busy from now until early December (work stuff, then a trip, then more work stuff), and I don't want to release it more generally and then not be around to help.  Plus this will give a little time for a few skins to add support during the extended beta.  I'm going to try and find out if there is another release of Kodi 18 coming to get Estuary updated, and if so I won't release 3.x into the main Kodi repo until after that.  If Estuary can't be updated until Matrix, then I may very well hold the production release until Matrix at least goes into beta.
Reply
(2019-11-10, 18:16)meowmoo Wrote: If I listen to radio, As will still download images and create a Artist folder on my custom path and save them in there without the extrafanart folder, right?

There is a setting in AS to disable the extrafanart folder.  You need to go into the AS settings and find Storage > Use extranfanart folder.  Disable that and then, yes, AS will do as you've described.
 
(2019-11-10, 18:16)meowmoo Wrote: If you digging in the code right know I would like to add a request, I'm sure I'm in the minority but hey, I don't care about the extra info, all I want is the slideshow. So if you could add a option to disable the artist info search, witch will bring down the api request, or just let as not create the info folder with the nfos, would be great.

You can already do that.  There are sections in the settings for Album Info, Artist Bio, and Similar Artists. In each of those sections you can disable the download of that information for each site that provides it. It won't actually cut down on the API calls much, as the data for those is usually in the same file as the one that has all the images.

AS still has to create the information folder, because the files that have the list of images is cached as well as the database of already downloaded images (these two things do more to limit the API calls than anything else).  So there's no way to avoid have information folders.  The new version of AS does let you store the information folders separate from the image folders (in the Storage section of settings), so if you do that your image directories will be clean at least.  If you're not trying to share the AS stuff with two Kodi setups, you can probably just set the information files to be stored in the addon_data folder.  Then you'll basically never see them.
Reply
Wow, that was quick work !!

Sadly, on testing initially, I hit a snag ....
python:
2019-11-11 10:18:21.005 T:1684   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'AttributeError'>
                                            Error Contents: 'Main' object has no attribute 'CACHEDIR'
                                            Traceback (most recent call last):
                                              File "/home/xbmc/build/kodi-19/kodi-build/portable_data/addons/script.artistslideshow/default.py", line 1157, in <module>
                                                slideshow = Main()
                                              File "/home/xbmc/build/kodi-19/kodi-build/portable_data/addons/script.artistslideshow/default.py", line 274, in __init__
                                                self._use_correct_artwork()
                                              File "/home/xbmc/build/kodi-19/kodi-build/portable_data/addons/script.artistslideshow/default.py", line 1079, in _use_correct_artwork
                                                self._set_artwork_from_dir( self.FALLBACKPATH, self._get_file_list( self.FALLBACKPATH ) )
                                              File "/home/xbmc/build/kodi-19/kodi-build/portable_data/addons/script.artistslideshow/default.py", line 914, in _set_artwork_from_dir
                                                if (dir == self.CACHEDIR) and (self.INCLUDEFANARTJPG or self.INCLUDEFOLDERJPG):
                                            AttributeError: 'Main' object has no attribute 'CACHEDIR'
                                            -->End of Python script error report<--

I fixed this by adding line 2 below
python:
            self.SLIDESHOW.setDaemon(True)
            self.CACHEDIR = ''
            self.SLIDESHOW.start()

Not sure if that was the correct way to do it, but it now runs and shows the correct artist art.

Dunno if it's relevant or not but I am using the artist info directory to store the images in.  Oh, also when I used the addon to move them, I got a progress dialog but it never seemed to update the progress bar.  It did move all the art though and notify me when it was done.
Learning Linux the hard way !!
Reply
(2019-11-11, 12:30)black_eagle Wrote: I fixed this by adding line 2 below
python:
            self.SLIDESHOW.setDaemon(True)
            self.CACHEDIR = ''
            self.SLIDESHOW.start()

Not sure if that was the correct way to do it, but it now runs and shows the correct artist art.

Dunno if it's relevant or not but I am using the artist info directory to store the images in.  Oh, also when I used the addon to move them, I got a progress dialog but it never seemed to update the progress bar.  It did move all the art though and notify me when it was done.

Thanks for the early testing.  I fixed the crash.  Your fixed masked the problem, but there was an actual issue with some logic when setting the directory to look in for images.  With that fixed, I have updated the new-version github branch and bumped the version to beta6.  Without a debug log I can't troubleshoot the progress bar thing.  One my test instance I got progress bar updates, although with the small number of artists on my test machine it moved by so fast it was hard to see.
Reply
(2019-11-11, 18:56)pkscout Wrote: Your fixed masked the problem,

Yeah, I figured it probably wasn't right, thanks for the quick fix.
(2019-11-11, 18:56)pkscout Wrote: Without a debug log I can't troubleshoot the progress bar thing

Ha, I didn't back up my art before moving it, but I'll see what I can do.

EDIT

Link to debug stuff -> https://paste.kodi.tv/qusariraha.kodi

Couldn't post the full log as AS moved over 8Gb of data and I can't find a paste site that will accept a 12Mb paste.  I've saved off the full log though so if you need any more info I can zip it up and dropbox it or something.  Anyway, the progress bar didn't move at all.
Learning Linux the hard way !!
Reply
(2019-11-11, 19:59)black_eagle Wrote: Ha, I didn't back up my art before moving it, but I'll see what I can do.

EDIT

Link to debug stuff -> https://paste.kodi.tv/qusariraha.kodi

Couldn't post the full log as AS moved over 8Gb of data and I can't find a paste site that will accept a 12Mb paste.  I've saved off the full log though so if you need any more info I can zip it up and dropbox it or something.  Anyway, the progress bar didn't move at all. 

You apparently have infinitely more faith in my programming skills than I do. I backed up my images twice.  '-)

I did two more tests using both the Custom image location and the addon_data folder as the source for the image move, and in both cases I saw a dialog update. I also added some to the debug log and can track the progress number being changed.  So for now I'm going to chalk that up to a one off interface issue and hope for the best.  The good news is that it's a user feedback issue and not an actual "is it working" issue.
Reply
(2019-11-11, 22:55)pkscout Wrote: You apparently have infinitely more faith in my programming skills than I do. I backed up my images twice.

Having had virtually no issues with AS, apart from those I have fed back here, your skills would not appear to be in doubt.  On top of that, I tested it on my dev env which is all portable_data and gets deleted every so often anyway Laugh
(2019-11-11, 22:55)pkscout Wrote: I'm going to chalk that up to a one off interface issue and hope for the best.  The good news is that it's a user feedback issue and not an actual "is it working" issue.

Oh yes, it works perfectly well, just I saw no update of the progress bar (and I moved over 22,000 files).  Perhaps it's related to something in V19 as I'm using an up-to-date master build.  Not too worried myself really, as it's a one-shot deal anyway and I can wait for the pop-up to tell me it's finished.

Thanks for the help and indeed for continuing to maintain AS and improve it.  It's much appreciated.
Learning Linux the hard way !!
Reply
  • 1
  • 152
  • 153
  • 154(current)
  • 155
  • 156
  • 191

Logout Mark Read Team Forum Stats Members Help
Artist Slideshow addon (with skin and addon integration)5