Kodi Community Forum
[RELEASE] cdART Manager Script - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] cdART Manager Script (/showthread.php?tid=77031)



- Kode - 2011-06-26

Also after I exit the cdART manager, if I click back in it, it crashes and xbmc restarts.

http://pastebin.com/B8Uq86rj


- giftie - 2011-06-26

Kode Wrote:Also after I exit the cdART manager, if I click back in it, it crashes and xbmc restarts.

http://pastebin.com/B8Uq86rj

Odd... I can't see why this happens.. It makes it through the first part of the script but XBMC crashes before it even tries to load the skin of the script(not even showing it tried to load it.) What is your build version of XBMC?(from the home screen press down on Settings and select System Info, the build info is at the bottom ie: XBMC PRE-11.0 Git: 20110624-a33db0a(Compiled Jun 24-2011) ) I have seen some Nightly quirks causing irratic behavior with scripts.

Quote:For some reason when I try to download a cdART for Trapt the script loses focus or something and doesn't download the cdART


13:01:39 T:2906647408 M:1898778624 DEBUG: [script.cdartmanager] - Score : 100
13:01:39 T:2906647408 M:1898778624 DEBUG: [script.cdartmanager] - Id : http://musicbrainz.org/artist/8876c0...1-7f935a3b3b6b
13:01:39 T:2906647408 M:1898778624 DEBUG: [script.cdartmanager] - Name : u'Trapt'
13:01:39 T:2906647408 M:1898778624 DEBUG: [script.cdartmanager] - Sort Name : u'Trapt'
13:01:40 T:2906647408 M:1898790912 NOTICE: [script.cdartmanager] - # {'local_id': '49', 'musicbrainz_artistid': u'8876c0be-ccff-4d46-aa91-7f935a3b3b6b', 'name': 'Trapt', 'dis$
13:01:40 T:2906647408 M:1898790912 DEBUG: [script.cdartmanager] - # Finding remote cdARTs
13:01:40 T:2906647408 M:1898790912 DEBUG: [script.cdartmanager] - Retrieving artwork for artist id: 8876c0be-ccff-4d46-aa91-7f935a3b3b6b
13:01:40 T:2906647408 M:1898790912 DEBUG: [script.cdartmanager] - Retrieving HTML Source
13:01:40 T:2906647408 M:1898790912 NOTICE: 8876c0be-ccff-4d46-aa91-7f935a3b3b6b.xml
13:01:41 T:2906647408 M:1898790912 DEBUG: [script.cdartmanager] - HTML Source:
<?xml version="1.0"?>
<music id="8876c0be-ccff-4d46-aa91-7f935a3b3b6b" name="Trapt"><backgrounds><background>http://fanart.tv/music/8876c0be-ccff-4d46-aa$
13:01:41 T:2906647408 M:1898790912 DEBUG: [script.cdartmanager] - Found FanART
13:01:41 T:2906647408 M:1898790912 DEBUG: [script.cdartmanager] - Found ClearLOGOs
13:01:41 T:2906647408 M:1898790912 DEBUG: [script.cdartmanager] - cover: http://fanart.tv/music/8876c0be-ccff...2fe4b7c5af.jpg
13:01:41 T:2906647408 M:1898790912 NOTICE: [script.cdartmanager] - # Populating Album List
13:01:41 T:2906647408 M:1898790912 DEBUG: [script.cdartmanager] - # Retrieving Local Albums Database
13:01:41 T:2906647408 M:1898790912 DEBUG: [script.cdartmanager] - # Finished Retrieving Local Albums Database
13:01:41 T:2906647408 M:1898790912 NOTICE: [script.cdartmanager] - # Building album list
13:01:41 T:6600512 M:1898790912 ERROR: Control 122 in window 13000 has been asked to focus, but it can't
13:01:42 T:6600512 M:1898790912 DEBUG: ------ Window Deinit (DialogBusy.xml) ------

