From ccff4fe1428b7163c5b57ee6409b2ccb0cd5164a Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Thu, 4 Jun 2015 21:08:24 +0200 Subject: [PATCH] Fixed: Size Parsing in TorrentRss was a bit too tolerant. fixes #590 --- .../Files/Indexers/TorrentRss/BitHdtv.xml | 834 ++++++++++++++++++ .../IndexerTests/BasicRssParserFixture.cs | 15 +- .../TorrentRssSettingsDetectorFixture.cs | 17 + .../NzbDrone.Core.Test.csproj | 3 + src/NzbDrone.Core/Indexers/RssParser.cs | 7 +- .../TorrentRss/TorrentRssSettingsDetector.cs | 30 +- 6 files changed, 891 insertions(+), 15 deletions(-) create mode 100644 src/NzbDrone.Core.Test/Files/Indexers/TorrentRss/BitHdtv.xml diff --git a/src/NzbDrone.Core.Test/Files/Indexers/TorrentRss/BitHdtv.xml b/src/NzbDrone.Core.Test/Files/Indexers/TorrentRss/BitHdtv.xml new file mode 100644 index 000000000..a28d31559 --- /dev/null +++ b/src/NzbDrone.Core.Test/Files/Indexers/TorrentRss/BitHdtv.xml @@ -0,0 +1,834 @@ + + + + BIT-HDTV - Home of High Definition + https://www.bit-hdtv.com + This is a private tracker, and you have to register before you can get full access to the site. Before you do anything here at BIT-HDTV we suggest you read the rules! There are only a few rules to abide by, and we do enforce them! + en-usde + Copyright ? 2004 BIT-HDTV - Home of High Definition + noreply@bit-hdtv.com + + BIT-HDTV - Home of High Definition + https://www.bit-hdtv.com/favicon.ico + https://www.bit-hdtv.com + 16 + 16 + This is a private tracker, and you have to register before you can get full access to the site. Before you do anything here at BIT-HDTV we suggest you read the rules! There are only a few rules to abide by, and we do enforce them! + + + Egypt's Lost Queens.720p.2014.WEB.H.264 + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Documentaries + + Size: 0.99 GB + Status: 2 seeders and 0 leechers + Speed: no traffic + 2015-06-03 03:19:49 + + Description: + [center][img]http://img62.imageshack.us/img62/6364/fckuf.png[/img][/center] + [quote] + [b]General[/b] + Format: Matroska + Duration: 59mn 5s + Overall bit rate: 2 399 Kbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: + Resolution: 1280x720 + Display aspect ratio: 16:9 + Language: + + [b]Audio[/b] + Format: AAC + Bitrate: + Channel(s): 2 + Language: English + + [b]Subtitle [/b] + Format: UTF-8 + Language: English + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + Size: 0.99 GB + + + + Pretty.Little.Liars.S06E01.720p.HDTV.X264-DIMENSION + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: TV + + Size: 685.67 MB + Status: 3 seeders and 0 leechers + Speed: no traffic + 2015-06-03 02:57:51 + + Description: + [center][img]http://img6.imageshack.us/img6/6272/460vy.jpg[/img] + [/center] + + [center][img]http://images.tvrage.com/shows/26/25591.jpg[/img][/center] + [quote] + [b]Description:[/b] [b]Pretty Little Liars[/b] follows four estranged best friends who are reunited one year after their best friend and queen bee of the group, Alison, goes missing only to discover they are receiving messages from an anonymous [b]'A'[/b] who knows all their secrets. The drama stars Lucy Hale ([i]Privileged[/i]) as Aria, Troian Bellisario ([i]Navy NCIS[/i]) as Spencer, Ashley Benson ([i]Bring It On: In It to Win It[/i]) as Hanna and Shay Mitchell as Emily. ([b]Source: [/b]ABC Family)[/quote] + + [quote] + [b]Show:[/b] Pretty Little Liars + [b]Network:[/b] ABC Family + [b]Country:[/b] US + [b]Classification:[/b] Scripted + [b]Genres:[/b] Drama, Mystery, Teens + + [b]Show Overview:[/b] [url=http://www.tvrage.com/Pretty_Little_Liars]http://www.tvrage.com/Pretty_Little_Liars[/url] + + [b]Episode Info:[/b] + [b]Title:[/b] Game On, Charles + [b]Description:[/b] + [b]Airdate:[/b] 2015-06-02 + [b]Season:[/b] 6 + [b]Episode:[/b] 1 + + [/quote] + [quote] + [b]General[/b] + Format: Matroska + Duration: 42mn 17s + Overall bit rate: 2 267 Kbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: 1 838 Kbps + Resolution: 1280x720 + Display aspect ratio: 16:9 + Language: English + + [b]Audio[/b] + Format: AC-3 + Bitrate: 384 Kbps + Channel(s): 6 + + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + Size: 685.67 MB + + + + Highway.2002.720p.WEB-DL.DD5.1.H264-FGT + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 3.02 GB + Status: 3 seeders and 0 leechers + Speed: no traffic + 2015-06-03 02:42:46 + + Description: + [center][img]http://ia.media-imdb.com/images/M/MV5BMTg2ODEzNTU4N15BMl5BanBnXkFtZTcwOTQ4OTYxMQ@@._V1_SX300.jpg[/img][/center] + + [quote] + [b]Title:[/b] Highway + [b]Year:[/b] 2002 + [b]Released:[/b] 26 Mar 2002 + [b]Runtime:[/b] 97 min + [b]Genre:[/b] Crime, Drama + [b]Director:[/b] James Cox + [b]Writer:[/b] Scott Rosenberg + [b]Actors:[/b] Jared Leto, Jake Gyllenhaal, Selma Blair, John C. McGinley + [b]Plot:[/b] Jack is caught with the wife of his employer, a Vegas thug. The thug sends goons after Jack, who convinces his best friend, Pilot, to flee with him. Pilot insists that they head for Seattle... + [b]Language:[/b] English + [b]Country:[/b] USA + [b]Awards:[/b] 4 nominations. + [b]Metascore:[/b] N/A + [b]Raiting:[/b] 6.3 + [b]Votes:[/b] 4706 + [b]IMDB:[/b] http://www.imdb.com/title/tt0165361 + [/quote] + [quote] + [b]General[/b] + Format: Matroska + Duration: 1h 36mn + Overall bit rate: 4 461 Kbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: 3 988 Kbps + Resolution: 1280x544 + Display aspect ratio: 2.35:1 + Language: English + + [b]Audio[/b] + Format: AC-3 + Bitrate: 384 Kbps + Channel(s): 6 + Language: English + + [b]Subtitle [/b] + Format: UTF-8 + Language: English + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + Size: 3.02 GB + + + + Kajaki.2014.LIMITED.1080p.BluRay.x264-GECKOS + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 7.65 GB + Status: 6 seeders and 0 leechers + Speed: no traffic + 2015-06-03 02:06:42 + + Description: + [center][img]http://ia.media-imdb.com/images/M/MV5BMTQ5MjYxMDM4MV5BMl5BanBnXkFtZTgwNDU2NzA0MzE@._V1_SX300.jpg[/img][/center] + + [quote] + [b]Title:[/b] Kajaki + [b]Year:[/b] 2014 + [b]Released:[/b] 28 Nov 2014 + [b]Runtime:[/b] 108 min + [b]Genre:[/b] Adventure, Drama, Thriller + [b]Director:[/b] Paul Katis + [b]Writer:[/b] Tom Williams (screenplay), Tom Williams + [b]Actors:[/b] Mark Stanley, David Elliot, Malachi Kirby, Paul Luebke + [b]Plot:[/b] Kajaki Dam 2006. A company of young British soldiers encounter an unexpected, terrifying enemy. A dried-out river bed, and under every step the possibility of an anti-personnel mine. A mine that could cost you your leg - or your life. + [b]Language:[/b] English + [b]Country:[/b] UK, Jordan + [b]Awards:[/b] N/A + [b]Metascore:[/b] N/A + [b]Raiting:[/b] 8.1 + [b]Votes:[/b] 294 + [b]IMDB:[/b] http://www.imdb.com/title/tt3622120 + [/quote] + [quote] + [b]General[/b] + Format: Matroska + Duration: 1h 48mn + Overall bit rate: 10.1 Mbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: 9 346 Kbps + Resolution: 1920x808 + Display aspect ratio: 2.40:1 + Language: English + + [b]Audio[/b] + Format: DTS + Bitrate: 768 Kbps + Channel(s): 6 + Language: English + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + Size: 7.65 GB + + + + Demon Baby.2014.720p.WEB-DL.x264 ETRG.mkv + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 2.05 GB + Status: 3 seeders and 0 leechers + Speed: no traffic + 2015-06-03 02:02:35 + + Description: + NO INFO + [quote] + [b]General[/b] + Format: Matroska + Duration: 1h 9mn + Overall bit rate: 4 199 Kbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: + Resolution: 1280x532 + Display aspect ratio: 2.40:1 + Language: English + + [b]Audio[/b] + Format: AAC + Bitrate: + Channel(s): 2 + Language: English + + [b]Subtitle [/b] + Format: UTF-8 + Language: English + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + Size: 2.05 GB + + + + The Badger Game 2014 720p WEB-DL x264 ETRG + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 3.11 GB + Status: 3 seeders and 0 leechers + Speed: no traffic + 2015-06-03 01:59:47 + + Description: + [center][img]http://ia.media-imdb.com/images/M/MV5BMjM3NDY3Njg2Ml5BMl5BanBnXkFtZTgwNzc1NzYzMDE@._V1_SX300.jpg[/img][/center] + + [quote] + [b]Title:[/b] The Badger Game + [b]Year:[/b] 2014 + [b]Released:[/b] 26 Sep 2014 + [b]Runtime:[/b] 99 min + [b]Genre:[/b] Crime, Drama, Thriller + [b]Director:[/b] Joshua Wagner, Thomas Zambeck + [b]Writer:[/b] Joshua Wagner, Thomas Zambeck, Thomas Zambeck (story) + [b]Actors:[/b] Augie Duke, Patrick Cronen, Jillian Leigh, Sam Boxleitner + [b]Plot:[/b] A chronic philanderer falls victim to an extortion scheme when he is abducted by four masked strangers demanding retribution for his sins. + [b]Language:[/b] English + [b]Country:[/b] USA + [b]Awards:[/b] N/A + [b]Metascore:[/b] N/A + [b]Raiting:[/b] N/A + [b]Votes:[/b] N/A + [b]IMDB:[/b] http://www.imdb.com/title/tt2836434 + [/quote] + [quote] + [b]General[/b] + Format: Matroska + Duration: 1h 39mn + Overall bit rate: 4 499 Kbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: 4 025 Kbps + Resolution: 1280x640 + Display aspect ratio: 2.000 + Language: English + + [b]Audio[/b] + Format: AC-3 + Bitrate: 384 Kbps + Channel(s): 6 + Language: English + + [b]Subtitle [/b] + Format: UTF-8 + Language: English + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + Size: 3.11 GB + + + + It.Lives.Again.1978.HDTV.720p.x264.Ac3.mkv + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 4.37 GB + Status: 3 seeders and 0 leechers + Speed: no traffic + 2015-06-03 01:47:08 + + Description: + [center][img]http://ia.media-imdb.com/images/M/MV5BMTQxOTEwMTQ1M15BMl5BanBnXkFtZTcwMzk2MTgxMQ@@._V1_SX300.jpg[/img][/center] + + [quote] + [b]Title:[/b] It Lives Again + [b]Year:[/b] 1978 + [b]Released:[/b] 10 May 1978 + [b]Runtime:[/b] 91 min + [b]Genre:[/b] Horror + [b]Director:[/b] Larry Cohen + [b]Writer:[/b] Larry Cohen (based on characters created for the screen by), Larry Cohen + [b]Actors:[/b] Frederic Forrest, Kathleen Lloyd, John P. Ryan, John Marley + [b]Plot:[/b] An epidemic of mutant monster babies sweeps America. + [b]Language:[/b] English + [b]Country:[/b] USA + [b]Awards:[/b] N/A + [b]Metascore:[/b] N/A + [b]Raiting:[/b] 5.0 + [b]Votes:[/b] 1269 + [b]IMDB:[/b] http://www.imdb.com/title/tt0077756 + [/quote] + [quote] + [b]General[/b] + Format: Matroska + Duration: 1h 30mn + Overall bit rate: 6 900 Kbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: 6 571 Kbps + Resolution: 1280x720 + Display aspect ratio: 16:9 + Language: English + + [b]Audio[/b] + Format: AC-3 + Bitrate: 192 Kbps + Channel(s): 1 + + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + Size: 4.37 GB + + + + Scienceless.Fiction.2014.1080p.BluRay.x264-SADPANDA + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 6.56 GB + Status: 5 seeders and 0 leechers + Speed: no traffic + 2015-06-03 01:39:37 + + Description: + + [quote] + [b]Title:[/b] Scienceless Fiction + [b]Year:[/b] 2014 + [b]Released:[/b] 5 Mar 2014 + [b]Runtime:[/b] N/A + [b]Genre:[/b] Action, Comedy, Fantasy + [b]Director:[/b] Bill Zebub + [b]Writer:[/b] Bill Zebub + [b]Actors:[/b] Nadine Theresa Stevens, Andrea Hall, Scarlett Storm, Lydia Lael + [b]Plot:[/b] N/A + [b]Language:[/b] English + [b]Country:[/b] USA + [b]Awards:[/b] N/A + [b]Metascore:[/b] N/A + [b]Raiting:[/b] 2.4 + [b]Votes:[/b] 7 + [b]IMDB:[/b] http://www.imdb.com/title/tt3447592 + [/quote] + [quote] + [b]General[/b] + Format: Matroska + Duration: 1h 49mn + Overall bit rate: 8 604 Kbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: 8 411 Kbps + Resolution: 1920x1080 + Display aspect ratio: 16:9 + Language: English + + [b]Audio[/b] + Format: AC-3 + Bitrate: 192 Kbps + Channel(s): 2 + Language: English + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + Size: 6.56 GB + + + + Don't.Say.a.Word.2001.720p.BluRay.DTS.x264-CRiSC.mkv + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 5.62 GB + Status: 4 seeders and no leecher + Speed: 0.00 KB/s + 2015-06-03 01:37:02 + + Description: + [center][img]http://ia.media-imdb.com/images/M/MV5BMTI0NDMxMzgyOF5BMl5BanBnXkFtZTcwNDYzODAzMQ@@._V1_SX300.jpg[/img][/center] + + [quote] + [b]Title:[/b] Don't Say a Word + [b]Year:[/b] 2001 + [b]Released:[/b] 28 Sep 2001 + [b]Runtime:[/b] 113 min + [b]Genre:[/b] Crime, Thriller + [b]Director:[/b] Gary Fleder + [b]Writer:[/b] Andrew Klavan (novel), Anthony Peckham (screenplay), Patrick Smith Kelly (screenplay) + [b]Actors:[/b] Michael Douglas, Sean Bean, Brittany Murphy, Skye McCole Bartusiak + [b]Plot:[/b] When the daughter of a psychiatrist is kidnapped, he's horrified to discover that the abductors' demand is that he break through to a post traumatic stress disorder suffering young woman who knows a secret... + [b]Language:[/b] English, Italian, Chinese + [b]Country:[/b] USA, Australia, Switzerland, Canada + [b]Awards:[/b] 1 nomination. + [b]Metascore:[/b] 38 + [b]Raiting:[/b] 6.3 + [b]Votes:[/b] 37331 + [b]IMDB:[/b] http://www.imdb.com/title/tt0260866 + [/quote] + [quote] + [b]General[/b] + Format: Matroska + Duration: 1h 53mn + Overall bit rate: 7 084 Kbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: 5 434 Kbps + Resolution: 1280x544 + Display aspect ratio: 2.35:1 + Language: English + + [b]Audio[/b] + Format: DTS + Bitrate: 1 509 Kbps + Channel(s): 6 + Language: English + + [b]Subtitle [/b] + Format: UTF-8 + Language: English + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + Size: 5.62 GB + + + + The.Onion.Field.1979.720p.BluRay.x264-SiNNERS + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 6.56 GB + Status: 4 seeders and no leecher + Speed: 0.00 KB/s + 2015-06-03 01:28:52 + + Description: + [center][img]http://ia.media-imdb.com/images/M/MV5BMTU0MDI0MDMyMF5BMl5BanBnXkFtZTgwMjgyMjEyMDE@._V1_SX300.jpg[/img][/center] + + [quote] + [b]Title:[/b] The Onion Field + [b]Year:[/b] 1979 + [b]Released:[/b] 24 Apr 1980 + [b]Runtime:[/b] 122 min + [b]Genre:[/b] Crime, Drama + [b]Director:[/b] Harold Becker + [b]Writer:[/b] Joseph Wambaugh (book), Joseph Wambaugh (screenplay) + [b]Actors:[/b] John Savage, James Woods, Franklyn Seales, Ted Danson + [b]Plot:[/b] Greg Powell is a disturbed ex-con who recruits Jimmy Smith (aka Jimmy Youngblood), a petty thief, as his partner in crime. Powell panics one night when the two of them are pulled over by a ... + [b]Language:[/b] English + [b]Country:[/b] USA + [b]Awards:[/b] Nominated for 1 Golden Globe. Another 2 wins & 1 nomination. + [b]Metascore:[/b] N/A + [b]Raiting:[/b] 7.0 + [b]Votes:[/b] 3115 + [b]IMDB:[/b] http://www.imdb.com/title/tt0079668 + [/quote] + [quote] + [b]General[/b] + Format: Matroska + Duration: 2h 6mn + Overall bit rate: 7 432 Kbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: 5 923 Kbps + Resolution: 1280x688 + Display aspect ratio: 1.85:1 + Language: English + + [b]Audio[/b] + Format: DTS + Bitrate: 1 509 Kbps + Channel(s): 2 + Language: English + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + Size: 6.56 GB + + + + The.Boys.In.The.Band.1970.720p.BluRay.x264-SiNNERS + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 5.47 GB + Status: 2 seeders and 0 leechers + Speed: no traffic + 2015-06-03 01:28:46 + + Description: + NO INFO + [quote] + [b]General[/b] + Format: Matroska + Duration: 2h 0mn + Overall bit rate: 6 522 Kbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: 5 012 Kbps + Resolution: 1280x720 + Display aspect ratio: 16:9 + Language: English + + [b]Audio[/b] + Format: DTS + Bitrate: 1 509 Kbps + Channel(s): 2 + Language: English + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + Size: 5.47 GB + + + + Unfinished.Business.2015.720p.BluRay.DD5.1.x264-BiTHD + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 4.79 GB + Status: 20 seeders and 6 leechers + Speed: 0.00 KB/s + 2015-06-03 01:24:49 + + Description: + [center] + [img]http://www.impawards.com/2015/posters/unfinished_business_ver7.jpg[/img] + [img]http://www.impawards.com/2015/posters/unfinished_business_ver8.jpg[/img] + [img]http://www.fatmovieguy.com/wp-content/uploads/2014/11/Unfinished-Business-Movie-Poster.jpg[/img][/center] + + [center] [size=5][b]General Information:[/b][/size][/center] + RUNTIME........: 1:30:56 + CHAPTERS.......: Yes + SIZE...........: 4,78 GB + VIDEO CODEC....: x264 core, 2 pass HighL4.1 + RESOLUTION.....: 1280x532 + BITRATE........: 6900 Kbps + FRAMERATE......: 23.976 fps + AUDIO..........: English, DTS 5.1, 1509 kbps + SUBTITLES......: English, Spanish (SRT) + SOURCE.........: Unfinished Business 2015 1080p BluRay AVC DTS-HD MA 5.1-HDAccess + + ENCODER........: BiTHD + RELEASE DATE...: 03.06.2015 + + [center][size=5][b]Screenshots:[/b][/size] + + [size=5][b]Source vs Encode[/b][/size] + + [URL=http://imgbox.com/bQ5XEVX3][IMG]http://3.t.imgbox.com/bQ5XEVX3.jpg[/IMG][/URL] [URL=http://imgbox.com/odAsd44y][IMG]http://4.t.imgbox.com/odAsd44y.jpg[/IMG][/URL] [URL=http://imgbox.com/ZEl141ko][IMG]http://5.t.imgbox.com/ZEl141ko.jpg[/IMG][/URL] [URL=http://imgbox.com/c9nKPnln][IMG]http://8.t.imgbox.com/c9nKPnln.jpg[/IMG][/URL] [URL=http://imgbox.com/C1LOEEx9][IMG]http://9.t.imgbox.com/C1LOEEx9.jpg[/IMG][/URL] [URL=http://imgbox.com/Feig0iuM][IMG]http://0.t.imgbox.com/Feig0iuM.jpg[/IMG][/URL][/center] + Size: 4.79 GB + + + + The.Merchant.of.Four.Seasons.1971.720p.BluRay.x264-USURY + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 3.28 GB + Status: 2 seeders and 0 leechers + Speed: no traffic + 2015-06-03 01:15:58 + + Description: + [center][img]http://ia.media-imdb.com/images/M/MV5BMTI4NjcyMTc4Ml5BMl5BanBnXkFtZTcwNTIxMDQyMQ@@._V1_SX300.jpg[/img][/center] + + [quote] + [b]Title:[/b] The Merchant of Four Seasons + [b]Year:[/b] 1971 + [b]Released:[/b] 4 Nov 1971 + [b]Runtime:[/b] 88 min + [b]Genre:[/b] Drama + [b]Director:[/b] Rainer Werner Fassbinder + [b]Writer:[/b] Rainer Werner Fassbinder + [b]Actors:[/b] Hans Hirschmüller, Irm Hermann, Hanna Schygulla, Andrea Schober + [b]Plot:[/b] Hans is a street fruit peddler and born-loser. His choice of career upsets his bourgeois family, causing him to turn to drinking and violence. After recovering from a debilitating heart ... + [b]Language:[/b] German, Arabic + [b]Country:[/b] West Germany + [b]Awards:[/b] 3 wins & 5 nominations. + [b]Metascore:[/b] N/A + [b]Raiting:[/b] 7.5 + [b]Votes:[/b] 2255 + [b]IMDB:[/b] http://www.imdb.com/title/tt0067227 + [/quote] + [quote] + [b]General[/b] + Format: Matroska + Duration: 1h 28mn + Overall bit rate: 5 287 Kbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: 4 645 Kbps + Resolution: 992x720 + Display aspect ratio: 1.378 + Language: English + + [b]Audio[/b] + Format: AC-3 + Bitrate: 640 Kbps + Channel(s): 1 + Language: German + + [b]Subtitle [/b] + Format: UTF-8 + Language: English + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + Size: 3.28 GB + + + + Wolfen.1981.720p.BluRay.X264-AMIABLE + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 5.46 GB + Status: 3 seeders and 0 leechers + Speed: no traffic + 2015-06-03 01:15:53 + + Description: + [center][img]http://ia.media-imdb.com/images/M/MV5BMTkwNDc4NDQ3Nl5BMl5BanBnXkFtZTYwNTM0MjI5._V1_SX300.jpg[/img][/center] + + [quote] + [b]Title:[/b] Wolfen + [b]Year:[/b] 1981 + [b]Released:[/b] 24 Jul 1981 + [b]Runtime:[/b] 115 min + [b]Genre:[/b] Horror, Thriller + [b]Director:[/b] Michael Wadleigh + [b]Writer:[/b] Whitley Strieber (based on the novel by), David Eyre (screen story), Michael Wadleigh (screen story), David Eyre (screenplay), Michael Wadleigh (screenplay) + [b]Actors:[/b] Albert Finney, Diane Venora, Edward James Olmos, Gregory Hines + [b]Plot:[/b] A New York cop investigates a series of brutal deaths that resemble animal attacks. + [b]Language:[/b] English + [b]Country:[/b] USA + [b]Awards:[/b] 2 wins & 4 nominations. + [b]Metascore:[/b] N/A + [b]Raiting:[/b] 6.3 + [b]Votes:[/b] 5773 + [b]IMDB:[/b] http://www.imdb.com/title/tt0083336 + [/quote] + [quote] + [b]General[/b] + Format: Matroska + Duration: 1h 54mn + Overall bit rate: 6 857 Kbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: 5 346 Kbps + Resolution: 1280x536 + Display aspect ratio: 2.40:1 + Language: English + + [b]Audio[/b] + Format: DTS + Bitrate: 1 509 Kbps + Channel(s): 6 + Language: English + + [b]Subtitle [/b] + Format: UTF-8 + Type: SDH + Language: English + + [b]Subtitle [/b] + Format: UTF-8 + Language: English + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + + + + Run.All.Night.2015.1080p.BluRay.x264-SPARKS + https://www.bit-hdtv.com/rssdownload.php?id=123 + + Category: Movies + + Size: 8.74 GB + Status: 18 seeders and 2 leechers + Speed: 0.00 KB/s + 2015-06-03 00:28:55 + + Description: + [center][img]http://ia.media-imdb.com/images/M/MV5BMTU2ODI3ODEyOV5BMl5BanBnXkFtZTgwMTM3NTQzNDE@._V1_SX300.jpg[/img][/center] + + [quote] + [b]Title:[/b] Run All Night + [b]Year:[/b] 2015 + [b]Released:[/b] 13 Mar 2015 + [b]Runtime:[/b] 114 min + [b]Genre:[/b] Action, Crime, Drama + [b]Director:[/b] Jaume Collet-Serra + [b]Writer:[/b] Brad Ingelsby + [b]Actors:[/b] Liam Neeson, Ed Harris, Joel Kinnaman, Boyd Holbrook + [b]Plot:[/b] Mobster and hit man Jimmy Conlon has one night to figure out where his loyalties lie: with his estranged son, Mike, whose life is in danger, or his longtime best friend, mob boss Shawn Maguire, who wants Mike to pay for the death of his own son. + [b]Language:[/b] English + [b]Country:[/b] USA + [b]Awards:[/b] N/A + [b]Metascore:[/b] 59 + [b]Raiting:[/b] 7.0 + [b]Votes:[/b] 10707 + [b]IMDB:[/b] http://www.imdb.com/title/tt2199571 + [/quote] + [quote] + [b]General[/b] + Format: Matroska + Duration: 1h 54mn + Overall bit rate: 10.9 Mbps + + [b]Video[/b] + Format: AVC + Format profile: + Bitrate: 9 434 Kbps + Resolution: 1920x800 + Display aspect ratio: 2.40:1 + Language: English + + [b]Audio[/b] + Format: DTS + Bitrate: 1 509 Kbps + Channel(s): 6 + Language: English + + [/quote] + [color=Red][size=4]Please leave feedback by giving comments or by pressing thanks. Enjoy![/color][/size] + + + + \ No newline at end of file diff --git a/src/NzbDrone.Core.Test/IndexerTests/BasicRssParserFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/BasicRssParserFixture.cs index fd471c0b2..e17fb602f 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/BasicRssParserFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/BasicRssParserFixture.cs @@ -14,12 +14,25 @@ namespace NzbDrone.Core.Test.IndexerTests [TestCase("162.1MB", 169974170)] [TestCase("398.62 MB", 417983365)] [TestCase("845 MB", 886046720)] - public void parse_size(string sizeString, long expectedSize) + [TestCase("7,162,100.0KB", 7333990400)] + [TestCase("12341234", 12341234)] + public void should_parse_size(string sizeString, long expectedSize) { var result = RssParser.ParseSize(sizeString, true); result.Should().Be(expectedSize); } + [TestCase("100 Kbps")] + [TestCase("100 Kb/s")] + [TestCase(" 12341234")] + [TestCase("12341234 other")] + public void should_not_parse_size(string sizeString) + { + var result = RssParser.ParseSize(sizeString, true); + + result.Should().Be(0); + } + } } \ No newline at end of file diff --git a/src/NzbDrone.Core.Test/IndexerTests/TorrentRssIndexerTests/TorrentRssSettingsDetectorFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/TorrentRssIndexerTests/TorrentRssSettingsDetectorFixture.cs index c963507ec..220ec249f 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/TorrentRssIndexerTests/TorrentRssSettingsDetectorFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/TorrentRssIndexerTests/TorrentRssSettingsDetectorFixture.cs @@ -120,6 +120,23 @@ namespace NzbDrone.Core.Test.IndexerTests.TorrentRssIndexerTests }); } + [Test] + public void should_detect_rss_settings_for_BitHdtv() + { + GivenRecentFeedResponse("TorrentRss/BitHdtv.xml"); + + var settings = Subject.Detect(_indexerSettings); + + settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings + { + UseEZTVFormat = false, + UseEnclosureLength = false, + ParseSizeInDescription = false, + ParseSeedersInDescription = false, + SizeElementName = "size" + }); + } + [Test] [Ignore("Cannot reliably reject unparseable titles")] public void should_reject_rss_settings_for_AwesomeHD() diff --git a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index 89a369972..826909b6a 100644 --- a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -417,6 +417,9 @@ Always + + Always + Always diff --git a/src/NzbDrone.Core/Indexers/RssParser.cs b/src/NzbDrone.Core/Indexers/RssParser.cs index e352e8319..5f68a5db5 100644 --- a/src/NzbDrone.Core/Indexers/RssParser.cs +++ b/src/NzbDrone.Core/Indexers/RssParser.cs @@ -234,11 +234,16 @@ namespace NzbDrone.Core.Indexers return channel.Elements("item"); } - private static readonly Regex ParseSizeRegex = new Regex(@"(?\d+\.\d{1,2}|\d+\,\d+\.\d{1,2}|\d+)\W?(?[KMG]i?B)", + private static readonly Regex ParseSizeRegex = new Regex(@"(?(?:\d+,)*\d+(?:\.\d{1,2})?)\W?(?[KMG]i?B)(?![\w/])", RegexOptions.IgnoreCase | RegexOptions.Compiled); public static Int64 ParseSize(String sizeString, Boolean defaultToBinaryPrefix) { + if (sizeString.All(char.IsDigit)) + { + return Int64.Parse(sizeString); + } + var match = ParseSizeRegex.Matches(sizeString); if (match.Count != 0) diff --git a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssSettingsDetector.cs b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssSettingsDetector.cs index 3f113f698..16a4c185c 100644 --- a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssSettingsDetector.cs +++ b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssSettingsDetector.cs @@ -135,32 +135,36 @@ namespace NzbDrone.Core.Indexers.TorrentRss } parser.UseEnclosureLength = settings.UseEnclosureLength = false; - parser.ParseSizeInDescription = settings.ParseSizeInDescription = true; - - releases = ParseResponse(parser, response); - ValidateReleases(releases, indexerSettings); - if (!releases.Any(r => r.Size < ValidSizeThreshold)) + foreach (var sizeElementName in new[] { "size", "Size" }) { - _logger.Trace("Feed has valid size in description."); - return settings; + parser.SizeElementName = settings.SizeElementName = sizeElementName; + + releases = ParseResponse(parser, response); + ValidateReleases(releases, indexerSettings); + + if (!releases.Any(r => r.Size < ValidSizeThreshold)) + { + _logger.Trace("Feed has valid size in Size element."); + return settings; + } } - - parser.ParseSizeInDescription = settings.ParseSizeInDescription = false; - parser.SizeElementName = settings.SizeElementName = "Size"; + + parser.SizeElementName = settings.SizeElementName = null; + parser.ParseSizeInDescription = settings.ParseSizeInDescription = true; releases = ParseResponse(parser, response); ValidateReleases(releases, indexerSettings); if (!releases.Any(r => r.Size < ValidSizeThreshold)) { - _logger.Trace("Feed has valid size in Size element."); + _logger.Trace("Feed has valid size in description."); return settings; } - _logger.Debug("Feed doesn't have release size."); + parser.ParseSizeInDescription = settings.ParseSizeInDescription = false; - parser.SizeElementName = settings.SizeElementName = null; + _logger.Debug("Feed doesn't have release size."); releases = ParseResponse(parser, response); ValidateReleases(releases, indexerSettings);