From f2aa111bb4f72ffce3f8a8873845d7d45a641c44 Mon Sep 17 00:00:00 2001 From: "R. M" <50295204+glomatico@users.noreply.github.com> Date: Sun, 11 Dec 2022 01:24:31 -0300 Subject: [PATCH] fixes --- gamdl.py | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/gamdl.py b/gamdl.py index 4f374d3..0c7a009 100644 --- a/gamdl.py +++ b/gamdl.py @@ -390,23 +390,33 @@ if __name__ == '__main__': if not shutil.which('MP4Box'): print('MP4Box is not on PATH.') exit(1) - parser = ArgumentParser(description = 'A Python script to download Apple Music albums/music videos/playlists/songs.') + parser = ArgumentParser(description = 'A Python script to download Apple Music songs/music videos/albums/playlists.') parser.add_argument( 'url', - help='Apple Music albums/music videos/playlists/songs URL', - nargs='*' + help='Apple Music song/music video/album/playlist URL(s)', + nargs='*', + metavar = '' ) parser.add_argument( '-d', '--final-path', default = 'Apple Music', - help = 'Set Final Path.', + help = 'Final Path.', + metavar = '' + ) + parser.add_argument( + '-t', + '--temp-path', + default = 'temp', + help = 'Temp Path.', + metavar = '' ) parser.add_argument( '-a', '--auth-path', default = 'login', - help = 'Set Auth Path.' + help = 'Auth Path.', + metavar = '' ) parser.add_argument( '-m', @@ -426,12 +436,6 @@ if __name__ == '__main__': action = 'store_true', help = "Don't create .lrc file." ) - parser.add_argument( - '-t', - '--temp-path', - default = 'temp', - help = 'Set Temp Path.' - ) parser.add_argument( '-s', '--skip-cleanup', @@ -440,7 +444,7 @@ if __name__ == '__main__': ) parser.add_argument( '-e', - '--print-exception', + '--print-exceptions', action = 'store_true', help = 'Print Execeptions.' ) @@ -448,13 +452,14 @@ if __name__ == '__main__': '-v', '--print-video-playlist', action = 'store_true', - help = 'Print Video Playlist.' + help = 'Print Video M3U8 Playlist.' ) parser.add_argument( '-u', '--urls-txt', help = 'Read URLs from a text file.', - nargs = '?' + nargs = '?', + metavar = '' ) args = parser.parse_args() if not args.url and not args.urls_txt: @@ -522,7 +527,7 @@ if __name__ == '__main__': except: error_count += 1 print(f'* Failed to download "{download_queue[i][j]["title"]}" (track {j + 1} from URL {i + 1}).') - if args.print_exception: + if args.print_exceptions: traceback.print_exc() if not args.skip_cleanup: shutil.rmtree(gamdl.temp_path)