Adjust default structure again

This commit is contained in:
Joshua Boniface
2023-04-06 19:47:11 -04:00
parent a766f2a61f
commit f1d6263fed
2 changed files with 19 additions and 15 deletions

View File

@ -79,17 +79,15 @@ from the album Vapor Trails (the remixed version) authored by ejthedj:
```
c3dbdl download --filter artist Rush --filter album "Vapor Trails [Remixed]" --author ejthedj
```
This shouldfind , as of 2023-04-02, exactly one song, "Sweet Miracle":
```
Found 28942 songs from JSON database file 'Downloads/c3db.json'
Found 19563 songs from JSON database file 'Downloads/c3db.json'
Downloading 1 song files...
Downloading song "Rush - Sweet Miracle" by ejthedj...
Downloading from https://dl.c3universe.com/s/ejthedj/sweetMiracle...
> Downloading song "Rush - Sweet Miracle" by ejthedj...
Downloading file "Rock Band 3 Xbox 360" from https://dl.c3universe.com/s/ejthedj/sweetMiracle...
Successfully downloaded to ../Prog/ejthedj/Rush/Vapor Trails [Remixed]/Sweet Miracle [2002].sweetMiracle
```
In this case, one song matched and was downloaded.
In addition to the above filters, within each song may be more than one download link. To filter these links,
use the "-i"/"--download-id" and "-d"/"--download-descr" (see the help for details).
@ -112,20 +110,26 @@ which are mapped at download file. The available fields are:
* `title`: The title of the song.
* `year`: The year of the album/song.
* `author`: The author of the file on C3DB.
* `orig_file`: The original filename that would be downloaded by e.g. a browser.
* `orig_name`: The original filename that would be downloaded by e.g. a browser.
The default structure leverages all of these options to create an archive-ready structure as follows:
The default structure leverages most of these options to create an archive-ready structure as follows:
```
{genre}/{author}/{artist}/{album}/{title} [{year}].{orig_file}
{artist}/{album}/{title}.{author}.{orig_name}
```
As an example:
As an example, as shown in the previous section:
```
Prog/Rush/Vapor Trails [Remixed]/Sweet Miracle [2002] (ejthedj).sweetMiracle
Rush/Vapor Trails [Remixed]/Sweet Miracle.ejthedj.sweetMiracle
```
The genre is excluded because in my experience it is a fairly useless metric and is often incorrectly set,
so it gets in the way more often than not. You are free of course to add it in to your own custom structure.
The date is excluded for similar reasons and because if you know the album, you know the date.
If any field is missing during download, it is replaced with "None".
Note that any parent director(ies) will be automatically created down the whole tree until the final filename.
## Help

View File

@ -436,7 +436,7 @@ def database():
"--file-structure",
"_file_structure",
envvar="C3DBDL_DL_FILE_STRUCTURE",
default="{genre}/{author}/{artist}/{album}/{title} [{year}].{orig_name}",
default="{artist}/{album}/{title}.{author}.{orig_name}",
help="Specify the output file/directory stucture.",
)
@click.option(
@ -490,7 +490,7 @@ def download(_filters, _id, _desc, _limit, _file_structure):
\b
The default output file structure is:
"{genre}/{author}/{artist}/{album}/{title} [{year}].{orig_name}"
"{artist}/{album}/{title}.{author}.{orig_name}"
Filters allow granular selection of the song(s) to download. Multiple filters can be
specified, and a song is selected only if ALL filters match (logical AND). Each filter