From 4e0c81071b6175f2515fc4175abc5e42b0e86560 Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 12 May 2024 10:20:49 -0500 Subject: [PATCH] move to src --- auth.py => src/spotify_to_tidal/auth.py | 9 +++++++-- sync.py => src/spotify_to_tidal/sync.py | 0 2 files changed, 7 insertions(+), 2 deletions(-) rename auth.py => src/spotify_to_tidal/auth.py (91%) rename sync.py => src/spotify_to_tidal/sync.py (100%) diff --git a/auth.py b/src/spotify_to_tidal/auth.py similarity index 91% rename from auth.py rename to src/spotify_to_tidal/auth.py index bda3eb1..2bc2bba 100644 --- a/auth.py +++ b/src/spotify_to_tidal/auth.py @@ -6,7 +6,12 @@ import tidalapi import webbrowser import yaml -def open_spotify_session(config): +__all__ = [ + 'open_spotify_session', + 'open_tidal_session' +] + +def open_spotify_session(config) -> spotipy.Spotify: credentials_manager = spotipy.SpotifyOAuth(username=config['username'], scope='playlist-read-private', client_id=config['client_id'], @@ -19,7 +24,7 @@ def open_spotify_session(config): return spotipy.Spotify(oauth_manager=credentials_manager) -def open_tidal_session(config = None): +def open_tidal_session(config = None) -> tidalapi.Session: try: with open('.session.yml', 'r') as session_file: previous_session = yaml.safe_load(session_file) diff --git a/sync.py b/src/spotify_to_tidal/sync.py similarity index 100% rename from sync.py rename to src/spotify_to_tidal/sync.py