This commit is contained in:
Jesse Bannon 2023-02-20 10:09:12 -08:00
parent acdc6e15e1
commit 13c9a41050
4 changed files with 27 additions and 24 deletions

View file

@ -25,33 +25,34 @@ from ytdl_sub.entries.variables.kwargs import WEBPAGE_URL
def _sanitize_plex(string: str) -> str: def _sanitize_plex(string: str) -> str:
out = '' out = ""
for char in string: for char in string:
match char: match char:
case '0': case "0":
out += '' out += ""
case '1': case "1":
out += '' out += ""
case '2': case "2":
out += '' out += ""
case '3': case "3":
out += '' out += ""
case '4': case "4":
out += '' out += ""
case '5': case "5":
out += '' out += ""
case '6': case "6":
out += '' out += ""
case '7': case "7":
out += '' out += ""
case '8': case "8":
out += '' out += ""
case '9': case "9":
out += '' out += ""
case _: case _:
out += char out += char
return out return out
class BaseEntryVariables: class BaseEntryVariables:
""" """
Source variables are ``{variables}`` that contain metadata from downloaded media. Source variables are ``{variables}`` that contain metadata from downloaded media.

View file

@ -5,7 +5,8 @@ from pathlib import Path
from typing import List from typing import List
from typing import Optional from typing import Optional
from resources import RESOURCE_PATH, REGENERATE_FIXTURES from resources import REGENERATE_FIXTURES
from resources import RESOURCE_PATH
from ytdl_sub.utils.file_handler import get_file_md5_hash from ytdl_sub.utils.file_handler import get_file_md5_hash

View file

@ -1,7 +1,8 @@
import os import os
from typing import List from typing import List
from resources import RESOURCE_PATH, REGENERATE_FIXTURES from resources import REGENERATE_FIXTURES
from resources import RESOURCE_PATH
from ytdl_sub.utils.file_handler import FileHandlerTransactionLog from ytdl_sub.utils.file_handler import FileHandlerTransactionLog

View file

@ -3,4 +3,4 @@ from resources import REGENERATE_FIXTURES
def test_regenerate_fixtures_is_false() -> None: def test_regenerate_fixtures_is_false() -> None:
"""Make sure this is always set to False when committing""" """Make sure this is always set to False when committing"""
assert not REGENERATE_FIXTURES assert not REGENERATE_FIXTURES