Skip to content

Commit

Permalink
Only get subtitles where defaultOn: True (#30)
Browse files Browse the repository at this point in the history
* Only get subtitles where defaultOn: True

* Bump version
  • Loading branch information
marhoy committed Sep 22, 2022
1 parent 38e5e8c commit bd2da69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nrkdownload"
version = "3.1.1"
version = "3.1.2"
description = ""
authors = ["Martin Høy <marhoy@gmail.com>"]
readme = "README.md"
Expand Down
4 changes: 3 additions & 1 deletion src/nrkdownload/nrk_tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def from_program_id(cls, program_id: str) -> TVProgram:
backdrop_url=get_image_url(data, "backdropImage"),
media_urls=[asset["url"] for asset in manifest["playable"]["assets"]],
subtitle_urls=[
title["webVtt"] for title in manifest["playable"]["subtitles"]
title["webVtt"]
for title in manifest["playable"]["subtitles"]
if title["defaultOn"]
],
)

Expand Down

0 comments on commit bd2da69

Please sign in to comment.