MusicBrainz Picard - Script renaming/moving files ( no help / sharing only )

Discussion in 'Tools and other software' started by azzuro, June 1, 2017.

  1. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,376
    Likes Received:
    2,464
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,119 / 13
    Home Country:
    France France
    Show System Specs
    Hello,

    i want to share my script for rename/move Audio files using Musicbrainz Picard.
    for information, an portable is available on portableapps.com, i use it for use it as portable and not lost my setting, because all settings are stored inside windows registry

    the convention is :

    Code (Winbatch):
    1. Root
    2. --> %AlbumArtist%
    3.         | ---> %Year% - %Album% [Extension file]
    4.                   | ---> %DiscNumber%-%Track% - %Title% [%Artists% featuring without the %AlbumArtist%].ext
    5.                   or
    6.                   | ---> %Track% - %Title% [%Artists% featuring]
    7.         | ---> %Title%.ext  (if music without album or extracted from album)
    8.         | ---> %Artists% - %Title%.ext  (if music without album or extracted from album and have multi Artists)
    9.  
    10. --> Various Artists
    11.         | ---> %Album% [%ExtensionFile%]
    12.                   | ---> %Artist% - %Title%.ext

    for sorting by albumartist, if the tag is missing you need to add it before save files.
    don't forget to remove album / track, if the file is alone or you want it

    for the discnumber before title, the tag " %totaldiscs% must be present, only use the %discnumber% will break the convention.

    Adapt the code to the Various Artists name from your setting :
    $set(_variousartist,Various Artists)

    if you see few error during renaming, you can includ for example : XXX1XXX before " %artist% -" for know what line is used for your files.

    the code is not perfect, and maybe need few correction,




    Code (Winbatch):
    1. $noop( # set variable read for use in script )
    2. $setmulti(multiartists2,%artists%,)
    3. $set(multiartists3,$replace(%multiartists2%,%albumartist%; ,))
    4. $set(multiartists4,$replace(%multiartists3%,;, &))
    5. $set(_variousartist,Various Artists)
    6.  
    7. $noop( if albumartist is not available, use artist as albumartist)
    8. $if($not(%albumartist%),$set(albumartist,%artist%),)
    9.  
    10. $noop( check if the %albumartist% name = %artist%, if different it recognize the album as VariousArtist or Compilation)
    11. $if2(%albumartist%,%artist%)
    12.  
    13. $noop( create an subfolder, only if tag contain album tag, else move it inside the Artist folder )
    14. $if(%album%,
    15. $noop( new subfolder)
    16. /
    17. $noop( if it is an album "artist  = albumartist" or  "artist  = contain "various artist" name" , date is added before the album name)
    18. $if($or($inmulti(%artists%,%albumartist%),$if($eq(%albumartist%,%_variousartist%),,1)),$if2($if(%originaldate%,$left(%originaldate%,4) - ,),$if(%date%,$left(%date%,4) - ,)))
    19.  
    20. $noop( if Compilation, only use albumname as folder name)
    21. $if($ne(%albumartist%,),%album%)
    22.  
    23. $noop( add extension file to the album name)
    24. [$upper(%_extension%)]
    25. ,)
    26.  
    27. $noop( new subfolder)
    28. /
    29. $if($and(%album%,%tracknumber%),
    30. $noop( check if the album contain many disc, if yes, the disc number is added before the track number)
    31. $if($gt(%totaldiscs%,1),$num(%discnumber%,1)-,)$if($ne(%albumartist%,),$num(%tracknumber%,2) - ,)
    32. ,)
    33. $noop(file name: various artiste : artist name + title track  OR Artistalbum + featuring , is keep the title track only as above +"feat. Artist name")
    34.  
    35. $noop(file name Various artists : Artist  - title track    ---------------- TESTING LINE XXX1XXX  --------------- )
    36. $if($and($and($ne(%artist%,%albumartist%),$ne(%albumartist%,%_variousartist%)),$not($in(%artist%,%albumartist%))),%artist% - ,)
    37.  
    38. $noop(file name Various Artists :  Artist - title track  ---------------- TESTING LINE XXX2XXX  ---------------)
    39. $if($and($and($ne(%artist%,%albumartist%),$eq(%albumartist%,%_variousartist%)),$not($in(%artist%,%albumartist%))),%artist% - ,)
    40.  
    41.  
    42. $noop(file name Various Artist :  Artist  - title track  ---------------- TESTING LINE XXX3XXX  ---------------)
    43. $if($and($and(%artists%,$if($in(%artist%,%albumartist%),,1)),$ne(%albumartist%,%_variousartist%)),%artist% - ,)
    44. $noop( mis de coté pour le moment)
    45.  
    46.  
    47. $noop(file name Artist album + artists avaiblable + no track number :  Artist  - title track ---------------- TESTING LINE XXX4XXX  ---------------)
    48. $if($and($and($and($not(%tracknumber%),$ne(%artists%,%artist%)),$in(%artist%,%albumartist%)),$ne(%albumartist%,%_variousartist%)),%artist% - ,)
    49. $noop( mis de coté pour le moment)
    50.  
    51. $noop(file name : title track)
    52. %title%
    53.  
    54. $noop(file name Album Artist + featuring :   title track  [feat. xxx]  )
    55. $if($if($and($if($and($in(%artist%,%albumartist%),%artists%),1,),$if($eq(%artist%,%albumartist%),,1)),,1),, [feat. %multiartists4%])
    56.  
     
    Last edited: June 1, 2017
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,376
    Likes Received:
    2,464
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,119 / 13
    Home Country:
    France France
    Show System Specs
  4. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,610
    Likes Received:
    2,643
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,593 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    For renamind and fill info and other, i use tagscanner :) TagScanner - The Ultimate Tag Editor
    Music tag in all music files better :)
     
  5. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,376
    Likes Received:
    2,464
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,119 / 13
    Home Country:
    France France
    Show System Specs
    all tag (at least find) are stored inside files.
    but this only for store on my storage
     
  6. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,376
    Likes Received:
    2,464
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,119 / 13
    Home Country:
    France France
    Show System Specs
  7. hwahrmann
    • Team MediaPortal

    hwahrmann Development Group

    Joined:
    September 15, 2004
    Messages:
    4,495
    Likes Received:
    1,638
    Gender:
    Male
    Location:
    Vienna, Austria
    Ratings:
    +2,264 / 1
    Home Country:
    Austria Austria
    I am doing that with my own MPTagThat

    upload_2017-6-1_13-25-57.png
     
    • Like Like x 1
    • Creative Creative x 1

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!