NBLA: Remove year from episodic content
This commit is contained in:
parent
a0dc67f74b
commit
e6e74047ea
@ -112,12 +112,14 @@ class NBLA(Service):
|
||||
@staticmethod
|
||||
@click.command(name="NBLA", short_help="https://nebula.tv", help=__doc__)
|
||||
@click.argument("title", type=str)
|
||||
@click.option('--force-movie', is_flag=True)
|
||||
@click.pass_context
|
||||
def cli(ctx: Context, **kwargs: Any) -> NBLA:
|
||||
return NBLA(ctx, **kwargs)
|
||||
|
||||
def __init__(self, ctx: Context, title: str):
|
||||
def __init__(self, ctx: Context, title: str, force_movie: bool):
|
||||
self.title = title
|
||||
self.force_movie = force_movie
|
||||
super().__init__(ctx)
|
||||
|
||||
def authenticate(self, cookies: Optional[MozillaCookieJar] = None, credential: Optional[Credential] = None) -> None:
|
||||
@ -149,7 +151,7 @@ class NBLA(Service):
|
||||
video = r.json()
|
||||
|
||||
# Simplest scenario: This is a video on a non-episodic channel, return it as movie
|
||||
if video["channel_type"] != "episodic":
|
||||
if self.force_movie or video["channel_type"] != "episodic":
|
||||
return Movies([
|
||||
Movie(
|
||||
id_=video["id"],
|
||||
@ -235,7 +237,6 @@ class NBLA(Service):
|
||||
title=channel["title"],
|
||||
name=episode["title"],
|
||||
language="en",
|
||||
year=episode["video"]["published_at"][0:4],
|
||||
season=season_number,
|
||||
number=episode_number,
|
||||
)
|
||||
@ -283,7 +284,6 @@ class NBLA(Service):
|
||||
title=show_title,
|
||||
name=episode["title"],
|
||||
language="en",
|
||||
year=episode["published_at"][0:4],
|
||||
season=1,
|
||||
number=episode_number,
|
||||
))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user