mirror of
https://github.com/oskvr37/tiddl.git
synced 2026-06-13 12:15:13 +03:00
✨ include artist EPs and singles option
This commit is contained in:
+8
-2
@@ -75,6 +75,7 @@ def main():
|
||||
else config["settings"]["track_quality"]
|
||||
)
|
||||
file_template = args.file_template or config["settings"]["file_template"]
|
||||
include_singles = args.include_singles
|
||||
|
||||
if args.save_options:
|
||||
logger.info("saving new settings...")
|
||||
@@ -239,10 +240,15 @@ def main():
|
||||
continue
|
||||
|
||||
case "artist":
|
||||
# TODO: include artist EPs and singles option ✨
|
||||
all_albums = []
|
||||
artist_albums = api.getArtistAlbums(input_id)
|
||||
all_albums.extend(artist_albums["items"])
|
||||
|
||||
for album in artist_albums["items"]:
|
||||
if include_singles:
|
||||
artist_singles = api.getArtistAlbums(input_id, onlyNonAlbum=True)
|
||||
all_albums.extend(artist_singles["items"])
|
||||
|
||||
for album in all_albums:
|
||||
downloadAlbum(album["id"], skip_existing)
|
||||
|
||||
continue
|
||||
|
||||
+8
-1
@@ -19,7 +19,7 @@ parser = argparse.ArgumentParser(
|
||||
parser.add_argument(
|
||||
"input",
|
||||
type=str,
|
||||
nargs='*',
|
||||
nargs="*",
|
||||
help="track, album, playlist or artist - must be url, single id will be treated as track",
|
||||
)
|
||||
|
||||
@@ -53,6 +53,13 @@ parser.add_argument(
|
||||
choices=QUALITY_ARGS.keys(),
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-is",
|
||||
help="include artist EPs and singles when downloading artist",
|
||||
dest="include_singles",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-s",
|
||||
help="save options to config // show config file",
|
||||
|
||||
Reference in New Issue
Block a user