From f39c894fd7f5ca1fd4f3c39891578db5360eca4f Mon Sep 17 00:00:00 2001 From: Hellow <74311245+HeIIow2@users.noreply.github.com> Date: Wed, 10 May 2023 16:39:44 +0200 Subject: [PATCH] fixed file paths --- .idea/music-downloader.iml | 1 + requirements.txt | 31 +++++++++++++++++++-- src/music_kraken/utils/string_processing.py | 4 +++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.idea/music-downloader.iml b/.idea/music-downloader.iml index 95b8e80..700e2fb 100644 --- a/.idea/music-downloader.iml +++ b/.idea/music-downloader.iml @@ -2,6 +2,7 @@ + diff --git a/requirements.txt b/requirements.txt index a67d5a0..2620965 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,10 +8,37 @@ beautifulsoup4~=4.11.1 pycountry~=22.3.5 python-dateutil~=2.8.2 pandoc~=2.3 -SQLAlchemy +SQLAlchemy~=2.0.7 setuptools~=60.2.0 tqdm~=4.65.0 peewee~=3.15.4 ffmpeg-python~=0.2.0 platformdirs~=3.2.0 -transliterate~=1.10.2 \ No newline at end of file +transliterate~=1.10.2 +pathvalidate~=2.5.2 +pytest~=7.2.1 +soupsieve~=2.3.2.post1 +pip~=21.3.1 +build~=0.9.0 +wheel~=0.37.1 +future~=0.18.3 +pytz~=2022.4 +attrs~=22.2.0 +pep517~=0.13.0 +tomli~=2.0.1 +numpy~=1.23.4 +regex~=2022.9.13 +pandas~=1.5.0 +ply~=3.11 +plumbum~=1.8.1 +wcwidth~=0.2.5 +pluggy~=1.0.0 +exceptiongroup~=1.1.0 +iniconfig~=2.0.0 +six~=1.16.0 +greenlet~=2.0.2 +Pygments~=2.13.0 +idna~=3.4 +urllib3~=1.26.12 +pyparsing~=3.0.9 +progressbar~=2.5 \ No newline at end of file diff --git a/src/music_kraken/utils/string_processing.py b/src/music_kraken/utils/string_processing.py index 8f1bb1f..a11c56d 100644 --- a/src/music_kraken/utils/string_processing.py +++ b/src/music_kraken/utils/string_processing.py @@ -1,6 +1,8 @@ from transliterate.exceptions import LanguageDetectionError from transliterate import translit +from pathvalidate import sanitize_filename + def unify(string: str) -> str: """ @@ -28,4 +30,6 @@ def fit_to_file_system(string: str) -> str: string = string.replace("/", "|").replace("\\", "|") + string = sanitize_filename(string) + return string