diff options
Diffstat (limited to 'imdb-lookup')
-rwxr-xr-x | imdb-lookup/imdbrating.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/imdb-lookup/imdbrating.py b/imdb-lookup/imdbrating.py index de4c167..662b8d9 100755 --- a/imdb-lookup/imdbrating.py +++ b/imdb-lookup/imdbrating.py @@ -45,7 +45,7 @@ if __name__ == u"__main__": for filename in sys.argv[1:]: imdb_id = filename.split('#')[-1] - if imdb_id not in db.keys(): + if imdb_id not in db.keys() or db[imdb_id] == 0: db[imdb_id] = str(get_rating(imdb_id)) - print db[imdb_id] + print u"{rating} {filename}".format(rating=db[imdb_id], filename=filename.decode('utf-8')) db.close() |