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
Added verbose argument to processNames (shows the filename, what regex 
matched it, and the segments it grabbed)
dbr (author)
Sun Jun 22 05:06:03 -0700 2008
commit  acf8d11775f88d01a6847c1050b44b1fc8b16861
tree    404edbad4cd76b6e46b62b8bbb8e170236c3c8db
parent  27659d9b001620b58f1da4e7ef71461753b7581c
...
94
95
96
97
 
98
99
100
...
108
109
110
 
 
 
 
 
 
 
 
 
 
111
112
113
...
94
95
96
 
97
98
99
100
...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
0
@@ -94,7 +94,7 @@ def findFiles(args):
0
     return allfiles
0
 #end findFiles
0
 
0
-def processNames(names):
0
+def processNames(names,verbose=False):
0
     """
0
     Takes list of names, runs them though the config['name_parse'] regexs
0
     """
0
@@ -108,6 +108,16 @@ def processNames(names):
0
                 showname,seasno,epno = match.groups()
0
                 showname = showname.replace("."," ").strip()
0
                 seasno,epno = int(seasno), int(epno)
0
+
0
+ if verbose:
0
+ print "*"*20
0
+ print "File:", filename
0
+ print "Pattern:", r.pattern
0
+ print "Showname:", showname
0
+ print "Seas:", seasno
0
+ print "Ep:", epno
0
+ print "*"*20
0
+
0
                 allEps.append({ 'file_showname':showname,
0
                                 'seasno':seasno,
0
                                 'epno':epno,

Comments

    No one has commented yet.