From 69f59bb0f6f5c24c3ad69a04a1a64844cc94a4f2 Mon Sep 17 00:00:00 2001 From: Jared Rossberg Date: Sun, 24 Oct 2021 11:15:41 -0600 Subject: [PATCH] Create main module --- README.md | 6 +++--- src/__main__.py | 4 ++++ src/app.py | 3 --- 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 src/__main__.py diff --git a/README.md b/README.md index 91c6349e..8a78b481 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,9 @@ Python packages: \*\*Git can be installed via apt for Debian-based distros or by downloading the binaries from [git-scm.com](https://git-scm.com/download/win) for Windows. ``` Command line usage: - python src/app.py Loads search prompt to find then download a specific track, album or playlist - python src/app.py Downloads the track, album, playlist or podcast episode specified as a command line argument - python src/app.py Downloads all albums by specified artist + python src Loads search prompt to find then download a specific track, album or playlist + python src Downloads the track, album, playlist or podcast episode specified as a command line argument + python src Downloads all albums by specified artist Extra command line options: -p, --playlist Downloads a saved playlist from your account diff --git a/src/__main__.py b/src/__main__.py new file mode 100644 index 00000000..50dd3890 --- /dev/null +++ b/src/__main__.py @@ -0,0 +1,4 @@ +from app import client + +if __name__ == '__main__': + client() diff --git a/src/app.py b/src/app.py index abd8b876..2a0898a4 100644 --- a/src/app.py +++ b/src/app.py @@ -167,6 +167,3 @@ def search(search_term): else: download_playlist(playlists, position - total_tracks - total_albums - total_artists) - -if __name__ == '__main__': - client()