version bump
This commit is contained in:
parent
55a5e6a355
commit
5da27d32a1
|
@ -1,5 +1,9 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.6.13
|
||||||
|
- Only replace chars with _ when required
|
||||||
|
- Added defaults to README
|
||||||
|
|
||||||
## 0.6.12
|
## 0.6.12
|
||||||
- Dockerfile works again
|
- Dockerfile works again
|
||||||
- Fixed lrc file extension replacement
|
- Fixed lrc file extension replacement
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = zotify
|
name = zotify
|
||||||
version = 0.6.12
|
version = 0.6.13
|
||||||
author = Zotify Contributors
|
author = Zotify Contributors
|
||||||
description = A highly customizable music and podcast downloader
|
description = A highly customizable music and podcast downloader
|
||||||
long_description = file: README.md
|
long_description = file: README.md
|
||||||
|
|
|
@ -92,6 +92,8 @@ USER_LIBRARY_READ = 'user-library-read'
|
||||||
|
|
||||||
WINDOWS_SYSTEM = 'Windows'
|
WINDOWS_SYSTEM = 'Windows'
|
||||||
|
|
||||||
|
LINUX_SYSTEM = 'Linux'
|
||||||
|
|
||||||
CODEC_MAP = {
|
CODEC_MAP = {
|
||||||
'aac': 'aac',
|
'aac': 'aac',
|
||||||
'fdk_aac': 'libfdk_aac',
|
'fdk_aac': 'libfdk_aac',
|
||||||
|
|
|
@ -12,7 +12,7 @@ import music_tag
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from zotify.const import ARTIST, GENRE, TRACKTITLE, ALBUM, YEAR, DISCNUMBER, TRACKNUMBER, ARTWORK, \
|
from zotify.const import ARTIST, GENRE, TRACKTITLE, ALBUM, YEAR, DISCNUMBER, TRACKNUMBER, ARTWORK, \
|
||||||
WINDOWS_SYSTEM, ALBUMARTIST
|
WINDOWS_SYSTEM, LINUX_SYSTEM, ALBUMARTIST
|
||||||
from zotify.zotify import Zotify
|
from zotify.zotify import Zotify
|
||||||
|
|
||||||
|
|
||||||
|
@ -258,7 +258,12 @@ def fix_filename(name):
|
||||||
>>> all('_' == fix_filename(chr(i)) for i in list(range(32)))
|
>>> all('_' == fix_filename(chr(i)) for i in list(range(32)))
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
|
if platform.system() == WINDOWS_SYSTEM:
|
||||||
return re.sub(r'[/\\:|<>"?*\0-\x1f]|^(AUX|COM[1-9]|CON|LPT[1-9]|NUL|PRN)(?![^.])|^\s|[\s.]$', "_", str(name), flags=re.IGNORECASE)
|
return re.sub(r'[/\\:|<>"?*\0-\x1f]|^(AUX|COM[1-9]|CON|LPT[1-9]|NUL|PRN)(?![^.])|^\s|[\s.]$', "_", str(name), flags=re.IGNORECASE)
|
||||||
|
elif platform.system() == LINUX_SYSTEM:
|
||||||
|
return re.sub(r'[/\0]', "_", str(name))
|
||||||
|
else: # MacOS
|
||||||
|
return re.sub(r'[/:\0]', "_", str(name))
|
||||||
|
|
||||||
|
|
||||||
def fmt_seconds(secs: float) -> str:
|
def fmt_seconds(secs: float) -> str:
|
||||||
|
|
Loading…
Reference in New Issue