Why does artist preview has darkgray borders? (1 Viewer)

J

joostzilla

Guest
Since audioscrobbler does not find any artist images i have to create them from within the music config. But when i enable that option and scan my 5500 songs database the thumbs that are created all have dark gray borders. And some have more than one images. In all my folders i've created a artist preview image called folder.jpeg (for use in shares view). and all files have coverart in their tag.

So why is the artist preview not created exactly as the album thumb or even as the folder.jpg? It frustrates me a lot that it takes so much trouble to make the music section work like it should be. Imo all the options are way to scattered around the configuration. And it simple does not work!!!
And yes offcourse ive followed every music guide on the forum.

Hope this will get better in RC2
 

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Not sure if will help or not but I am currently doing some playing about and have a very badly written piece of code that should download artist images from last.fm.

    Could you download something like SQLiteBrowser and just check there are entries in the artist table. Assuming there are could you provide me a list of four or five where Audioscrobbler did not download anything?
     
    J

    joostzilla

    Guest
    Not sure if will help or not but I am currently doing some playing about and have a very badly written piece of code that should download artist images from last.fm.

    Could you download something like SQLiteBrowser and just check there are entries in the artist table. Assuming there are could you provide me a list of four or five where Audioscrobbler did not download anything?

    Lol, i have no idea how to achieve what you mean. :D
    Can you please guide me through?
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    dowload
    sqlitebrowser.sourceforge.net/
    open the music database. you should then be able to select the browse data option & choose the artist table to see what is actually in the database. just want to see if there is a reason for missing thumbs or not .
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    OK, attached is a program (and source code) that will go through the artists in your music database and scrape last.fm for images. The code is terrible and badly written, this has just come out of me playing with some last.fm stuff for something else and is not really release code but will work.

    It is so basic you need to type in the path to your MP music database and the folder in which thumbs are stored. It will then go through each artist in the database and any who do not have a thumb it will attempt to download a small and large thumb. I just did this and picked up something like 371 out of 383 artists. It will not overwrite any existing files so if you want to scrape from scratch you need to delete the existing ones.

    I did notice a couple of cases where it did not handle the last.fm return codes (in fact it is so basic it is not even using the API so it could look at them...) You will need to just check the downloads afterward as things like Various Artists will get the red image of last.fm telling you to tag your music correctly.

    I have a feeling this might not work if your artist tags have move the etc to the end (ie. The Beatles as been stored as Beatles, The) and there is probably some dubious unicode type issues lying around.

    I hope this helps you so you can help me by getting he music screens setup in Maya :D
     

    Attachments

    • program.zip
      30.6 KB
    • source.zip
      30.6 KB
    J

    joostzilla

    Guest
    OK, attached is a program (and source code) that will go through the artists in your music database and scrape last.fm for images. The code is terrible and badly written, this has just come out of me playing with some last.fm stuff for something else and is not really release code but will work.

    It is so basic you need to type in the path to your MP music database and the folder in which thumbs are stored. It will then go through each artist in the database and any who do not have a thumb it will attempt to download a small and large thumb. I just did this and picked up something like 371 out of 383 artists. It will not overwrite any existing files so if you want to scrape from scratch you need to delete the existing ones.

    I did notice a couple of cases where it did not handle the last.fm return codes (in fact it is so basic it is not even using the API so it could look at them...) You will need to just check the downloads afterward as things like Various Artists will get the red image of last.fm telling you to tag your music correctly.

    I have a feeling this might not work if your artist tags have move the etc to the end (ie. The Beatles as been stored as Beatles, The) and there is probably some dubious unicode type issues lying around.

    I hope this helps you so you can help me by getting he music screens setup in Maya :D

    Wow, this works like a charm. 116 out of 134. Thanks. Too bad the images are all different formats. Why Last fm does not have all images in the same size (square) is beyond me ;).
    Now I have to modify all images myself. btw i have all artist previews in the Artist folder as folder.jpg. Is there a way to scrape these images and rename them to the artist folder name?

    Where exactly can i help you with regarding to the music screens in Maya :D
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Wow, this works like a charm. 116 out of 134. Thanks. Too bad the images are all different formats. Why Last fm does not have all images in the same size (square) is beyond me ;).
    Issue 159 - mamp2 - Images scaled in music browsing - Project Hosting on Google Code ;)

    Now I have to modify all images myself. btw i have all artist previews in the Artist folder as folder.jpg. Is there a way to scrape these images and rename them to the artist folder name?
    Depending on your folder structure this would be fairly easy to do. Do you have music stored as something like
    Code:
    \artist\album
    With the album artwork stored as folder.jpg in the album folder and a folder.jpg stored in the artist folder which you want used as the artist thumb in MP? If this is the case then a simple batch file copy should do the job. Let me know how your files are structured

    Where exactly can i help you with regarding to the music screens in Maya :D
    If you can make the nowplaying screen look as good as the mockup
    https://forum.team-mediaportal.com/...ease-06-02-10-a-68747/index53.html#post576307
    I will be a very happy man :D
     
    J

    joostzilla

    Guest
    My file structure is indeed as you described

    Music/artist (cointaining folder.jpg)/album (also containing folder.jpg)

    And yes, the plan is to make it as close to the mockup as possible with this skin engine ;)

    btw. thanks for your help
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    My file structure is indeed as you described

    Music/artist (cointaining folder.jpg)/album (also containing folder.jpg)
    In that case this will do the job. Just copy and paste this into a text file, change the two directories to the right values and then save as a .vbs file. Double click that file and it will copy the files across. (only did a quick test but this should work). It will not overwrite any files


    Code:
    option explicit
    
    dim objFSO, objFolder, objSubFolders, objArtistFolder
    dim strArtistname, strFolderJPG, strThumbJPG
    
    
    '==== change these values ===
    const strMusicFolder ="c:\a"
    const strThumbFolder ="c:\b"
    
    
    set objFSO = CreateObject("Scripting.FileSystemObject")
    set objFolder = objFSO.getfolder(strMusicFolder)
    set objSubFolders = objFolder.SubFolders
    
    for each objArtistFolder in objSubFolders
    	strArtistName = objArtistFolder.Name
    	strFolderJPG = objArtistFolder.path & "\folder.jpg"
    
    	with objFSO 
    
    	if .FileExists (strFolderJPG)  then
    	
    		'large thumbs
    		strThumbJPG = strThumbFolder & "\" & strArtistName & "L.jpg"
    		if not .FileExists (strThumbJPG) then .CopyFile strFolderJPG, strThumbJPG
    
    		'small thumbs
    		strThumbJPG = strThumbFolder & "\" & strArtistName & ".jpg"
    		if not .FileExists (strThumbJPG) then .CopyFile strFolderJPG, strThumbJPG
    
    	end if
    
    	end with
    
    next
    
    set objArtistFolder = nothing
    set objSubFolders = nothing
    set objFolder = nothing
    set objFSO = nothing
     
    J

    joostzilla

    Guest
    thanks for this... Only i receive an error message: see attachment.
    Am i doing something wrong?



    option explicit

    dim objFSO, objFolder, objSubFolders, objArtistFolder
    dim strArtistname, strFolderJPG, strThumbJPG


    '==== change these values ===
    const strMusicFolder ="L:\iTunes Music"
    const strThumbFolder ="C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\Music\Artists"


    set objFSO = CreateObject("Scripting.FileSystemObject")
    set objFolder = objFSO.getfolder(strMusicFolder)
    set objSubFolders = objFolder.SubFolders

    for each objArtistFolder in objSubFolders
    strArtistName = objArtistFolder.Name
    strFolderJPG = objArtistFolder.path & "\folder.jpg"

    with objFSO

    if .FileExists (strFolderJPG) then

    'large thumbs
    strThumbJPG = strThumbFolder & "\" & strArtistName & "L.jpg"
    if not .FileExists (strThumbJPG) then .CopyFile strFolderJPG, strThumbJPG

    'small thumbs
    strThumbJPG = strThumbFolder & "\" & strArtistName & ".jpg"
    if not .FileExists (strThumbJPG) then .CopyFile strFolderJPG, strThumbJPG

    end if

    end with

    next

    set objArtistFolder = nothing
    set objSubFolders = nothing
    set objFolder = nothing
    set objFSO = nothing
     

    Attachments

    • error.jpg
      error.jpg
      18.2 KB

    Users who are viewing this thread

    Top Bottom