Win Questions about image caching in Titan
#1
A couple of weeks ago, I decided to start creating CDart.png files for my music collection, Results have been mixed, with some images appearing during playback and others not appearing. At first, I thought may be I was making the images incorrectly, but there was no common pattern between images that would work and images that would not. I also noticed that new albums added with CDart (i.e. an album that had not been scraped before) worked perfectly, the problem was only with albums that were already present in the library. As a result, I assumed the problem was with cached images not being replaced, so I followed the following steps to rule that out:

1. Removed music sources & cleaned the library
2. Dropped the MySql DB that contained the music library
3. Deleted the thumbnail directory & associated thumb.db file

I hoped this would clear any old data so I went ahead and added the music sources back and re-scanned them. However, the problem still remains, so I have:

1. Albums that show up in the main album page with artwork, but have no artwork during plaback (cover or cdart)
2. Albums with cdart files that don't show up
3. Albums where Kodi ignores the local artwork and makes a bad guess about what image it should display for the CD cover. In one case, During playback, the correct artwork showed up for a moment, then Kodi replaced it with another image for the wrong album.

So since clearing Kodi's thumbnail cache hasn't solved the problem, which leaves me asking the question "does the Titan skin maintain it's own image cache?"

For the record, my music library is:

1. Laid out in the Artist name/album/tracks folder structure
2. I've told Kodi not to look online for additional information, just use the local available information for an album
3. All music is tagged properly and has cover art with the name "folder.jpg", albums with CDart have a cdart.png file placed in the album directory
4. artist.nfo and album.nfo files are present

If anybody can suggest where I might be going wrong here, I'd be really grateful, at the moment, if I had any hair, I'd be tearing it out ;-)
Reply
#2
Yes, the skin uses the skinhelper service for the music artwork.
Files aren't retrieved directly from the disc but instead they're scraped by the skinhelper service.

It *should* auto detect any changes to the library and then overwrite the persistant cache but based on your story here I assume that there is a flaw in there ;-)

Anyway, you can use the contextmenu to reset the cache for your library.
While inside the Music library (e.g. artists or albums) open the context menu and select "Music Artwork", you can either manually refresh one item or flush the entire cache for all items.
Reply
#3
(2016-05-23, 16:10)marcelveldt Wrote: Yes, the skin uses the skinhelper service for the music artwork.
Files aren't retrieved directly from the disc but instead they're scraped by the skinhelper service.

It *should* auto detect any changes to the library and then overwrite the persistant cache but based on your story here I assume that there is a flaw in there ;-)

Anyway, you can use the contextmenu to reset the cache for your library.
While inside the Music library (e.g. artists or albums) open the context menu and select "Music Artwork", you can either manually refresh one item or flush the entire cache for all items.

Thank you for the quick response, that appears to be the thing I was missing, I've just tested it on one of the albums that was giving trouble and it's now fixed.
Reply
#4
So, flushing the persistent artc cache certainly solved most of the problems. I still have an issue with some albums though were the correct cover art is displayed initially, then replaced with incorrect artwork. I have told the skin not to look for artwork on-line (via the Music artwork settings), so I'm not sure what is happening here.
Reply
#5
Can you enable "verbose debug logging" for the skin helper service ?
You can access the settings for skin helper service through the skin settings or by using the contect menu while in music.

With the verbose logging enabled, try to refresh the music artwork with the context menu.
This will print a verbose output to your kodi log, let's have a look there what is happening.
Reply
#6
Here's what I did
1. Removed album from library
2. Cleaned DB and removed Skinhelper persistent cache
3. Added album back and played it.

Before we get to the log here's what happened:
1. Album shows up as expected with correct cover art in the album view
2. Tracks and cover art correct in track view
3. Immediately on play, the correct artwork is shown in the playbar, but a blank cdart is used
4. Seconds later, it picks up a completely wrong cover art and cdart and updates the playbar


Here's what the log captured (let me know if there are verbosity settings):

