Album art in artist view

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #11
Based purely on file structure I believe, and I think it's only if you Set Artist from the context menu? I don't think it does it on scan, unless spiff added that when he redid the allmusic stuff for scantime.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
SandmanCL Offline
Multi-platform XBMC fan
Posts: 572
Joined: Jul 2004
Reputation: 1
Location: San Francisco, CA
Post: #12
I just created a script that copies /music/artist/Album1/Folder.jpg to /music/artist, deleted the music library and scanned from scratch. Artist thumbs did not get scanned automatically. So manually selected 'Set artist thumb' and chose 'Local copy' for each artist. 177 artists later and my music library now looks pretty nice in Artist view Smile

It would be great if artist/Folder.jpg got scanned automatically though...
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #13
The problem is it's difficult to decide whether the filesystem is actually artist/album/song or not. I'll have a quick look this afternoon to determine the exact difficulties and post here in case you or someone else may want to take a look into it.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #14
Right, the scanning code currently works like this:

For each folder:

1. Read the folder.
2. Grab the songs in the db that are from this folder, and remove them from the db.
3. Check for various artists + album folder art etc.
4. Add each song to the db.
5. Optionally scan each artist and album *per song*.
6. For each subfolder, repeat from 1.

The problem here is we never are really in the "root" artist folder in a position to scan info about the artist.

One possible idea is to take the optional reading of artist + album info out and instead just maintain a list of artists and albums to scan.

At the end of all song scanning, we then run through and scan artist + album information - the advantage here is we know the "base path" for a particular artist, so can match nfo files and thumbs. I'm a little worried about assuming folder.jpg in an artist's basepath is the artist thumb though - perhaps artist.nfo may be a better bet.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Mental Block Offline
Senior Member
Posts: 107
Joined: Oct 2003
Reputation: 0
Location: Kent, UK
Post: #15
Would it be possible to create the artist art from the album art and stacking it in a spiral like in WMP? I like this view as it shows you at the artist level how many and which albums you have for that artist. Also looks kinda cool Smile

If you have never seen how WMP does this then I can do a screen shot and up load.
find quote
kraqh3d Offline
Retired Developer
Posts: 7,183
Joined: Dec 2003
Reputation: 4
Location: New York City, USA
Post: #16
jmarshall,

i had thought about that. if you search for all songs by an artist and comare the paths, you can derive some root artist path. the question is what to do when the artist exists in two places.

in my personal case, i have both a "main library" and a "new music" location. each of which is organized path wise as smb://server/music/<library|new>/artist/album/song.mp3. in this case, the root artist path for every artist which exist in both my main library and my new music is the share point smb://server/music/.

in this case, i happen to have both locations off a common share because im using symlinks to make them available that way. if i had two share points, then the base path would be smb://server.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #17
The code to determine root artist path is CMusicDatabase::GetArtistPath(). Whether or not it can be improved is up for debate Smile

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
nuzecast Offline
htbackdrops.com admin
Posts: 56
Joined: Sep 2007
Reputation: 1
Post: #18
SandmanCL Wrote:I just created a script that copies /music/artist/Album1/Folder.jpg to /music/artist, deleted the music library and scanned from scratch. Artist thumbs did not get scanned automatically. So manually selected 'Set artist thumb' and chose 'Local copy' for each artist. 177 artists later and my music library now looks pretty nice in Artist view Smile

It would be great if artist/Folder.jpg got scanned automatically though...


Would it be possible to share that script?

I find the allmusic thumbs not all that attractive, so I'd like to somehow automate the creation of an artist folder.jpg like you have.

With over 1000 artists in my database it'll take some time to choose the new thumbnail so I too wish XBMC would use the artist folder.jpg it if it exists.

Thanks
Randy
find quote
SandmanCL Offline
Multi-platform XBMC fan
Posts: 572
Joined: Jul 2004
Reputation: 1
Location: San Francisco, CA
Post: #19
Here's the script I used for this. Not the most fancy thing in the world but it gets it done.

The snippet of code is perl, not php. But wrapping with PHP gives pretty syntax highlighting Smile

The script is indended to run inside a music/ folder organized as follows:

Artist 1/Album 1
Artist 1/Album 2
Artist 2/Album 1

etc.

If you have a windows box this most likely won't work. if you happen to have perl installed, however, you most likely know what to change Smile

The script goes through each artist and creates a hard link(*) of Folder.jpg from the first album down to the artist directory.
PHP Code:
#!/usr/bin/perl

@dirs split/\n/,`ls -1`; # use 'dir' instead of 'ls -1' in windows

foreach $dir (@dirs) {
  print 
"$dir\n";
  
chdir("$dir");
  
$name = (split/\n/,`ls */Folder.jpg`)[0]; # use 'dir' instead of 'ls' in Windows
  
system("ln -f \"$name\" Folder.jpg"); # use 'copy' instead of 'ln -f' in windows
  
chdir(".."); 



(*) hard link = unix speak... essentially a copy but it doesn't take up extra disk space
find quote
Post Reply