We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Checks the naming of recorded/downloaded TV Episodes
Clone URL: git://github.com/dbr/checktveps.git
Shows valid episodes, using ShowContainer and the other classes
dbr (author)
Sun Jun 29 20:34:33 -0700 2008
commit  29c2e60bbcf903314bce8472e7d8e595d23caa44
tree    84c12b9f75a445f85eba5fcff1e840aae6bd8832
parent  6f40858821c1a82c82e66d5388184d27c884bfd1
...
287
288
289
290
291
292
293
294
295
296
297
298
299
300
...
360
361
362
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
287
288
289
 
 
 
 
 
 
 
 
290
291
292
...
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
0
@@ -287,14 +287,6 @@ if files.__len__() == 0:
0
     print colour('No files found','red')
0
     sys.exit(1)
0
 
0
-
0
-errors = {
0
- 1:'malformed name',
0
- 2:'missing epsiode name',
0
- 3:'path is incorrect'
0
-}
0
-
0
-
0
 ###################################
0
 # Validate filenames
0
 ###################################
0
@@ -360,3 +352,21 @@ if len(invalid) > 0:
0
     
0
         for c in errors:
0
             print c['filename']
0
+
0
+###################################
0
+# Show valid names
0
+###################################
0
+if valid.__len__() > 0:
0
+ print colour('INFO','green'), ': Valid file-names found:'
0
+ allepisodes = ShowContainer()
0
+
0
+ for cur in valid:
0
+ if len(cur['match']) == 4:
0
+ showname,seasno,epno,title = cur['match']
0
+ elif len(cur['match']) == 3:
0
+ seasno = 1
0
+ showname,epno,title = cur['match']
0
+
0
+ allepisodes[showname][seasno][epno]['name'] = title
0
+ #end for cur in valid
0
+ print allepisodes

Comments

    No one has commented yet.