From b08f3b5b0b6b2d0f3d87686fb9a1e6a848c92684 Mon Sep 17 00:00:00 2001 From: sigma67 Date: Thu, 24 Mar 2022 09:52:11 +0100 Subject: [PATCH] --all: change display_name to id (closes #26) --- SpotifyExport.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SpotifyExport.py b/SpotifyExport.py index 5ac81e3..6383660 100644 --- a/SpotifyExport.py +++ b/SpotifyExport.py @@ -40,7 +40,7 @@ def getUserPlaylists(self, user): more = len(results) == 50 count = count + 1 - return [p for p in pl if p['owner']['display_name'] == user and p['tracks']['total'] > 0] + return [p for p in pl if p['owner']['id'] == user and p['tracks']['total'] > 0] def get_tracks(self, url): tracks = [] @@ -74,4 +74,4 @@ def build_results(tracks, album=None): def get_id_from_url(url): url_parts = url.split('/') - return url_parts[4].split('?')[0] \ No newline at end of file + return url_parts[4].split('?')[0]