Commit 95dad62d authored by David Trattnig's avatar David Trattnig
Browse files

Small performance improvement.

parent c9cd1e49
......@@ -278,15 +278,15 @@ class CalendarFetcher:
servicetype = "api_tank_playlist"
playlist = None
if not playlist_id:
return None
# If playlist is already fetched, use the existing one
for playlist in fetched_playlists:
if playlist["id"] == playlist_id:
self.logger.debug("Playlist #%s already fetched" % playlist_id)
return playlist
if not playlist_id:
return None
url = self.__build_url__(servicetype, "${ID}", playlist_id)
json_response = self.__fetch_data__(servicetype, url)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment