mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-12 22:26:16 -04:00
Update config
This commit is contained in:
parent
51ae29e851
commit
a2e9279189
2 changed files with 27 additions and 15 deletions
|
@ -182,6 +182,7 @@ class DownloadsConfig:
|
||||||
# If you have very fast internet, you will benefit from a higher value,
|
# If you have very fast internet, you will benefit from a higher value,
|
||||||
# A value that is too high for your bandwidth may cause slowdowns
|
# A value that is too high for your bandwidth may cause slowdowns
|
||||||
max_connections: int
|
max_connections: int
|
||||||
|
requests_per_minute: int
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True)
|
@dataclass(slots=True)
|
||||||
|
@ -205,6 +206,7 @@ class Config:
|
||||||
|
|
||||||
qobuz: QobuzConfig
|
qobuz: QobuzConfig
|
||||||
tidal: TidalConfig
|
tidal: TidalConfig
|
||||||
|
deezer: DeezerConfig
|
||||||
soundcloud: SoundcloudConfig
|
soundcloud: SoundcloudConfig
|
||||||
youtube: YoutubeConfig
|
youtube: YoutubeConfig
|
||||||
lastfm: LastFmConfig
|
lastfm: LastFmConfig
|
||||||
|
@ -217,6 +219,8 @@ class Config:
|
||||||
theme: ThemeConfig
|
theme: ThemeConfig
|
||||||
database: DatabaseConfig
|
database: DatabaseConfig
|
||||||
|
|
||||||
|
_modified: bool = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_toml(cls, toml_str: str):
|
def from_toml(cls, toml_str: str):
|
||||||
# TODO: handle the mistake where Windows people forget to escape backslash
|
# TODO: handle the mistake where Windows people forget to escape backslash
|
||||||
|
@ -227,6 +231,7 @@ class Config:
|
||||||
downloads = DownloadsConfig(**toml["downloads"]) # type: ignore
|
downloads = DownloadsConfig(**toml["downloads"]) # type: ignore
|
||||||
qobuz = QobuzConfig(**toml["qobuz"]) # type: ignore
|
qobuz = QobuzConfig(**toml["qobuz"]) # type: ignore
|
||||||
tidal = TidalConfig(**toml["tidal"]) # type: ignore
|
tidal = TidalConfig(**toml["tidal"]) # type: ignore
|
||||||
|
deezer = DeezerConfig(**toml["deezer"]) # type: ignore
|
||||||
soundcloud = SoundcloudConfig(**toml["soundcloud"]) # type: ignore
|
soundcloud = SoundcloudConfig(**toml["soundcloud"]) # type: ignore
|
||||||
youtube = YoutubeConfig(**toml["youtube"]) # type: ignore
|
youtube = YoutubeConfig(**toml["youtube"]) # type: ignore
|
||||||
lastfm = LastFmConfig(**toml["lastfm"]) # type: ignore
|
lastfm = LastFmConfig(**toml["lastfm"]) # type: ignore
|
||||||
|
@ -241,6 +246,7 @@ class Config:
|
||||||
downloads=downloads,
|
downloads=downloads,
|
||||||
qobuz=qobuz,
|
qobuz=qobuz,
|
||||||
tidal=tidal,
|
tidal=tidal,
|
||||||
|
deezer=deezer,
|
||||||
soundcloud=soundcloud,
|
soundcloud=soundcloud,
|
||||||
youtube=youtube,
|
youtube=youtube,
|
||||||
lastfm=lastfm,
|
lastfm=lastfm,
|
||||||
|
@ -253,6 +259,9 @@ class Config:
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_defaults(cls):
|
def defaults(cls):
|
||||||
with open(DEFAULT_CONFIG_PATH) as f:
|
with open(DEFAULT_CONFIG_PATH) as f:
|
||||||
return cls.from_toml(f.read())
|
return cls.from_toml(f.read())
|
||||||
|
|
||||||
|
def set_modified(self):
|
||||||
|
self._modified = True
|
||||||
|
|
|
@ -4,15 +4,17 @@ folder = ""
|
||||||
# Put Qobuz albums in a 'Qobuz' folder, Tidal albums in 'Tidal' etc.
|
# Put Qobuz albums in a 'Qobuz' folder, Tidal albums in 'Tidal' etc.
|
||||||
source_subdirectories = false
|
source_subdirectories = false
|
||||||
|
|
||||||
[downloads.concurrency]
|
|
||||||
# Download (and convert) tracks all at once, instead of sequentially.
|
# Download (and convert) tracks all at once, instead of sequentially.
|
||||||
# If you are converting the tracks, or have fast internet, this will
|
# If you are converting the tracks, or have fast internet, this will
|
||||||
# substantially improve processing speed.
|
# substantially improve processing speed.
|
||||||
enabled = true
|
concurrency = true
|
||||||
# The maximum number of tracks to download at once
|
# The maximum number of tracks to download at once
|
||||||
# If you have very fast internet, you will benefit from a higher value,
|
# If you have very fast internet, you will benefit from a higher value,
|
||||||
# A value that is too high for your bandwidth may cause slowdowns
|
# A value that is too high for your bandwidth may cause slowdowns
|
||||||
max_connections = 3
|
max_connections = 3
|
||||||
|
# Max number of API requests to handle per minute
|
||||||
|
# Set to -1 for no limit
|
||||||
|
requests_per_minute = -1
|
||||||
|
|
||||||
[qobuz]
|
[qobuz]
|
||||||
# 1: 320kbps MP3, 2: 16/44.1, 3: 24/<=96, 4: 24/>=96
|
# 1: 320kbps MP3, 2: 16/44.1, 3: 24/<=96, 4: 24/>=96
|
||||||
|
@ -20,9 +22,12 @@ quality = 3
|
||||||
# This will download booklet pdfs that are included with some albums
|
# This will download booklet pdfs that are included with some albums
|
||||||
download_booklets = true
|
download_booklets = true
|
||||||
|
|
||||||
email = ""
|
# Authenticate to Qobuz using auth token? Value can be true/false only
|
||||||
# This is an md5 hash of the plaintext password
|
use_auth_token = false
|
||||||
password = ""
|
# Enter your userid if the above use_auth_token is set to true, else enter your email
|
||||||
|
email_or_userid = ""
|
||||||
|
# Enter your auth token if the above use_auth_token is set to true, else enter the md5 hash of your plaintext password
|
||||||
|
password_or_token = ""
|
||||||
# Do not change
|
# Do not change
|
||||||
app_id = ""
|
app_id = ""
|
||||||
# Do not change
|
# Do not change
|
||||||
|
@ -76,15 +81,14 @@ download_videos = false
|
||||||
video_downloads_folder = ""
|
video_downloads_folder = ""
|
||||||
|
|
||||||
# This stores a list of item IDs so that repeats are not downloaded.
|
# This stores a list of item IDs so that repeats are not downloaded.
|
||||||
[database.downloads]
|
[database]
|
||||||
enabled = true
|
downloads_enabled = true
|
||||||
path = ""
|
downloads_path = ""
|
||||||
|
|
||||||
# If a download fails, the item ID is stored here. Then, `rip repair` can be
|
# If a download fails, the item ID is stored here. Then, `rip repair` can be
|
||||||
# called to retry the downloads
|
# called to retry the downloads
|
||||||
[database.failed_downloads]
|
failed_downloads_enabled = true
|
||||||
enabled = true
|
failed_downloads_path = ""
|
||||||
path = ""
|
|
||||||
|
|
||||||
# Convert tracks to a codec after downloading them.
|
# Convert tracks to a codec after downloading them.
|
||||||
[conversion]
|
[conversion]
|
||||||
|
@ -101,7 +105,7 @@ bit_depth = 24
|
||||||
lossy_bitrate = 320
|
lossy_bitrate = 320
|
||||||
|
|
||||||
# Filter a Qobuz artist's discography. Set to 'true' to turn on a filter.
|
# Filter a Qobuz artist's discography. Set to 'true' to turn on a filter.
|
||||||
[filters]
|
[qobuz_filters]
|
||||||
# Remove Collectors Editions, live recordings, etc.
|
# Remove Collectors Editions, live recordings, etc.
|
||||||
extras = false
|
extras = false
|
||||||
# Picks the highest quality out of albums with identical titles.
|
# Picks the highest quality out of albums with identical titles.
|
||||||
|
@ -157,7 +161,6 @@ restrict_characters = false
|
||||||
# Setting this to false may cause downloads to fail on some systems
|
# Setting this to false may cause downloads to fail on some systems
|
||||||
truncate = true
|
truncate = true
|
||||||
|
|
||||||
|
|
||||||
# Last.fm playlists are downloaded by searching for the titles of the tracks
|
# Last.fm playlists are downloaded by searching for the titles of the tracks
|
||||||
[lastfm]
|
[lastfm]
|
||||||
# The source on which to search for the tracks.
|
# The source on which to search for the tracks.
|
||||||
|
@ -172,4 +175,4 @@ progress_bar = "dainty"
|
||||||
|
|
||||||
[misc]
|
[misc]
|
||||||
# Metadata to identify this config file. Do not change.
|
# Metadata to identify this config file. Do not change.
|
||||||
version = "1.9.6"
|
version = "2.0"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue