rembo10 / headphones

Automatic music downloader for SABnzbd
GNU General Public License v3.0
3.35k stars 604 forks source link

Folder and File Renaming Options - Limit year to 4-digits #3324

Closed hubdows closed 8 months ago

hubdows commented 8 months ago

Hello,

Sometimes I notice after tagging, a release year could either be the 4-digit year or the 8-digit year-month-day. Is there anyway to limit this to just the year during the renaming?

e.g. $ exiftool -T -Artist -Album -Year -Track -Title "01\ -\ The\ Romantics\ -\ What\ I\ Like\ About\ You.mp3" The Romantics What I Like About You (and Other Romantic Hits) 1990-12-08 01/10 What I Like About You

Headphones folder post processing set to Folder Format: $First/$Artist/{$year' - '}$Album{'/disc '$disc}

Puts the Artist in a folder named /music/R/The Romantics/1990-12-08 - What I Like About You (and Other Romantic Hits)

I would rather the folder name be /music/R/The Romantics/1990 - What I Like About You (and Other Romantic Hits)

Any recommendations to fix this would be greatly appreciated.

hubdows commented 8 months ago

After some testing, it appears that the $Year variable with a capital-Y does exactly this.