diff --git a/install.sh b/install.sh deleted file mode 100755 index d68bc1f..0000000 --- a/install.sh +++ /dev/null @@ -1,5 +0,0 @@ -cp radioPlayer.py /usr/local/bin/radioPlayer -cp radioPlaylist.py /usr/local/bin/radioPlaylist - -chmod +x /usr/local/bin/radioPlayer -chmod +x /usr/local/bin/radioPlaylist \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ffda544 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,14 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "RadioTools" +version = "0" +description = "RadioTools" +authors = [{ name = "KubaPro010" }] +dependencies = ["log95", "libcache", "unidecode"] + +[project.scripts] +radioPlayer = "radioPlayer:main" +radioPlaylist = "radioPlaylist:main" diff --git a/radioPlayer.py b/radioPlayer.py index fed33c6..826e900 100644 --- a/radioPlayer.py +++ b/radioPlayer.py @@ -277,7 +277,7 @@ def play_playlist(playlist_path, custom_playlist: bool=False, play_newest_first= logger.info("Return reached, next song will reload the playlist.") procman.wait_all() return - if exit_pending: + elif exit_pending: logger.info("Quit received, waiting for song end.") procman.wait_all() exit() @@ -423,5 +423,3 @@ def main(): procman.stop_all() raise finally: procman.stop_all() - -if __name__ == '__main__': main() diff --git a/radioPlaylist.py b/radioPlaylist.py index 5ee0b02..f678c84 100644 --- a/radioPlaylist.py +++ b/radioPlaylist.py @@ -989,8 +989,4 @@ def main(): config = Config(custom_playlist_file=args.playlist) app = Application(config) - return app.run() - - -if __name__ == "__main__": - exit(main()) \ No newline at end of file + exit(app.run()) \ No newline at end of file