Skip to content

Fix remaster input checkbox id #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pythonbits/bb.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from unidecode import unidecode
from requests.exceptions import HTTPError

from . import flags
from .config import config
from .logging import log
from .torrent import make_torrent
Expand Down Expand Up @@ -697,7 +698,7 @@ def _render_form_title(self):
m=" / ".join(self['markers']))

def _render_summary(self):
t = tvdb.TVDB()
t = tvdb.TVDB(interactive=('headless' not in flags))
results = t.search(self['tv_specifier'], self['tvdb_id'])
title_i18n = self.tvdb_title_i18n(results[0])
summaries = []
Expand Down Expand Up @@ -1244,7 +1245,7 @@ class MusicSubmission(AudioSubmission):
_cat_id = 'music'
_form_type = 'Music'

@form_field('remaster_true', 'checkbox')
@form_field('remaster', 'checkbox')
def _render_remaster(self):
# todo user input function/module to reduce boilerplating
return bool(
Expand Down
1 change: 1 addition & 0 deletions pythonbits/tvdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def __init__(self, interactive=True):
actors=True, apikey=d(api_key))

def search(self, tv_specifier, tvdb_id=None):
tvdb_id = tvdb_id if tvdb_id is None else int(tvdb_id)
show = self.tvdb[tvdb_id or tv_specifier.title]
season = show[tv_specifier.season]
if tv_specifier.episode is not None:
Expand Down