-
-
Save mendelgusmao/4091801 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/^(?<collection_path>.*(?<collection_name>MP\d))\\(?<genre_name>.*)\\((?<artist_name>.*)(\s\((?<country_name>.{3})\))?)\\(?<album_year>\d{4})\s-\s(?<album_title>.*)\\/ | |
// !OK | |
"D:\\MP3\\Genre\\Artist (Cty)\\2004 - Album Title\\01 - Song Title.mp3" => { | |
"collection_path"=>"D:\\MP3", | |
"collection_name"=>"MP3", | |
"genre_name"=>"Genre", | |
"artist_name"=>"Artist (Cty)", | |
"country_name"=>nil, | |
"album_year"=>"2004", | |
"album_title"=>"Album Title" | |
} | |
// OK | |
"D:\\MP3\\Genre\\Artist With No Country\\2004 - Album Title\\01 - Song Title.mp3" => { | |
"collection_path"=>"D:\\MP3", | |
"collection_name"=>"MP3", | |
"genre_name"=>"Genre", | |
"artist_name"=>"Artist With No Country", | |
"country_name"=>nil, | |
"album_year"=>"2004", | |
"album_title"=>"Album Title" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/^(?<collection_path>.*(?<collection_name>MP\d))\\(?<genre_name>.*)\\(((?<artist_name>.*)\s\((?<country_name>.{3})\))|(?<artist_name>.*))\\(?<album_year>\d{4})\s-\s(?<album_title>.*)\\/ | |
// OK | |
"D:\\MP3\\Genre\\Artist (Cty)\\2004 - Album Title\\01 - Song Title.mp3" => { | |
"collection_path"=>"D:\\MP3", | |
"collection_name"=>"MP3", | |
"genre_name"=>"Genre", | |
"artist_name"=>"Artist", | |
"country_name"=>"Cty", | |
"album_year"=>nil, | |
"album_title"=>"2004" | |
} | |
// !OK | |
"D:\\MP3\\Genre\\Artist With No Country\\2004 - Album Title\\01 - Song Title.mp3" => { | |
"collection_path"=>"D:\\MP3", | |
"collection_name"=>"MP3", | |
"genre_name"=>"Genre", | |
"artist_name"=>nil, | |
"country_name"=>nil, | |
"album_year"=>"Artist With No Country", | |
"album_title"=>"2004" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment