public
Description: Simple to use TVDB (thetvdb.com) API in Python, and automatic TV episode namer
Homepage: http://dbr.lighthouseapp.com/projects/13342-tvdb_api/tickets
Clone URL: git://github.com/dbr/tvdb_api.git
Search Repo:
Space disappeared from list of valid characters, more regex fixing and 
another filename format added (show.name.1x20.blah.avi)
dbr (author)
Fri May 16 07:11:29 -0700 2008
commit  4aa3f868c4aefda279afe7efde0540c506e06f6e
tree    379dccc1df425641ccf0d72266bea116c9c128e0
parent  b0d7364e9cd2a467ef7fd88d5b5008317ab2c301
...
25
26
27
28
29
 
30
31
32
33
34
35
36
37
38
...
51
52
53
54
 
55
56
 
 
57
58
59
60
61
62
63
 
64
65
66
67
 
68
69
70
 
71
72
73
...
287
288
289
 
290
291
292
...
25
26
27
 
 
28
29
 
30
31
32
33
34
35
36
...
49
50
51
 
52
53
 
54
55
56
57
58
59
60
61
 
62
63
64
65
 
66
67
68
 
69
70
71
72
...
286
287
288
289
290
291
292
0
@@ -25,10 +25,8 @@
0
         [\w\. ]* # show name
0
     )
0
     (?: \- )? # -
0
- [\[ ]{1,2} #(?=\[)? #.*?
0
- .*?
0
+ [\[ ]{1,2}
0
         (\d+)x(\d+)
0
- .*?
0
     (?:\])?
0
     .*?
0
     $
0
0
0
0
0
@@ -51,23 +49,24 @@
0
     ^(
0
         [\w\. ]*
0
     )
0
- (?= \- |\.)?
0
+ (?: \- |\.)?
0
     .*?
0
- (?=\d+)x(\d+)(\D|$)
0
+ (\d+)x(\d+)
0
+ (?:\D|$)
0
     ''', re.IGNORECASE|re.VERBOSE ),
0
     
0
     re.compile('''
0
     ^(
0
         [\w\. ]*
0
     )
0
- (?= \- )?
0
+ (?: \- )?
0
     \D+
0
     (\d+?)(\d{2})
0
     .*?
0
- (?=\D|$)''', re.IGNORECASE|re.VERBOSE ),
0
+ (?:\D|$)''', re.IGNORECASE|re.VERBOSE ),
0
 ]
0
 
0
-config['valid_filename_chars'] = """0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@£$%^&*()_+=-[]{}"'.,<>`~?"""
0
+config['valid_filename_chars'] = """0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@£$%^&*()_+=-[]{}"'.,<>`~? """
0
 
0
 def findFiles(args):
0
     allfiles=[]
0
@@ -287,6 +286,7 @@
0
             'show name [01x21].avi',
0
             'show name [01x21] - the wrong ep name.avi',
0
             'show name [01x21] the wrong ep name.avi',
0
+ 'show.name.1x21.The_Wrong_ep_name.avi'
0
         ]
0
         proced = processNames(names)
0
         self.assertEquals( len(names), len(proced) )

Comments

    No one has commented yet.