I came across that focus problem last night. It happened when the script had found cdARTs on fanart.tv but the none of the Artist Albums had a MusicBrainz ID. Got that fixed, but see a small issue of the script not matching the Artist and Album at the time of database building, as the script needed to look up the artist MBID when looking up the artwork. I would need to see your 'l_cdart.db' file from your 'userdata/addon_data/script.cdartmanager' to see what was stored as the album title and see what MusicBrainz spits back when trying to match artist and album title(the way the script access their database).

I also see an error for Neon...
Code:
13:08:51 T:6600512 M:1912168448   ERROR: GetDirectory - Error getting smb://192.168.1.6/Music/Trapt/Trapt 2002/../extrafanart/

for some reason it is adding the previous directory command('..') for the folder path.


- giftie - 2011-06-28

I just updated the first post of this thread with new screenshots and a link to the latest development version.. I hope to have the Dharma version up soon...


- solidsatras - 2011-06-29

giftie Wrote:You need to add your network path as a file source, Home Menu -> Settings Drop down/slide out menu -> File Manager -> Add Source -> Browse -> Add Network Location -> Browse - Find your share, and finish off the info and click ok.

Thank you so much. It worked!


Dharma Version Now Available for testing - giftie - 2011-07-01

I thought I would be nice and put up a Dharma version for testing.. A couple notes:

  1. 'Overwrite low-res existing cdARTs' - this does not work on Dharma, will cause script to fail
  2. For some reason the internal 'Rebuild Addon Database' is not functioning.. Select 'Build Database' in settings

For both pre-Eden and Dharma versions... The addon builds a database to speed up future usage. This tends to take a while as there is a query to MusicBrainz Web interface(this is for accuracy of Artist and Album matching) The script can only query MusicBrainz once a second, though this does not seem like a long time, when dealing with 1000's of albums it can be. It is probably best to leave cdART Manager alone after starting a 'Build Database' for a while(rough guess, multiply your album count by 1.5secs, 1000 albums x 1.5 = 1500 secs = 25 min) This is a rough guess, as the script will also try to match album artists if it is unable to find the id's during the Album/Artist match.

Keep in mind this is a Development version, though hopefully very stable and functionable.


Dharma Download Link
pre-Eden Download Link


- m4x1m - 2011-07-02

Great works!

But I have a little problem...

Code:
12:29:52 T:2835340144 M:3833782272   ERROR: Traceback (most recent call last):
12:29:52 T:2835340144 M:3833782272   ERROR:   File "/home/m4x1m/.xbmc/addons/script.cdartmanager/resources/lib/download.py", line 78, in make_music_path
12:29:52 T:2835340144 M:3833782272   ERROR:     make_dir( path )
12:29:52 T:2835340144 M:3833782272   ERROR: OSError: [Errno 13] Permission denied: 'Avril Lavigne'

Automatic Download (clearlogo)

Download 0 clearlogo. Seems that the script want to create a folder that already exist.

My library music is on a NAS and no password is set to access it.

Sorry for my poor english!


- giftie - 2011-07-02

m4x1m Wrote:Great works!

But I have a little problem...

Code:
12:29:52 T:2835340144 M:3833782272   ERROR: Traceback (most recent call last):
12:29:52 T:2835340144 M:3833782272   ERROR:   File "/home/m4x1m/.xbmc/addons/script.cdartmanager/resources/lib/download.py", line 78, in make_music_path
12:29:52 T:2835340144 M:3833782272   ERROR:     make_dir( path )
12:29:52 T:2835340144 M:3833782272   ERROR: OSError: [Errno 13] Permission denied: 'Avril Lavigne'

Automatic Download (clearlogo)

Download 0 clearlogo. Seems that the script want to create a folder that already exist.

My library music is on a NAS and no password is set to access it.

Sorry for my poor english!

a couple of questions...

Do you have the "Path to Music Library" filled in in settings?
Which version of XBMC are you using?


- m4x1m - 2011-07-02

giftie Wrote:a couple of questions...

Do you have the "Path to Music Library" filled in in settings?
Which version of XBMC are you using?

I'm sorry, I was too hasty to post, I solved filling Music Path in settings, I had not seen the option. Blush

Again great job!


- jasonlcox - 2011-07-03

Hi giftie, thanks for making this script! I've been waiting for something like this for ages!

I have a couple of questions that I hope you can help me with.

(I'm running XBMC live Dharma 10.1 from USB, streaming music from a Windows 7 machine using SMB)

1. Do I have to set a music path? If I leave the default setting (nothing) will it save art at the location the music files are stored?

Also: is the extrafanart path handled the same way?

2. How do I set the music path if my music files are stored in two separate shares?

Also: is the extrafanart path handled the same way?

3. Do I have to manually create an extrafanart folder within the artist folder, or will cdART Manager create one automatically?


- Kode - 2011-07-03

If you leave the path at nothing, the logos will not work. This is because xbmc doesn't return an artist path as the same artist could be scattered about in different locations.

If you have a structure like /music/artist/album/songs and you put /music/ as your path then the logos will be stored in artist folder.

extrafanart is slightly different I believe as it only works when a song is playing, and at a song playing level the directory is returned (I think anyway), so I think if you have the same artist on different shares you could put an extrafanart in the artist directory for both? Never tried it to be honest as I use unraid, so while my music is on different disks, it shows up as 1 pool.


- jasonlcox - 2011-07-03

Thanks Kode. So, it's not possible to include multiple shares in the music path setting? Should I set the path for one (e.g. E:\Music1\), run the cdART Manager auto search, then set for another path (e.g. F:\Music2\) and run it again?


- giftie - 2011-07-03

jasonlcox Wrote:Hi giftie, thanks for making this script! I've been waiting for something like this for ages!

I have a couple of questions that I hope you can help me with.

(I'm running XBMC live Dharma 10.1 from USB, streaming music from a Windows 7 machine using SMB)

1. Do I have to set a music path? If I leave the default setting (nothing) will it save art at the location the music files are stored?

Also: is the extrafanart path handled the same way?

2. How do I set the music path if my music files are stored in two separate shares?

Also: is the extrafanart path handled the same way?

3. Do I have to manually create an extrafanart folder within the artist folder, or will cdART Manager create one automatically?


The Music Path is needed for a couple of reasons, Skins that are using ClearLogos need to be able to source the path to the Artist level of the file storage. Most if not all use a method of adding the artist name to the supplied Music Path.

This also creates some problems. If your artist name is slightly different than your path things can get interesting...

For example the artist P!nk, your music path may be /music/Pink/Funhouse but you id3tagger has the artist as P!nk. The skin looks for /music/P!nk/logo.png, so it would not find the logo.png if it was stored in music/Pink. I have the script trying to make a directory that matchs your music path and artist(as stored by XBMC), the reason I say 'try' is because with the changes in Eden, cause some issues with network drives(smb://)

So the script does(tries) make the proper folders for logos and extrafanart(if it is a locally mapped drive, it works really well) I also do believe that Extra fanart works the same way(well I know it does on Transparency!)

So short answers:

  1. yes you need to enter a Music Path(make it the same one you use for your Skin)
  2. You can set your main path(the one that stores the most of your music) and the script will fill in the missing blanks if it can
  3. The script is able to make the final paths for the artwork



- giftie - 2011-07-03

jasonlcox Wrote:Thanks Kode. So, it's not possible to include multiple shares in the music path setting? Should I set the path for one (e.g. E:\Music1\), run the cdART Manager auto search, then set for another path (e.g. F:\Music2\) and run it again?

This is a downfall of how XBMC provides the 'Artist Level' path(there isn't one Smile ) This is done by design(not a bad choice) as some users only have tracks for thier music collection(so no music/artist/album paths to use)


- giftie - 2011-07-03

I thought I should mention, that this script only works on the Album Artist level, as cdARTs and Covers work this way. It can be changed to handle all artist on the Fanart/Logo levels if others think it should(maybe an option) 95% of my music is Album Artist driven in sorting) Though this would add conciderable amout of time to searching for logos(looking up all those extra artists).


- jasonlcox - 2011-07-05

Thanks giftie. I'll give it a try tonight. Might have some problems as I don't think I have the album artist field tagged in my music files, only the artist field - I don't have any multi-artist songs.