Private GIT

Skip to content
Snippets Groups Projects
Commit 643b98eb authored by p00chie's avatar p00chie Committed by miigotu
Browse files

Update episode.py

parent 160ef3dd
Branches
Tags
No related merge requests found
...@@ -30,6 +30,7 @@ class EpisodeTags(object): ...@@ -30,6 +30,7 @@ class EpisodeTags(object):
'mpeg': tags.mpeg, 'mpeg': tags.mpeg,
'xvid': tags.xvid, 'xvid': tags.xvid,
'netflix': tags.netflix, 'netflix': tags.netflix,
'amazon': tags.amazon,
} }
def _get_match_obj(self, attr, regex=None, flags=0): def _get_match_obj(self, attr, regex=None, flags=0):
...@@ -277,3 +278,13 @@ class EpisodeTags(object): ...@@ -277,3 +278,13 @@ class EpisodeTags(object):
attr = 'netflix' attr = 'netflix'
match = self._get_match_obj(attr) match = self._get_match_obj(attr)
return '' if not match else match.group() return '' if not match else match.group()
@property
def amazon(self):
"""
Amazon tage found in name
:return: an empty string if not found
"""
attr = 'amazon'
match = self._get_match_obj(attr)
return '' if not match else match.group()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment