Skip to content

Commit

Permalink
Bugfixes (#28)
Browse files Browse the repository at this point in the history
* Use valid_filename for episode downloads

* Set html_static_path to empty list

* Fix error in README

* Bump version
  • Loading branch information
marhoy committed Jul 27, 2022
1 parent 59050a7 commit 38e5e8c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ poetry install
- Make sure all tests are ok by running `tox`
- Make a pull requst on GitHub
- Use the "new release" functionallity of GitHub. Make a new tag.
- Update `pyproject.toml` and `__init__.py` to match the new version number.
- Update `pyproject.toml` to match the new version number.
- `poetry build`
- `poetry publish`
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
from typing import Dict
from typing import Dict, List

sys.path.insert(0, os.path.abspath("../src/"))

Expand Down Expand Up @@ -95,7 +95,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_static_path: List[str] = []

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down
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.0"
version = "3.1.1"
description = ""
authors = ["Martin Høy <marhoy@gmail.com>"]
readme = "README.md"
Expand Down
12 changes: 10 additions & 2 deletions src/nrkdownload/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
from halo import Halo
from loguru import logger

from nrkdownload.nrk_tv import NotPlayableError, TVProgram, TVSeries, TVSeriesType
from nrkdownload.nrk_tv import (
NotPlayableError,
TVProgram,
TVSeries,
TVSeriesType,
valid_filename,
)


def get_default_dowload_dir() -> Path:
Expand Down Expand Up @@ -70,7 +76,9 @@ def download_series(
else:
sequence_string = season.season_id

program.download_as_episode(series.title, sequence_string, directory)
program.download_as_episode(
valid_filename(series.title), sequence_string, directory
)
# typer.echo(f"Downloading episode {program.title}")


Expand Down

0 comments on commit 38e5e8c

Please sign in to comment.