deezloader icon indicating copy to clipboard operation
deezloader copied to clipboard

Track and album name

Open phantom6309 opened this issue 2 years ago • 3 comments

I could find any documentation how can I get album name and track name within the code

phantom6309 avatar Apr 24 '23 13:04 phantom6309

In the "__easy_spoty__.py" file there is a function called "get_track" which I believe should return the track's info, including name and album.

BufuWinner avatar Apr 25 '23 21:04 BufuWinner

In the "easy_spoty.py" file there is a function called "get_track" which I believe should return the track's info, including name and album.

İs there a way to make it that it won't create album folder for track download just download the file

phantom6309 avatar Apr 25 '23 21:04 phantom6309

There isn't an "official" method, but in my program I created a little workaround to do so:

current_directory = os.getcwd()
files = glob.glob(f'{output_directory}/*')
song_folder = max(files, key=os.path.getmtime)
os.chdir(song_folder)
song_to_move = os.listdir()[0]
os.rename(song_move, f'{output_directory}/{song_move}')
print('\nSong moved!')
os.chdir(current_directory)
os.rmdir(folder)
print('Folder deleted!')

BufuWinner avatar Apr 25 '23 22:04 BufuWinner