Skip to content

Commit

Permalink
Fix WEB-DL and WEB-Rip detections
Browse files Browse the repository at this point in the history
* Optimize regex
* Add WEB detection
* Add DLMux detection
  • Loading branch information
labrys committed Mar 2, 2016
1 parent 29ba558 commit dc03bec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sickrage/recompiled/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Sources
tv = re.compile(r'([sph]d).?tv|tv(rip|mux)', re.IGNORECASE)
dvd = re.compile(r'(?P<hd>hd)?dvd(?P<rip>rip|mux)?', re.IGNORECASE)
web = re.compile(r'(web.?(?P<dl>dl)|web(?P<rip>rip|mux|hd))', re.IGNORECASE)
web = re.compile(r'(web(?P<type>rip|mux|hd|.?dl|\b))', re.IGNORECASE)
bluray = re.compile(r'(blue?-?ray|b[rd](?:rip|mux))', re.IGNORECASE)
sat = re.compile(r'(dsr|satrip)', re.IGNORECASE)
itunes = re.compile(r'(itunes)', re.IGNORECASE)
Expand Down
9 changes: 6 additions & 3 deletions sickrage/tagger/episode.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ def web(self):
:returns: an empty string if not found
"""
attr = 'web'
match = self._get_match_obj(attr)
return '' if not match else match.group('dl') or match.group('rip')
if 'dlmux' in self.name.lower():
return 'dlmux'
else:
attr = 'web'
match = self._get_match_obj(attr)
return '' if not match else match.group('type')

@property
def sat(self):
Expand Down

0 comments on commit dc03bec

Please sign in to comment.