11:26:21 T:7692 NOTICE: Skin Helper Service --> onNotification - Addon settings changed!
11:26:36 T:2908 NOTICE: Skin Helper Service --> getMusicArtwork - return data from cache - artist: Ry Cooder - track: - album: Live at The Bottom Line (1974)
11:26:37 T:8940 NOTICE: Previous line repeats 1 times.
11:26:37 T:8940 NOTICE: Skin Helper Service --> getMusicArtwork - return data from cache - artist: Wynton Marsalis - track: - album: Think Of One
11:26:37 T:5068 NOTICE: Skin Helper Service --> getMusicArtwork - return data from cache - artist: Ry Cooder - track: - album: Live at The Bottom Line (1974)
11:26:46 T:7820 NOTICE: Skin Helper Service --> Context menu artwork settings for PVR artwork
11:26:52 T:5656 NOTICE: Skin Helper Service --> started loading script entry
11:26:52 T:5656 NOTICE: Skin Helper Service --> Parameter string: {u'action': u'RESETCACHE', u'ACTION': u'RESETCACHE', u'PATH': u'music', u'path': u'music'}
11:26:56 T:5656 NOTICE: Skin Helper Service --> finished loading script entry
11:27:05 T:7120 NOTICE: Skin Helper Service --> getMusicArtwork - return data from cache - artist: Ry Cooder - track: Too Tight (No2) - album: Live at The Bottom Line (1974)
11:27:07 T:7584 NOTICE: Skin Helper Service --> getMusicArtwork - return data from cache - artist: Ry Cooder - track: FDR in Trinidad - album: Live at The Bottom Line (1974)
11:27:07 T:7692 NOTICE: Skin Helper Service --> Kodi_Monitor: sender xbmc - method: Playlist.OnAdd - data: {"item":{"id":16431,"type":"song"},"playlistid":0,"position":6}
11:27:07 T:7692 NOTICE: Skin Helper Service --> Kodi_Monitor: sender xbmc - method: Player.OnPlay - data: {"item":{"id":16431,"type":"song"},"player":{"playerid":0,"speed":1}}
11:27:07 T:7692 NOTICE: Skin Helper Service --> onNotification - ShowInfoAtPlaybackStart - number of seconds: 6
11:27:07 T:5180 NOTICE: Skin Helper Service --> setMusicPlayerDetails: {u'album': u'Live at The Bottom Line (1974)', u'artist': [u'Ry Cooder'], u'title': u'Too Tight (No2)', u'label': u'Too Tight (No2)', u'albumid': 982, u'displayartist': u'Ry Cooder', u'type': u'song', u'id': 16431}
11:27:07 T:5180 NOTICE: Skin Helper Service --> getMusicArtwork - return data from cache - artist: Ry Cooder - track: Too Tight (No2) - album: Live at The Bottom Line
11:27:13 T:1396 NOTICE: Skin Helper Service --> getMusicArtwork - return data from cache - artist: Ry Cooder - track: Too Tight (No2) - album: Live at The Bottom Line (1974)
11:27:15 T:7692 NOTICE: Skin Helper Service --> Kodi_Monitor: sender xbmc - method: Player.OnStop - data: {"end":false,"item":{"id":16431,"type":"song"}}
11:28:50 T:888 NOTICE: Storing total System Uptime
11:28:50 T:888 NOTICE: Saving settings
11:28:50 T:7692 NOTICE: Skin Helper Service --> Kodi_Monitor: sender xbmc - method: System.OnQuit - data: {"exitcode":0}
11:28:50 T:888 NOTICE: stop all
11:28:50 T:888 NOTICE: stop player
Reply
#7
So, as a quick followup, I noticed something in that log output where there were two lookups, one based on the folder name and one based on the album name in the tag which were different. So, I renamed the folder to match the tag and at least the problem with the random cover art went away, so now I get the correct cover art, but a generic CD image.
Reply
#8
I'm finally seeing a pattern in the cdart images that don't work, and it's pretty weird. If the Album folder name contains brackets (for example "Layla and Other Assorted Love Songs (SE)", then the cdart.png file is not found. I suspect that this is probably a failure in a REGEX expression somewhere so the the "(" and ")" are being interpreted as part of an expression rather than as part of the folder name.
Reply
#9
Sorry for the late reply, I had some computer issues so been offline for a little while.
Hmm, that sounds like a reasonable cause for the problem. I will dig through the code if I can spot the error.
Reply
#10
I got around to renaming/retagging albums to get rid of brackets and all the cdart.png files I've created now work. That said, I think my initial diagnosis maybe partially incorrect, it's not the directory name of the album that causes problems, it's when the album-name tag in individual files has brackets that things go wrong.
Reply
#11
Hi there. Was this issue ever fixed or a solution/workaround found. Currently using Titan on Krypton which is by far my preferred skin except for this issue.

As the original poster says, incorrect artwork is being scraped for any albums with brackets in the album name. In any case i would have thought that local info and embedded art should always be honoured, especially if you set to read local only? Is there a setting xml that can be edited to prevent skin helper from scraping remote album art completely?

Many thanks
Reply
#12
Hi again. Replaced regular brackets with braces {} and problem goes away. To confirm it is just the 'album' tag that needs changing, noting else. I can batch find and replace with mp3tag so no big issue. Original question on preventing scraping altogether remains though?

Cheers
Reply
#13
As for the issue around having your embedded album art overwritten by internet scraped album art  - I had the same problem. I have high quality embedded art in all my music files and I would see it for a second and then it would be overwritten by something scraped form the internet. Sometimes the overwritten album would actually be incorrect.

I found a solution by adding a line in the IncludesVariables.xml file. It seems to be working for me. I just check to see if there is an embedded artwork, and if there is, I return it in the variable. Around line 646

     <variable name="AudioPlayerCoverImage">
        <value condition="!IsEmpty(MusicPlayer.Cover)">$INFO[MusicPlayer.Cover]</value>                                                    <-----------------  This is the line I added and seems to work properly for me
        <value condition="SubString(MusicPlayer.Cover,.tbn,right)">$INFO[MusicPlayer.Cover]</value>
        <value condition="!IsEmpty(Window(Home).Property(SkinHelper.Player.Art.AlbumThumb))">$INFO[Window(Home).Property(SkinHelper.Player.Art.AlbumThumb)]</value>
        <value condition="!IsEmpty(MusicPlayer.Cover) + !Substring(MusicPlayer.Cover,Default,left) + !IsEmpty(Player.Duration)">$INFO[MusicPlayer.Cover]</value>
        <value condition="!IsEmpty(Window(Home).Property(SkinHelper.Player.Art.Thumb))">$INFO[Window(Home).Property(SkinHelper.Player.Art.Thumb)]</value>
        <value>$INFO[MusicPlayer.Cover]</value>
     </variable>
Reply

Logout Mark Read Team Forum Stats Members Help
Questions about image caching in Titan0