[RELEASE] cdART Manager Script

  Thread Rating:
  • 6 Votes - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
giftie Offline
Skilled Python Coder
Posts: 2,039
Joined: Mar 2010
Reputation: 35
Post: #1
This is my first attempt at a script for XBMC. Originally I had set out to provide myself an Dharma version of CDArt Downloader, but then it grew and changed.

Screenshots:

Main menu
[Image: a2a383daebd0ebb4b3bef294b90a1379f5fd7434...7b0c6g.jpg]

Album List
[Image: 9ef447fbd08e81db188029787795d64d0e2e4345...03236g.jpg]

Cover Art List
[Image: 1364da47f181357792fc7ed8cfe7d5d789081717...159e6g.jpg]

Fan Art List
[Image: b8e9204c9fb4f7df9ea610f9b2820cb8decdb11b...37ea6g.jpg]

ClearLOGO List
[Image: 31421fc5de1708d54f393b55ef4c10c8bb12dcea...c3e76g.jpg]

Viewing Images after Auto Download
[Image: b2cf2ec95a21282a7b5f92b3143dea9af0696c94...b17a6g.jpg]


Frodo Version available on the official XBMC repo



Latest test version


When updating from 2.7.4 or earlier, please follow these instructions
To fix the errors that may have been introduced by the change on MusicBrainz do the following
- Set 'Enable MusicBrainz ID update during Addon Database update' to on
- Set 'Check Database MBID's to be current during an Update' to on
- Then preform a database update. The script should fix the MBID's that have extra info.


Available through the Official repo

Current version 2.6.5

Revisions:

Code:
2.7.9
- Fix - change setting to float then integer
- Fix - requesting too many values from first time database building.

2.7.8
- Fix - Remove Extrafanart Limit for Eden version
- Change - Use the JSON format of the Fanart.TV API
- Change - remove the old 'get recognized artists' in favour of the new New Music from Fanart.TV
- Add - make use of fanart.tv's new music option in API
- Add - User can now set the MusicBrainz server
- Fix - correct Frodo issue

2.7.7
- Fix - Add time delay to MusicBrainz Release MBID to Release Group MBID function
- Fix - Build a new Database if one does not exist during an Update(mainly for The Scheduler)
- Add - Extrafanart download limit

2.7.6
- Fix - Single artwork download
- Fix - clean up recognized artist code
- Change - skip artist if Distant MBID is missing, no point bugging fanart.tv for something it already reported that it does not have.
- Add - Use internal XBMC Library MBID's if available
- Fix - Frodo changes
- Add - option to enable/disable replacing trailing period with illegal character replacement character

2.7.5
- Add - skin property for scheduler service script
- Add - ability to update database from outside of script
- Fix - errors when update runs in background
- Add - cache fanart.tv data for when The Scheduler is used(adjustable, preset to 3 days, but adjustable from 1 to 7)
- Fix - MusicBrainz xml changes
- Add - illegal character replacement in artist name for saving
- Fix - script was downloading the same artwork(clearLOGOs)
- Change - change method to create dialogs and logging

2.7.4
- Add - Add support for the new Artwork available from fanart.tv(HD Music Logos, Music Banners)
- Add - Add setting to enable/disable the New HD Music logos, enabled will overwrite older clearLOGO during an auto download
- Add - Add autobanner to the auto download start mode
- Update - Updated French strings - Thanks Hellnino18
- Update - Updated German strings - Thanks solidsatras
- Update - Updated Portuguese (Brazil) - Thanks Wanilton

2.7.3
- Fix - Change LF to CRLF in missing.txt file
- Fix - keep script functioning with XBMC Development Master
- Add - script can be started in artwork auto download modes, modes - autocdart, autocover, autofanart, autologo, autothumb, autoall. All these are done in the background
        To use:
                RunScript(script.cdartmanager,mode)
                
                Eg: RunScript(script.cdartmanager,autoall) <- starts the script downloading everything in the background

2.7.2
- Change - code cleanup
- Fix - Update Database was not properly updating All Artist Id
- Fix - Modify Database menu movement was not proper

2.7.1
- Fix - JSONRPC erros
- Fix - Manual MBID entry did not work as intended

cdART Template for Photoshop

http://fanart.tv/wp-content/uploads/2012...v3.5.2.zip - Thanks Kode & filthycatbox
Instruction are inside zip file

cdART Template for GIMP

http://fanart.tv/wp-content/uploads/2012...p-v2.0.zip - Thanks Sekhmet & Martijn
Instructions

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


(This post was last modified: 2013-03-17 20:26 by giftie.)
find quote
giftie Offline
Skilled Python Coder
Posts: 2,039
Joined: Mar 2010
Reputation: 35
Post: #2
Settings:
Files & Folders

Path to music library

This path represents the path skins use to access the ClearLOGOs(logo.png), fanart, extrafanart, Artist Thumbnails and Music banners on an artist level. This path does not need to point directly to your music library if you don't want to clutter up your music with ClearLOGOs or extrafanart. You can set up an 'Artwork' path which both your skins and the script will point to.

cdART Backup Folder

This is the path where you would like your cdARTs to be copied to if you use the backup feature from the Advanced menu in the script.

Enable saving of missing.txt file

If enabled, the script will save a missing.txt file at the closing of the script.

Path for missing.txt file - active only if above is turned on.

This is the path where you would like the missing.txt file to be stored. In this file shows the albums/artists that are missing artwork. An 'X' means the art work is there and empty box means there is no artwork on your system

Backup Saving Format

There are two choices here. Artist/Album.png or Artist - Album.png. This is used by the script to name the cdARTs when using one of the backup options from the Advanced menu. Since normally all the cdARTs are named cdart.png the script needs to rename them when storing them in the backup folder.


Custom Colours

This is where you get to select the colouring of the text labels you want displayed within the script.


Extra Settings

Overwrite Low-Res Existing cdARTs

If enabled, the script will look at the resolution of the local cdART and compare it to the one found on fanart.tv. If the local is smaller than 1000x1000 and the one on fanart.tv is 1000x1000 it will download from fanart.tv. This only is used for automatic download, as you can always overwrite when using the manual method. Also Cover Arts(folder.jpg) will always be overwritten as fanart.tv only has the resolution of 1000x1000 available.

Notify During Background Database Build

If enabled, the script will use the XBMC notification popup to show Artist & Album info while the background db is being built. This can be pretty noisy if you have skin sounds turned on.

Notify At End of Background Database Build

If enabled, the script will use the XBMC notification popup to show that the DB is finished being built(it is also displayed for 2 seconds)

Build Database in Background

Clicking on this will start the script building the Database in the Background. This allows you to continue on enjoying XBMC while the script does it's thing. To exit the settings, just click on the 'OK' button.

Update XBMC Thumbnails and Fanarts - Only works with Eden at this moment

This will trigger the script to find all your artwork files(except cdARTs) and overwrite the ones stored in the userdata/Thumbnails/Music folder

Add all artist to Database during Database build or update

If enabled, the script will add/update all the local artist(including those found on compilations) to/in the Database

Enable MusicBrainz ID update during Addon Database update(for missing IDs)

If enabled, the script will update any missing MusicBrainz IDs that may have been missed in the past during a Database Update(useful for those database created with version 2.5.1).

Check Database MBIDs to be current during an Update

If enabled, the script will check the MBIDs for the albums/artists contained in the scripts database against MusicBrainz then if necessary update them to the latest. This will add a lot of time to the update as it takes time to check MusicBrainz

Skins That Feature cdART: - See here for the most uptodate info

Transperency!
Night - all variations(Purity, Neon)
The Carmichael
Shade
Aeon MQ 2 & 3
Aeon65
Alaska Revisited MOD
Cirrus - all variations - though it spins too fast and not proportioned nicely to album cover
Aeon Nox


There may be other skins that can display cdART with mods. If you see one, please post the thread link and I'll have it posted here for all to see...

Important Threads
Best Folder Arrangement -> http://forum.xbmc.org/showthread.php?tid...pid1111997
MusicBrainz Picard Setup -> http://forum.xbmc.org/showthread.php?tid...pid1102795

Useful tools
Bliss - > http://www.blisshq.com/ - for reorganizing the structure of your music folder

Steps for reporting problems/bugs

http://wiki.xbmc.org/index.php?title=Log_file/Easy

I'm not trying to be rude, or negative, but when reporting a bug or a problem you are having please follow the following....

Step 1: Put XBMC into Debug Mode - link
Step 2: Restart XBMC
Step 3: If you have addons that run automatically at start of XBMC(Sharethe.TV, Weather.com Plus, etc.) wait a few minutes for these scripts to run
Step 4: Run cdART Manager
Step 5: Upload your FULL xbmc.log file to pastebin.com

Method 1:

Use the XBMC Log Script

Method 2:

Manually locate your xbmc.log file - see Here for location
Copy and paste xbmc.log to pastebin.com

If you feel you have private information that you don't want the public be able to see, setup an account on pastebin.com and store it as a private paste.

Step 6: Create a new forum message on this thread, which contains steps to reproduce, your pastebin url


Using these steps will allow me to find the problem and repair it for the next release.

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


(This post was last modified: 2013-03-27 06:10 by giftie.)
find quote
ppic Offline
Skilled Python Coder
Posts: 2,663
Joined: Feb 2009
Reputation: 10
Location: France idf
Post: #3
happy to see that someone continu my work Wink

[Image: widget]
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
find quote
giftie Offline
Skilled Python Coder
Posts: 2,039
Joined: Mar 2010
Reputation: 35
Post: #4
Hope you don't mind... It was quite a learning experience, especially changing it over to a script...
find quote
giftie Offline
Skilled Python Coder
Posts: 2,039
Joined: Mar 2010
Reputation: 35
Post: #5
For those who make their own cdARTs I thought I might give a little example of one of the reasons I created this script. I doubt I'm the only one that does this. When I sit down to make my missing cdARTs I do them in batches 40-50 at a time. So adding them to the album folders gets quite tedious(ok, I'm a bit lazy.. Wink ) With this script, they can be added quite easily. Here's how.

