Medium Support (Multi-disc Albums), Quality Grouping (#121)

* Multi Disc Stage 1 - Backend Work

* Quality Group Functionality

* Fixed: Only show wanted album types on ArtistDetail page

* Add Media Count Column to ArtistDetail Page

* Parser updates for multidisc cases, other usenet release title formats

* Search for Tracks by Medium Number in Addition to Title and TrackNumber

* Medium Renaming Token for Track Naming

* fixup Codacy and Comment Cleanup

* fixup remove comments
This commit is contained in:
Qstick
2017-11-15 21:24:33 -05:00
committed by GitHub
parent e1e7cad951
commit 21428cba6f
154 changed files with 2946 additions and 701 deletions
@@ -38,7 +38,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("[ www.Torrenting.com ] - Revenge.S03E14.720p.HDTV.X264-DIMENSION", "Revenge")]
[TestCase("Seed S02E09 HDTV x264-2HD [eztv]-[rarbg.com]", "Seed")]
[TestCase("Reno.911.S01.DVDRip.DD2.0.x264-DEEP", "Reno 911")]
public void should_parse_series_name(string postTitle, string title)
public void should_parse_artist_name(string postTitle, string title)
{
var result = Parser.Parser.ParseArtistName(postTitle).CleanArtistName();
result.Should().Be(title.CleanArtistName());
@@ -72,51 +72,58 @@ namespace NzbDrone.Core.Test.ParserTests
Parser.Parser.ParseAlbumTitle(title).Quality.QualitySource.Should().Be(QualitySource.Extension);
}
[TestCase("VA - The Best 101 Love Ballads (2017) MP3 [192 kbps]", "The Best 101 Love Ballads")]
[TestCase("ATCQ - The Love Movement 1998 2CD 192kbps RIP", "The Love Movement")]
[TestCase("A Tribe Called Quest - The Love Movement 1998 2CD [192kbps] RIP", "The Love Movement")]
[TestCase("Maula - Jism 2 [2012] Mp3 - 192Kbps [Extended]- TK", "Jism 2")]
[TestCase("VA - Complete Clubland - The Ultimate Ride Of Your Lfe [2014][MP3][192 kbps]")]
[TestCase("Complete Clubland - The Ultimate Ride Of Your Lfe [2014][MP3](192kbps)", "The Ultimate Ride Of Your Lfe")]
[TestCase("The Ultimate Ride Of Your Lfe [192 KBPS][2014][MP3]", "The Ultimate Ride Of Your Lfe")]
[TestCase("Gary Clark Jr - Live North America 2016 (2017) MP3 192kbps", "Live North America 2016")]
[TestCase("Beyoncé Lemonade [320] 2016 Beyonce Lemonade [320] 2016", "Lemonade")]
[TestCase("Childish Gambino - Awaken, My Love Album 2016 mp3 320 Kbps", "Awaken, My Love Album")]
[TestCase("Maluma Felices Los 4 MP3 320 Kbps 2017 Download", "Felices Los 4")]
[TestCase("Ricardo Arjona - APNEA (Single 2014) (320 kbps)", "APNEA")]
[TestCase("Kehlani - SweetSexySavage (Deluxe Edition) (2017) 320", "SweetSexySavage")]
[TestCase("Anderson Paak - Malibu (320)(2016)", "Malibu")]
[TestCase("Caetano Veloso Discografia Completa MP3 @256","")]
[TestCase("Little Mix - Salute [Deluxe Edition] [2013] [M4A-256]-V3nom [GLT", "Salute")]
[TestCase("Ricky Martin - A Quien Quiera Escuchar (2015) 256 kbps [GloDLS]", "A Quien Quiera Escuchar")]
[TestCase("Jake Bugg - Jake Bugg (Album) [2012] {MP3 256 kbps}", "Jake Bugg")]
[TestCase("Milky Chance - Sadnecessary [256 Kbps] [M4A]", "Sadnecessary")]
[TestCase("Clean Bandit - New Eyes [2014] [Mp3-256]-V3nom [GLT]", "New Eyes")]
[TestCase("Armin van Buuren - A State Of Trance 810 (20.04.2017) 256 kbps", "A State Of Trance 810")]
[TestCase("PJ Harvey - Let England Shake [mp3-256-2011][trfkad]", "Let England Shake")]
[TestCase("X-Men Soundtracks (2006-2014) AAC, 256 kbps","")]
[TestCase("Walk the Line Soundtrack (2005) [AAC, 256 kbps]", "Walk the Line Soundtrack")]
[TestCase("Emeli Sande Next To Me (512 Kbps)", "Next To Me")]
[TestCase("Kendrick Lamar - DAMN (2017) FLAC", "DAMN")]
[TestCase("Alicia Keys - Vault Playlist Vol. 1 (2017) [FLAC CD]", "Vault Playlist Vol 1")]
[TestCase("Gorillaz - Humanz (Deluxe) - lossless FLAC Tracks - 2017 - CDrip", "Humanz")]
[TestCase("David Bowie - Blackstar (2016) [FLAC]", "Blackstar")]
[TestCase("The Cure - Greatest Hits (2001) FLAC Soup", "Greatest Hits")]
[TestCase("Slowdive - Souvlaki (FLAC)", "Souvlaki")]
[TestCase("John Coltrane - Kulu Se Mama (1965) [EAC-FLAC]", "Kulu Se Mama")]
[TestCase("The Rolling Stones - The Very Best Of '75-'94 (1995) {FLAC}", "The Very Best Of '75-'94")]
[TestCase("Migos-No_Label_II-CD-FLAC-2014-FORSAKEN", "No Label II")]
[TestCase("ADELE 25 CD FLAC 2015 PERFECT", "25")]
[TestCase("A.I. - Sex & Robots [2007/MP3/V0(VBR)]", "Sex & Robots")]
[TestCase("Jay-Z - 4:44 (Deluxe Edition) (2017) 320", "444")]
[TestCase("Roberta Flack 2006 - The Very Best of", "The Very Best of")]
[TestCase("VA - NOW Thats What I Call Music 96 (2017) [Mp3~Kbps]", "NOW Thats What I Call Music 96")]
[TestCase("Queen - The Ultimate Best Of Queen(2011)[mp3]", "The Ultimate Best Of Queen")]
[TestCase("Little Mix - Salute [Deluxe Edition] [2013] [M4A-256]-V3nom [GLT]", "Salute")]
[TestCase("Barış Manço - Ben Bilirim [1993/FLAC/Lossless/Log]", "Ben Bilirim")]
public void should_parse_album_title(string postTitle, string title)
[TestCase("VA - The Best 101 Love Ballads (2017) MP3 [192 kbps]", "VA", "The Best 101 Love Ballads")]
[TestCase("ATCQ - The Love Movement 1998 2CD 192kbps RIP", "ATCQ", "The Love Movement")]
[TestCase("A Tribe Called Quest - The Love Movement 1998 2CD [192kbps] RIP", "A Tribe Called Quest", "The Love Movement")]
[TestCase("Maula - Jism 2 [2012] Mp3 - 192Kbps [Extended]- TK", "Maula", "Jism 2")]
[TestCase("VA - Complete Clubland - The Ultimate Ride Of Your Lfe [2014][MP3][192 kbps]", "VA", "")]
[TestCase("Complete Clubland - The Ultimate Ride Of Your Lfe [2014][MP3](192kbps)", "Complete Clubland", "The Ultimate Ride Of Your Lfe")]
[TestCase("The Ultimate Ride Of Your Lfe [192 KBPS][2014][MP3]", "", "The Ultimate Ride Of Your Lfe")]
[TestCase("Gary Clark Jr - Live North America 2016 (2017) MP3 192kbps", "Gary Clark Jr", "Live North America 2016")]
[TestCase("Beyoncé Lemonade [320] 2016 Beyonce Lemonade [320] 2016", "Beyoncé", "Lemonade")]
[TestCase("Childish Gambino - Awaken, My Love Album 2016 mp3 320 Kbps", "Childish Gambino", "Awaken, My Love Album")]
[TestCase("Maluma Felices Los 4 MP3 320 Kbps 2017 Download", "Maluma", "Felices Los 4")]
[TestCase("Ricardo Arjona - APNEA (Single 2014) (320 kbps)", "Ricardo Arjona", "APNEA")]
[TestCase("Kehlani - SweetSexySavage (Deluxe Edition) (2017) 320", "Kehlani", "SweetSexySavage")]
[TestCase("Anderson Paak - Malibu (320)(2016)", "Anderson Paak", "Malibu")]
[TestCase("Caetano Veloso Discografia Completa MP3 @256", "Caetano Veloso", "")]
[TestCase("Little Mix - Salute [Deluxe Edition] [2013] [M4A-256]-V3nom [GLT", "Little Mix", "Salute")]
[TestCase("Ricky Martin - A Quien Quiera Escuchar (2015) 256 kbps [GloDLS]", "Ricky Martin", "A Quien Quiera Escuchar")]
[TestCase("Jake Bugg - Jake Bugg (Album) [2012] {MP3 256 kbps}", "Jake Bugg", "Jake Bugg")]
[TestCase("Milky Chance - Sadnecessary [256 Kbps] [M4A]", "Milky Chance", "Sadnecessary")]
[TestCase("Clean Bandit - New Eyes [2014] [Mp3-256]-V3nom [GLT]", "Clean Bandit", "New Eyes")]
[TestCase("Armin van Buuren - A State Of Trance 810 (20.04.2017) 256 kbps", "Armin van Buuren", "A State Of Trance 810")]
[TestCase("PJ Harvey - Let England Shake [mp3-256-2011][trfkad]", "PJ Harvey", "Let England Shake")]
[TestCase("X-Men Soundtracks (2006-2014) AAC, 256 kbps", "", "")]
[TestCase("Walk the Line Soundtrack (2005) [AAC, 256 kbps]", "", "Walk the Line Soundtrack")]
[TestCase("Emeli Sande Next To Me (512 Kbps)", "Emeli", "Next To Me")]
[TestCase("Kendrick Lamar - DAMN (2017) FLAC", "Kendrick Lamar", "DAMN")]
[TestCase("Alicia Keys - Vault Playlist Vol. 1 (2017) [FLAC CD]", "Alicia Keys", "Vault Playlist Vol 1")]
[TestCase("Gorillaz - Humanz (Deluxe) - lossless FLAC Tracks - 2017 - CDrip", "Gorillaz", "Humanz")]
[TestCase("David Bowie - Blackstar (2016) [FLAC]", "David Bowie", "Blackstar")]
[TestCase("The Cure - Greatest Hits (2001) FLAC Soup", "The Cure", "Greatest Hits")]
[TestCase("Slowdive - Souvlaki (FLAC)", "Slowdive", "Souvlaki")]
[TestCase("John Coltrane - Kulu Se Mama (1965) [EAC-FLAC]", "John Coltrane", "Kulu Se Mama")]
[TestCase("The Rolling Stones - The Very Best Of '75-'94 (1995) {FLAC}", "The Rolling Stones", "The Very Best Of '75-'94")]
[TestCase("Migos-No_Label_II-CD-FLAC-2014-FORSAKEN", "Migos", "No Label II")]
[TestCase("ADELE 25 CD FLAC 2015 PERFECT", "Adele", "25")]
[TestCase("A.I. - Sex & Robots [2007/MP3/V0(VBR)]", "A.I.", "Sex & Robots")]
[TestCase("Jay-Z - 4:44 (Deluxe Edition) (2017) 320", "Jay-Z", "444")]
[TestCase("Roberta Flack 2006 - The Very Best of", "Roberta Flack", "The Very Best of")]
[TestCase("VA - NOW Thats What I Call Music 96 (2017) [Mp3~Kbps]", "VA", "NOW Thats What I Call Music 96")]
[TestCase("Queen - The Ultimate Best Of Queen(2011)[mp3]", "Queen", "The Ultimate Best Of Queen")]
[TestCase("Little Mix - Salute [Deluxe Edition] [2013] [M4A-256]-V3nom [GLT]", "Little Mix", "Salute")]
[TestCase("Barış Manço - Ben Bilirim [1993/FLAC/Lossless/Log]", "Barış Manço", "Ben Bilirim")]
[TestCase("Imagine Dragons-Smoke And Mirrors-Deluxe Edition-2CD-FLAC-2015-JLM", "Imagine Dragons", "Smoke And Mirrors")]
[TestCase("Dani_Sbert-Togheter-WEB-2017-FURY", "Dani Sbert", "Togheter")]
[TestCase("New.Edition-One.Love-CD-FLAC-2017-MrFlac", "New Edition", "One Love")]
[TestCase("David_Gray-The_Best_of_David_Gray-(Deluxe_Edition)-2CD-2016-MTD", "David Gray", "The Best of David Gray")]
public void should_parse_artist_name_and_album_title(string postTitle, string name, string title)
{
Parser.Parser.ParseAlbumTitle(postTitle).AlbumTitle.Should().Be(title);
var parseResult = Parser.Parser.ParseAlbumTitle(postTitle);
parseResult.ArtistName.Should().Be(name);
parseResult.AlbumTitle.Should().Be(title);
}
}
}