lad1337 / Sick-Beard

PVR & episode guide that downloads and manages all your TV shows
http://code.google.com/p/sickbeard/
GNU General Public License v3.0
70 stars 26 forks source link

Quality parsed as absolute numbers #17

Closed Anthirian closed 10 years ago

Anthirian commented 10 years ago

Hi,

I've downloaded a 1080p WEB-DL version of Breaking Bad. It gets snatched correctly, but the post processing has some trouble finding the correct episode. The log is below. It appears as though the 1080p identifier is parsed as an absolute number 108, which could mean an issue with that particular regex.

Interestingly, moving the unprocessed file to the destination folder without renaming causes Sick Beard to parse the file correctly. It seems like the issue is therefore only in the post processor. Hopefully there is an easy fix for it.

Processing folder E:\Downloads\Unsorted\TV\Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS
Processing E:\Downloads\Unsorted\TV\Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS\Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS.mkv (None)
Parser for 'Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS.mkv' locked. Starting to parse now
Trying to get the tvdbid for Breaking Bad S05E10 Buried
Did NOT find breaking bad s e buried in the exception list
Trying to get the tvdbid for Breaking Bad S05E10 Buried
Did NOT find breaking bad s e buried in the exception list
Parsed :Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS.mkv into: Breaking Bad S05E10 Buried - absolute_numbers: [108] [ABD: False] [ANIME: True] [whichReg: ['anime_bare']]
Assuming tvdb numbers
No show could be matched. assuming tvdb numbers
Parser for 'E:\Downloads\Unsorted\TV\Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS\Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS.mkv' locked. Starting to parse now
Trying to get the tvdbid for Breaking Bad S05E10 Buried
Did NOT find breaking bad s e buried in the exception list
Trying to get the tvdbid for Breaking Bad S05E10 Buried
Did NOT find breaking bad s e buried in the exception list
Parsed :E:\Downloads\Unsorted\TV\Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS\Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS.mkv into: Breaking Bad S05E10 Buried - absolute_numbers: [108] [ABD: False] [ANIME: True] [whichReg: ['anime_bare']]
Assuming tvdb numbers
No show could be matched. assuming tvdb numbers
Parser for 'Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS.mkv' locked. Starting to parse now
Trying to get the tvdbid for Breaking Bad S05E10 Buried
Did NOT find breaking bad s e buried in the exception list
Trying to get the tvdbid for Breaking Bad S05E10 Buried
Did NOT find breaking bad s e buried in the exception list
Parsed :Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS.mkv into: Breaking Bad S05E10 Buried - absolute_numbers: [108] [ABD: False] [ANIME: True] [whichReg: ['anime_bare']]
Assuming tvdb numbers
No show could be matched. assuming tvdb numbers
Parser for 'Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS' locked. Starting to parse now
Trying to get the tvdbid for Breaking Bad S05E10 Buried
Did NOT find breaking bad s e buried in the exception list
Trying to get the tvdbid for Breaking Bad S05E10 Buried
Did NOT find breaking bad s e buried in the exception list
Parsed :Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS into: Breaking Bad S05E10 Buried - absolute_numbers: [108] [ABD: False] [ANIME: True] [whichReg: ['anime_bare']]
Assuming tvdb numbers
No show could be matched. assuming tvdb numbers
Found NO result in history for 'Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS'
Found result in history: (81189, 5, [])
Processing failed for E:\Downloads\Unsorted\TV\Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS\Breaking.Bad.S05E10.Buried.1080p.WEB-DL.DD5.1.H.264-BS.mkv:
Anthirian commented 10 years ago

I have found the solution to this issue. The problem is caused by the anime_bare regex that gets used before the standard regexes. This regex swallows the 108 of 1080p causing the matching process to fail. I have modified the regex somewhat to avoid the 0p at the end of a seemingly absolute number.

After that fix, the anime_bare regex still caused problems, because now the H.264 was being parsed as an absolute number instead. Another slight modification to the regex, to check the absolute number is not preceded by H., fixed this issue as well.

Long story short, the anime_bare regex no longer blocks the parsing of 1080p WEB-DL downloads, for which I will submit a pull request soon, after I've done some more checks.