When creating the cdARTs save them in a folder in one of the two following ways:

Artist/Album.png <- where the artist and the album matches the ID3tag info that xbmc builds the library off of.
ex:
ACDC/Live - CD 1.png (for us linux users)
ACDC\Live - CD 1.png (for the Windows users)

-or-

artist - album.png

acdc - live - cd 1.png

both these are case dependent. the first way the folder/filename needs to match the ID3Tag(beware of non-standard characters like the slash brothers(aka forward '/' and backward '\' slashes) this get interpreted as new folders when the files are written.) The second, everything needs to be in lower case. Both ways work correctly, though the second way probably is the easiest.

Now run the script. First go to the Settings option. While in the Settings screen, set the Backup folder to the one you created the cdARTs into. Next set the File format to the one you used, select OK to save the setting and leave the screen. Now select the cdART Backup option in the Advance menu. When your ready, click the Restore from Backup option.

The program then takes over and starts copying the files from the backup folder to the Album folders(as long as you have write permissions set so XBMC can write to those folders. Which you should otherwise the program will fail on any of the downloading options) If all goes well(it should - though spelling mistakes happen) The final dialog will show the total number of cdARTs copied.
find quote
vanMiez Offline
Senior Member
Posts: 175
Joined: Apr 2010
Reputation: 0
Location: Berlin, Germany
Post: #6
Hi,
first of all thank you for this good working script.
I have a suggestion wich would make this script much more efficient.

it would be much better to look up first %album% and if there are multiple results combine it with %album artist% instead of looking up every %artist% - %album% combination.
that could save much time, if there are many compilations in the music db.

keep going with your good work
find quote
redje Offline
Member
Posts: 93
Joined: Jan 2009
Reputation: 0
Post: #7
i was happy to see the cd-art manager and would like to try it out, but now it says:

"Invalid or Deleted File"
find quote
giftie Offline
Skilled Python Coder
Posts: 2,039
Joined: Mar 2010
Reputation: 35
Post: #8
redje - Try this link. I'll change it on the main topic page

http://www.mediafire.com/?wjtnrywltew

vanMiez - glad to get comments.. I'm not sure about the area you are talking about. When the program is first run, it looks for any cdARTs you may have(ones that are located in the music path) based on XBMC's music library, it then builds a local database(which speeds the next use of the program up) This the only time it looks at everything(locally). When searching for cdARTs, it is probably easier to do it by Artist since there will be fewer Artist than Albums(as this script does). If you can give me a bit more detail, I'll look into it.
find quote
vanMiez Offline
Senior Member
Posts: 175
Joined: Apr 2010
Reputation: 0
Location: Berlin, Germany
Post: #9
ok...
for me it looks like the script is going through the artist library of xbmc (or the one build by it's own) and connects this info with the album information. (on wich album is a track by this artist?)
an example: (thats what it looks for me how it is currently working)

step1: looking for %artist% in db -> found: 'david guetta'
step 2: looking for %album% on wich is a track of this artist -> found: 'one love', 'dream dance 40' ... (two online lookups)
step 3: looking for cdart -> found: 'one love' -> downloading
the other combination wouldn't be found cause such a combination isn't existing on xbmcstuff.com

the main problem is:
if you're looking for %artist% there are much more entries because of entries like: 'david guetta ft. akon' 'david guetta ft. kelly rowland' 'david guetta ft. kid cudi' ...wich will never find a cdart because in the xbmcstuff.com db its only the %album artist% wich is important. i know that xbmc has the option to hide %artist% wich is only on compilation, but that wouldn't solve the problem i think (probably it would).

so i think it would be better if the first lookup will be the %album% tag because there're much less %album% entries than %artist% entries because of compilations, soundtracks, and those feat. things.
naturally these %album% tags have to be combined with %album artist% (or %band% tag, don't know wich one is used by xbmc - i have both tagged) because of 'best of' albums or same named albums by different artists.

so thats what i guess is more efficient:

step 1: looking for %album% -> found: 'one love'
step 2: looking for %album artist% or %band% -> found: 'david guetta'
step 3: looking for cdart -> downloading
that will cause one lookup online and later one lookup for 'dream dance 40' by 'various artists' wich seems like being equal (in this case) to the procedure you're using BUT: you are causing about 12 lookups for the 'one love' album (because the're many featurings) and about 40 lookups for any compilation (with no result) compared to the other way around wich will still cause only two lookups.

hmmm after writing and thinking twice it would probably be enough to change the lookup in your script from %artist% to %album artist%
let me think about it :-)
but until now: what do you think?
hopefully i haven't missunderstood the way your script is working
find quote
giftie Offline
Skilled Python Coder
Posts: 2,039
Joined: Mar 2010
Reputation: 35
Post: #10
The ultimate goal of the script is to search via Album Artist, since this is looking for cd art. Getting the right info from the music database(completely and properly.) I have found even with my own music is slightly improperly labeled(in the id3tags).
find quote
Post Reply