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
Fixed "always rename" option (which broke after optparse option was added 
for --always)
dbr (author)
Mon Jun 09 05:13:06 -0700 2008
commit  29fdfbb9bba85e5ebc165becc51c0f590c1ca97b
tree    2664d2c3c9e3ff1e78a574553b5612227b928031
parent  df6389fc85ad0c81ed467a899aa951d69d61da06
...
258
259
260
261
 
262
263
264
...
271
272
273
274
 
275
276
277
...
258
259
260
 
261
262
263
264
...
271
272
273
 
274
275
276
277
0
@@ -258,7 +258,7 @@ def main():
0
         print "New name: %s" % ( newname )
0
         
0
         # Either always rename, or prompt user
0
- if opts.always or not opts.interactive:
0
+ if opts.always or (not opts.interactive):
0
             rename_result = renameFile(oldfile,newname,force=opts.force)
0
             if rename_result:
0
                 print "..auto-renaming"
0
@@ -271,7 +271,7 @@ def main():
0
         print "(y/n/a/q)",
0
         ans=raw_input()
0
         if ans[0] == "a":
0
- always=True
0
+ opts.always=True
0
             rename_result = renameFile(oldfile,newname,force=opts.force)
0
         elif ans[0] == "q":
0
             print "Aborting"

Comments

    No one has commented yet.