Avoid usage of walrus operator which is only compatible with > 3.8
@@ -118,11 +118,14 @@ class Itunes(MetaSource):
item.itunes_playcount = result.get('Play Count')
item.itunes_skipcount = result.get('Skip Count')
- if (result_playdateutc := result.get("Play Date UTC")) :
- item.itunes_lastplayed = mktime(result_playdateutc.timetuple())
+ if result.get('Play Date UTC'):
+ item.itunes_lastplayed = mktime(
+ result.get('Play Date UTC').timetuple())
- if (result_skipdate := result.get("Skip Date")) :
- item.itunes_lastskipped = mktime(result_skipdate.timetuple())
+ if result.get('Skip Date'):
+ item.itunes_lastskipped = mktime(
+ result.get('Skip Date').timetuple())
- if (result_dateadded := result.get("Date Added")) :
- item.itunes_dateadded = mktime(result_dateadded.timetuple())
+ if result.get('Date Added'):
+ item.itunes_dateadded = mktime(
+ result.get('Date Added').timetuple())
