App to Copy Artwork and Details to Movie Folder v0.5.6 (1 Viewer)

kiwijunglist

Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    no worries, would love to test it. i use autohotkey a little, but i couldn't figure out how to read a directory. I'm not a programmer so thought it would probably take me several days to figure it out, while a programmer could do it in half an hour.
     

    jmcentire

    Portal Pro
    November 7, 2008
    85
    136
    Home Country
    United States of America United States of America
    I can also suggest a similar idea for music

    Most users use the following structure
    \artist\album\filename.mp3

    Most users have \artist\album\folder.jpg = album thumbnail

    It would be good to autocreate \artist\folder.jpg = artist thumbnail

    Mediaportal already has the artist images in C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\thumbs\Music\Artists\
    There are two images for each arist, aristname.jpg and artistnameL.jpg
    These images are created automatically by audioscrobber plugin and creates an artist image from last.fm for every artist in the database.
    A stand alone application could populate artist folder.jpg as follows

    1. User select root music folder %rootfolder%
    2. Applications scans the name of each of %rootfolder%'s level 1 subfolder and stores it as %subfoldername%
    3. If exist C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\thumbs\Music\Artists\%subfoldername%L.jpg then copy that file to %rootfolder%\%subfoldername%\folder.jpg

    I don't have music setup on my machine, so I went off exactly what you told me, should work but let me know either way.
     

    Attachments

    • MP Music Artwork Copier v0.1.1.zip
      30.7 KB

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Works perfectly on 95% of my music, thanks!!!!

    It failed on a few artists with The prefix.

    i have "The Smashing Pumpkins" subfolder and "The Smashing PumpkinsL.jpg", so that works fine.
    i have "The Mint Chicks" subfolder and have "Mint ChicksL.jpg" so that doesn't work.

    Mediaportal or audioscrobber plugins strips the 'The' prefix from some artists but not all.

    It also failed on a couple of compilation albums however that is because mediaportal grabs arist images not album artist images, and i can't see an uncomplicated way around this problem.

    Therefore i can suggest one improvement

    Code:
    1. User select root music folder %rootfolder%
    2. Applications scans the name of each of %rootfolder%'s level 1 subfolder and stores it as %subfoldername%
    3. If exist C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\thumbs\Music\Artists\%subfoldername%L.jpg
        then copy that file to %rootfolder%\%subfoldername%\folder.jpg
    
    4. if notexist C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\thumbs\Music\Artists\%subfoldername%L.jpg
       AND first four letters of %subfoldername% = "The " Then
           4a. %shortartistname% = %subfodlername% less first 4 characters
           4b. If exist C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\thumbs\Music\Artists\[B]%shortartistname%L.jpg[/B]
                 then copy that file to %rootfolder%\%subfoldername%\folder.jpg
     

    jmcentire

    Portal Pro
    November 7, 2008
    85
    136
    Home Country
    United States of America United States of America
    Works perfectly on 95% of my music, thanks!!!!

    It failed on a few artists with The prefix.

    i have "The Smashing Pumpkins" subfolder and "The Smashing PumpkinsL.jpg", so that works fine.
    i have "The Mint Chicks" subfolder and have "Mint ChicksL.jpg" so that doesn't work.

    Mediaportal or audioscrobber plugins strips the 'The' prefix from some artists but not all.

    It also failed on a couple of compilation albums however that is because mediaportal grabs arist images not album artist images, and i can't see an uncomplicated way around this problem.

    Therefore i can suggest one improvement

    Code:
    1. User select root music folder %rootfolder%
    2. Applications scans the name of each of %rootfolder%'s level 1 subfolder and stores it as %subfoldername%
    3. If exist C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\thumbs\Music\Artists\%subfoldername%L.jpg
        then copy that file to %rootfolder%\%subfoldername%\folder.jpg
    
    4. if notexist C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\thumbs\Music\Artists\%subfoldername%L.jpg
       AND first four letters of %subfoldername% = "The " Then
           4a. %shortartistname% = %subfodlername% less first 4 characters
           4b. If exist C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\thumbs\Music\Artists\[B]%shortartistname%L.jpg[/B]
                 then copy that file to %rootfolder%\%subfoldername%\folder.jpg

    Added that, give the new version a try(attached to the above post):
    https://forum.team-mediaportal.com/...ils-movie-folder-71649/index6.html#post527298
     

    dongadomski

    Portal Member
    November 29, 2009
    6
    0
    question regarding special characters

    Hi all,

    thanks for the cool script. It works perfectly well for me with one little drawback.

    If I use special characters i.e. german ä,ö,ü the extraction from the database and the creation of the .nfo files will not work.

    If I change the directory names, the .nfo creation works although the characters are still included in the movie title.
    However, the cover art cannot be extracted from the "thumbs" directory with the following error message in the log-file.
    "Cover not found at C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Covers\FullSize\{WALL-E.-.Der.Letzte.räumt.die.Erde.auf} [326824773].jpg for WALL-E - Der Letzte räumt die Erde auf - 20091129103952"

    Is it possible to include the use of this special characters in the script - with limited effort?

    Or am I just missing something? :confused:

    Thanks
    DonGadomski
     

    dongadomski

    Portal Member
    November 29, 2009
    6
    0
    Hi all,

    I made some additional tests. It seems that the csv export of sqlite is in utf8 format and special characters cannot be read by autohotkey. I paused the script and reformatted the csvs to ansi - it works.
    As the next step I want to include stringconverter in the script to format the file to ansi.
    Probably this is all to complicated as the variables can be changed inside autohotkey from unicode to ansi.
    However, I was not able to understand autohotkey quick enough to get the A_Loopfield converted in the right way. So I will give stringconverter a try. But my next chance will be on Thursday.

    A hint to an elegant way to change the file/variables to ansi inside autohotkey would be very appreciated.
    Can sqlite probably be switched to export ansi csvs?

    Thanks for even the smallest idea.
    CU
    Dongadomski
     

    jmcentire

    Portal Pro
    November 7, 2008
    85
    136
    Home Country
    United States of America United States of America
    I had noticed that problem before, and it seems you have found what is causing it...I'll try and take a look at it in the next day or two to see if I can get it to work.
    Thanks

    Hi all,

    I made some additional tests. It seems that the csv export of sqlite is in utf8 format and special characters cannot be read by autohotkey. I paused the script and reformatted the csvs to ansi - it works.
    As the next step I want to include stringconverter in the script to format the file to ansi.
    Probably this is all to complicated as the variables can be changed inside autohotkey from unicode to ansi.
    However, I was not able to understand autohotkey quick enough to get the A_Loopfield converted in the right way. So I will give stringconverter a try. But my next chance will be on Thursday.

    A hint to an elegant way to change the file/variables to ansi inside autohotkey would be very appreciated.
    Can sqlite probably be switched to export ansi csvs?

    Thanks for even the smallest idea.
    CU
    Dongadomski
     

    Users who are viewing this thread

    Top Bottom