Fix names in config file
This commit is contained in:
parent
793b414426
commit
14096a796c
3 changed files with 15 additions and 12 deletions
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
@ -4,5 +4,8 @@
|
||||||
"[python]": {
|
"[python]": {
|
||||||
"editor.tabSize": 4,
|
"editor.tabSize": 4,
|
||||||
"editor.rulers": [88]
|
"editor.rulers": [88]
|
||||||
}
|
},
|
||||||
|
"python.formatting.provider": "black",
|
||||||
|
"python.linting.flake8Enabled": true,
|
||||||
|
"python.linting.enabled": true,
|
||||||
}
|
}
|
||||||
|
|
14
README.md
14
README.md
|
@ -10,14 +10,14 @@ Podweasels main configuration file is called `.podweasel.json` and should be loc
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"podcast-directory" : "/home/<USER>/podcasts",
|
"podcast_directory" : "/home/<USER>/podcasts",
|
||||||
"maxnum" : 5,
|
"maxnum" : 5,
|
||||||
"cover-image" : true,
|
"cover_image" : true,
|
||||||
"cover-image-name" : "folder",
|
"cover_image_name" : "folder",
|
||||||
"rename-episodes" : true,
|
"rename_episodes" : true,
|
||||||
"date-format" : "%Y-%m-%d",
|
"date_format" : "%Y-%m-%d",
|
||||||
"connection-timeout" : 10,
|
"connection_timeout" : 10,
|
||||||
"conncetion-retries" : 3
|
"conncetion_retries" : 3
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ def print_green(s):
|
||||||
|
|
||||||
|
|
||||||
def get_folder(shortname):
|
def get_folder(shortname):
|
||||||
base = CONFIGURATION["podcast-directory"]
|
base = CONFIGURATION["podcast_directory"]
|
||||||
return os.path.join(base, shortname)
|
return os.path.join(base, shortname)
|
||||||
|
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ def get_original_filename(url):
|
||||||
|
|
||||||
|
|
||||||
def file_exists(shortname, filename):
|
def file_exists(shortname, filename):
|
||||||
base = CONFIGURATION["podcast-directory"]
|
base = CONFIGURATION["podcast_directory"]
|
||||||
if os.path.exists(os.path.join(base, shortname, filename)):
|
if os.path.exists(os.path.join(base, shortname, filename)):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -350,7 +350,7 @@ def download_multiple(feed, maxnum):
|
||||||
|
|
||||||
def download_single(folder, url, filename):
|
def download_single(folder, url, filename):
|
||||||
print(url)
|
print(url)
|
||||||
base = CONFIGURATION["podcast-directory"]
|
base = CONFIGURATION["podcast_directory"]
|
||||||
|
|
||||||
if "connection_timeout" in CONFIGURATION:
|
if "connection_timeout" in CONFIGURATION:
|
||||||
connection_timeout = CONFIGURATION["connection_timeout"]
|
connection_timeout = CONFIGURATION["connection_timeout"]
|
||||||
|
@ -415,7 +415,7 @@ def available_feeds():
|
||||||
contain a json configuration file describing which elements
|
contain a json configuration file describing which elements
|
||||||
have been downloaded already, and how many will be kept.
|
have been downloaded already, and how many will be kept.
|
||||||
"""
|
"""
|
||||||
base = CONFIGURATION["podcast-directory"]
|
base = CONFIGURATION["podcast_directory"]
|
||||||
paths = [
|
paths = [
|
||||||
p
|
p
|
||||||
for p in os.listdir(base)
|
for p in os.listdir(base)
|
||||||
|
|
Loading…
Add table
Reference in a new issue