Add manual override for credits check in check_db (untested)

This commit is contained in:
Hellowlol
2018-05-20 18:25:26 +02:00
parent 6a67a5f82c
commit 00e1b37e3d
2 changed files with 19 additions and 1 deletions
+2
View File
@@ -38,6 +38,8 @@ class Preprocessed(Base):
has_recap = Column('has_recap', Boolean, nullable=True)
credits_start = Column('credits_start', Integer, nullable=True)
credits_start_str = Column('credits_start_str', String, nullable=True)
correct_credits_start = Column('correct_credits_start', Integer, nullable=True)
correct_credits_end = Column('correct_credits_start', Integer, nullable=True)
credits_end = Column('credits_end', Integer, nullable=True)
credits_end_str = Column('credits_end_str', String, nullable=True)
ffmpeg_end = Column('ffmpeg_end', Integer, nullable=True)
+17 -1
View File
@@ -256,9 +256,25 @@ def check_db(client_name, skip_done): # pragma: no cover
else:
item.correct_ffmpeg = to_sec(match)
# This needs to be tested manually.
if item.credits_start and item.credits_start != 1:
if (not skip_done and item.correct_credits_start) or not item.correct_credits_start:
click.echo('Found credits start as sec %s time %s' % (item.credits_start, item.credits_start_str))
client.playMedia(PMS.fetchItem(int(item.ratingKey)))
time.sleep(1)
client.seekTo(item.credits_start - 10)
match = click.prompt('Did the credits start at %s correct?' % item.credits_start_str)
if match:
if match.lower() in ['y', 'yes']:
item.correct_credits_start = item.credits_start
else:
item.correct_credits_start = to_sec(match)
click.clear()
# Commit thit shit after each loop.
# Commit this shit after each loop.
if se.dirty:
se.commit()