blob: a0f114588b3e60be4695d09c6701b85b28d00ce4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
Improved regular expression for matching season and episode; see
https://sourceforge.net/tracker/index.php?func=detail&aid=2818315&group_id=203642&atid=986413
--- a/pytvshows.orig 2011-08-17 23:20:16.000000000 +0200
+++ b/pytvshows 2011-08-17 23:22:30.000000000 +0200
@@ -346,7 +346,8 @@
if self.feedurl:
for episode in self.rss['entries']:
if self.show_type == 'seasonepisode':
- r = re.compile('S([0-9]+)E([0-9]+)')
+ #r = re.compile('S([0-9]+)E([0-9]+)')
+ r = re.compile(r'\bS?([0-9]{1,2})\s*(?:E|x)?\s*([0-9]{1,2})\b')
match = r.search( episode.title )
season_num = int(match.group(1))
episode_num = int(match.group(2))
|