davels / tvdb-bulk-update
MythTV bulk update script using www.tvdb.com. Set MythVideo metadata and posters for tv episodes.
Clone this repository (size: 61.7 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/davels/tvdb-bulk-update/
| commit 51: | c394be49a49d |
| parent 50: | 7da55b422a3f |
| branch: | default |
add more debug output
Changed (Δ274 bytes):
raw changeset »
tvdb_bulk_update.py (12 lines added, 6 lines removed)
Up to file-list tvdb_bulk_update.py:
| … | … | @@ -121,10 +121,10 @@ import subprocess |
121 |
121 |
from optparse import OptionParser |
122 |
122 |
import MySQLdb |
123 |
123 |
|
124 |
POSTER_NONE = 0 |
|
125 |
POSTER_LINK = 1 |
|
126 |
POSTER_COPY = 2 |
|
127 |
POSTER_COMPOSITE = 3 |
|
124 |
POSTER_NONE = 'POSTER_NONE' |
|
125 |
POSTER_LINK = 'POSTER_LINK' |
|
126 |
POSTER_COPY = 'POSTER_COPY' |
|
127 |
POSTER_COMPOSITE = 'POSTER_COMPOSITE' |
|
128 |
128 |
|
129 |
129 |
SERIES_POSTER = "TVDB-SERIES-POSTER" |
130 |
130 |
SEASON_POSTER = "TVDB-SEASON-POSTER" |
| … | … | @@ -489,7 +489,7 @@ def process_file(intid, filename): |
489 |
489 |
print "Filename can not be parsed" |
490 |
490 |
return |
491 |
491 |
(series_name, season_num, episode_num, isdvd) = parts |
492 |
title = "Series:%s season:%d episode:% |
|
492 |
title = "Series:%s season:%d episode:%s" % tuple(parts[:3]) |
|
493 |
493 |
if isdvd: title += " (DVD)" |
494 |
494 |
print title |
495 |
495 |
series = prompt_search_series(series_name, isdvd) |
| … | … | @@ -563,7 +563,7 @@ def _get_tvdb_poster(bannertype, series, |
563 |
563 |
if posterurl: |
564 |
564 |
print msg |
565 |
565 |
if DRY_RUN: |
566 |
posterfile = "X- |
|
566 |
posterfile = "X-phony-tvdb-dl-X" |
|
567 |
567 |
else: |
568 |
568 |
posterfile = tvdb.get_banner(posterurl) |
569 |
569 |
return posterfile |
| … | … | @@ -591,6 +591,10 @@ def _find_poster_file(posters, series, e |
591 |
591 |
if os.path.exists(testfile): |
592 |
592 |
posterfile = testfile |
593 |
593 |
break |
594 |
if DEBUG: |
|
595 |
print "#Poster file not found:", testfile |
|
596 |
if DEBUG and posterfile: |
|
597 |
print "#Choosing poster file:", posterfile |
|
594 |
598 |
return posterfile |
595 |
599 |
|
596 |
600 |
|
| … | … | @@ -605,6 +609,8 @@ def save_poster(intid, filename, series, |
605 |
609 |
print "*** No poster action found" |
606 |
610 |
return None |
607 |
611 |
cmd = action[0] |
612 |
if DEBUG: |
|
613 |
print "#Poster command:", action |
|
608 |
614 |
if cmd == POSTER_NONE: |
609 |
615 |
# do nothing |
610 |
616 |
return None |
