[format] Blacken everything
This commit is contained in:
@ -161,13 +161,13 @@ class RecentScrobbleList(ListView):
|
||||
next_date = date + timedelta(weeks=+2)
|
||||
prev_date = date + timedelta(weeks=-1)
|
||||
if date.isocalendar()[1] < today.isocalendar()[1]:
|
||||
data["next_link"] = (
|
||||
f"?date={next_date.strftime('%Y-W%W')}"
|
||||
)
|
||||
data[
|
||||
"next_link"
|
||||
] = f"?date={next_date.strftime('%Y-W%W')}"
|
||||
data["prev_link"] = f"?date={prev_date.strftime('%Y-W%W')}"
|
||||
data["title"] = (
|
||||
f"Week {date.strftime('%-W')} of {date.year}"
|
||||
)
|
||||
data[
|
||||
"title"
|
||||
] = f"Week {date.strftime('%-W')} of {date.year}"
|
||||
data = data | Scrobble.as_dict_by_type(
|
||||
Scrobble.for_week(
|
||||
user_id, date.year, date.isocalendar()[1]
|
||||
@ -177,9 +177,9 @@ class RecentScrobbleList(ListView):
|
||||
next_date = date + relativedelta(months=1)
|
||||
prev_date = date + relativedelta(months=-1)
|
||||
if date.month < today.month:
|
||||
data["next_link"] = (
|
||||
f"?date={next_date.strftime('%Y-%m')}"
|
||||
)
|
||||
data[
|
||||
"next_link"
|
||||
] = f"?date={next_date.strftime('%Y-%m')}"
|
||||
data["title"] = f"{date.strftime('%B %Y')}"
|
||||
data["prev_link"] = f"?date={prev_date.strftime('%Y-%m')}"
|
||||
data = data | Scrobble.as_dict_by_type(
|
||||
@ -188,20 +188,20 @@ class RecentScrobbleList(ListView):
|
||||
elif date_str == "today" or date_str.count("-") == 2:
|
||||
next_date = date + timedelta(days=1)
|
||||
prev_date = date - timedelta(days=1)
|
||||
data["prev_link"] = (
|
||||
f"?date={prev_date.strftime('%Y-%m-%d')}"
|
||||
)
|
||||
data[
|
||||
"prev_link"
|
||||
] = f"?date={prev_date.strftime('%Y-%m-%d')}"
|
||||
if date < today:
|
||||
data["next_link"] = (
|
||||
f"?date={next_date.strftime('%Y-%m-%d')}"
|
||||
)
|
||||
data[
|
||||
"next_link"
|
||||
] = f"?date={next_date.strftime('%Y-%m-%d')}"
|
||||
if date == today:
|
||||
data["title"] = "Today"
|
||||
else:
|
||||
data["title"] = f"{date.strftime('%Y-%m-%d')}"
|
||||
data["today_link"] = (
|
||||
f"?date={today.strftime('%Y-%m-%d')}"
|
||||
)
|
||||
data[
|
||||
"today_link"
|
||||
] = f"?date={today.strftime('%Y-%m-%d')}"
|
||||
data = data | Scrobble.as_dict_by_type(
|
||||
Scrobble.for_day(
|
||||
user_id, date.year, date.month, date.day
|
||||
@ -228,9 +228,9 @@ class RecentScrobbleList(ListView):
|
||||
data = data | Scrobble.as_dict_by_type(
|
||||
Scrobble.for_day(user_id, date.year, date.month, date.day)
|
||||
)
|
||||
data["today_link"] = (
|
||||
"" # f"?date={today.strftime('%Y-%m-%d')}"
|
||||
)
|
||||
data[
|
||||
"today_link"
|
||||
] = "" # f"?date={today.strftime('%Y-%m-%d')}"
|
||||
|
||||
data["active_imports"] = AudioScrobblerTSVImport.objects.filter(
|
||||
processing_started__isnull=False,
|
||||
|
||||
Reference in New Issue
Block a user