config
Module related to managing reading and writing to the config file.
Default config - spotdl.utils.config.DEFAULT_CONFIG
ConfigError
¤
Bases: Exception
Base class for all exceptions related to config.
create_settings(arguments)
¤
Create settings dicts for Spotify, Downloader and Web based on the arguments and config file (if enabled)
Arguments¤
- arguments: Namespace from argparse
Returns¤
- spotify_options: SpotifyOptions
- downloader_options: DownloaderOptions
- web_options: WebOptions
Source code in spotdl/utils/config.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
|
create_settings_type(arguments, config, default)
¤
Create settings dict Argument value has always the priority, then the config file value, and if neither are set, use default value
Arguments¤
- arguments: Namespace from argparse
- default: dict
Returns¤
- settings: dict
Source code in spotdl/utils/config.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
|
get_cache_path()
¤
Get the path to the cache folder.
Returns¤
- The path to the spotipy cache file.
Source code in spotdl/utils/config.py
82 83 84 85 86 87 88 89 90 |
|
get_config()
¤
Get the config.
Returns¤
- The dictionary with the config.
Errors¤
- ConfigError: If the config file does not exist.
Source code in spotdl/utils/config.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
get_config_file()
¤
Get config file path
Returns¤
- The path to the config file.
Source code in spotdl/utils/config.py
71 72 73 74 75 76 77 78 79 |
|
get_errors_path()
¤
Get the path to the errors folder.
Returns¤
- The path to the errors folder.
Notes¤
- If the errors directory does not exist, it will be created.
Source code in spotdl/utils/config.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
|
get_spotdl_path()
¤
Get the path to the spotdl folder.
Returns¤
- The path to the spotdl folder.
Notes¤
- If the spotdl directory does not exist, it will be created.
Source code in spotdl/utils/config.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
get_spotify_cache_path()
¤
Get the path to the spotify cache folder.
Returns¤
- The path to the spotipy cache file.
Source code in spotdl/utils/config.py
93 94 95 96 97 98 99 100 101 |
|
get_temp_path()
¤
Get the path to the temp folder.
Returns¤
- The path to the temp folder.
Source code in spotdl/utils/config.py
104 105 106 107 108 109 110 111 112 113 114 115 116 |
|