Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 34a2339b3b | |||
| 34abbe753b | |||
| 0fe00c3dd8 | |||
| 5a3eb7a8c8 | |||
| e63ca13d57 | |||
| b3d3098fe0 |
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "vrobbler"
|
||||
version = "0.11.10"
|
||||
version = "0.11.12"
|
||||
description = ""
|
||||
authors = ["Colin Powell <colin@unbl.ink>"]
|
||||
|
||||
|
||||
@ -43,38 +43,27 @@ def get_or_create_artist(name: str, mbid: str = None) -> Artist:
|
||||
|
||||
def get_or_create_album(name: str, artist: Artist, mbid: str = None) -> Album:
|
||||
album = None
|
||||
album_created = False
|
||||
albums = Album.objects.filter(name__iexact=name)
|
||||
if albums.count() == 1:
|
||||
album = albums.first()
|
||||
else:
|
||||
for potential_album in albums:
|
||||
if artist in album.artist_set.all():
|
||||
album = potential_album
|
||||
if not album:
|
||||
album_created = True
|
||||
album = Album.objects.create(name=name, musicbrainz_id=mbid)
|
||||
album.save()
|
||||
album.artists.add(artist)
|
||||
album_dict = lookup_album_dict_from_mb(name, artist_name=artist.name)
|
||||
mbid = mbid or album_dict['mb_id']
|
||||
|
||||
if album_created or not mbid:
|
||||
album_dict = lookup_album_dict_from_mb(
|
||||
album.name, artist_name=artist.name
|
||||
)
|
||||
logger.debug(f'Looking up album {name} and mbid: {mbid}')
|
||||
|
||||
album = Album.objects.filter(musicbrainz_id=mbid).first()
|
||||
if not album:
|
||||
album = Album.objects.create(name=name, musicbrainz_id=mbid)
|
||||
album.year = album_dict["year"]
|
||||
album.musicbrainz_id = album_dict["mb_id"]
|
||||
album.musicbrainz_releasegroup_id = album_dict["mb_group_id"]
|
||||
album.musicbrainz_albumartist_id = artist.musicbrainz_id
|
||||
album.save(
|
||||
update_fields=[
|
||||
"year",
|
||||
"musicbrainz_id",
|
||||
"musicbrainz_releasegroup_id",
|
||||
"musicbrainz_albumartist_id",
|
||||
]
|
||||
)
|
||||
album.artists.add(artist)
|
||||
album.fetch_artwork()
|
||||
|
||||
return album
|
||||
|
||||
|
||||
|
||||
@ -90,23 +90,24 @@ class RecentScrobbleList(ListView):
|
||||
user=self.request.user,
|
||||
)
|
||||
|
||||
l = 14
|
||||
artist = {'user': user, 'media_type': 'Artist'}
|
||||
limit = 14
|
||||
artist = {'user': user, 'media_type': 'Artist', 'limit': limit}
|
||||
# This is weird. They don't display properly as QuerySets, so we cast to lists
|
||||
data['current_artist_charts'] = {
|
||||
"today": live_charts(**artist, chart_period="today", limit=l),
|
||||
"week": live_charts(**artist, chart_period="week", limit=l),
|
||||
"month": live_charts(**artist, chart_period="month", limit=l),
|
||||
"year": live_charts(**artist, chart_period="year", limit=l),
|
||||
"all": live_charts(**artist, limit=l),
|
||||
"today": list(live_charts(**artist, chart_period="today")),
|
||||
"week": list(live_charts(**artist, chart_period="week")),
|
||||
"month": list(live_charts(**artist, chart_period="month")),
|
||||
"year": list(live_charts(**artist, chart_period="year")),
|
||||
"all": list(live_charts(**artist)),
|
||||
}
|
||||
|
||||
track = {'user': user, 'media_type': 'Track'}
|
||||
track = {'user': user, 'media_type': 'Track', 'limit': limit}
|
||||
data['current_track_charts'] = {
|
||||
"today": live_charts(**track, chart_period="today", limit=l),
|
||||
"week": live_charts(**track, chart_period="week", limit=l),
|
||||
"month": live_charts(**track, chart_period="month", limit=l),
|
||||
"year": live_charts(**track, chart_period="year", limit=l),
|
||||
"all": live_charts(**track, limit=l),
|
||||
"today": list(live_charts(**track, chart_period="today")),
|
||||
"week": list(live_charts(**track, chart_period="week")),
|
||||
"month": list(live_charts(**track, chart_period="month")),
|
||||
"year": list(live_charts(**track, chart_period="year")),
|
||||
"all": list(live_charts(**track)),
|
||||
}
|
||||
|
||||
data["weekly_data"] = week_of_scrobbles(user=user)
|
||||
@ -475,20 +476,39 @@ class ChartRecordView(TemplateView):
|
||||
context_data["artist_charts"] = {}
|
||||
|
||||
if not date:
|
||||
limit = 20
|
||||
artist_params = {'user': user, 'media_type': 'Artist'}
|
||||
context_data['current_artist_charts'] = {
|
||||
"today": live_charts(**artist_params, chart_period="today"),
|
||||
"week": live_charts(**artist_params, chart_period="week"),
|
||||
"month": live_charts(**artist_params, chart_period="month"),
|
||||
"all": live_charts(**artist_params),
|
||||
"today": live_charts(
|
||||
**artist_params, chart_period="today", limit=limit
|
||||
),
|
||||
"week": live_charts(
|
||||
**artist_params, chart_period="week", limit=limit
|
||||
),
|
||||
"month": live_charts(
|
||||
**artist_params, chart_period="month", limit=limit
|
||||
),
|
||||
"year": live_charts(
|
||||
**artist_params, chart_period="year", limit=limit
|
||||
),
|
||||
"all": live_charts(**artist_params, limit=limit),
|
||||
}
|
||||
|
||||
track_params = {'user': user, 'media_type': 'Track'}
|
||||
context_data['current_track_charts'] = {
|
||||
"today": live_charts(**track_params, chart_period="today"),
|
||||
"week": live_charts(**track_params, chart_period="week"),
|
||||
"month": live_charts(**track_params, chart_period="month"),
|
||||
"all": live_charts(**track_params),
|
||||
"today": live_charts(
|
||||
**track_params, chart_period="today", limit=limit
|
||||
),
|
||||
"week": live_charts(
|
||||
**track_params, chart_period="week", limit=limit
|
||||
),
|
||||
"month": live_charts(
|
||||
**track_params, chart_period="month", limit=limit
|
||||
),
|
||||
"year": live_charts(
|
||||
**track_params, chart_period="year", limit=limit
|
||||
),
|
||||
"all": live_charts(**track_params, limit=limit),
|
||||
}
|
||||
return context_data
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link {% if forloop.first %}active{% endif %}" id="artist-{{chart_name}}-tab" data-bs-toggle="tab" data-bs-target="#artist-{{chart_name}}"
|
||||
type="button" role="tab" aria-controls="home" aria-selected="true">
|
||||
{{chart_name}}
|
||||
{% if chart_name == "all" %}All Time{% else %}{% if chart_name != "today" %}This {% endif %}{{chart_name|capfirst}}{% endif %}
|
||||
</button>
|
||||
</li>
|
||||
{% endfor %}
|
||||
@ -110,7 +110,7 @@
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link {% if forloop.first %}active{% endif %}" id="track-{{chart_name}}-tab" data-bs-toggle="tab" data-bs-target="#track-{{chart_name}}"
|
||||
type="button" role="tab" aria-controls="home" aria-selected="true">
|
||||
{{chart_name}}
|
||||
{% if chart_name == "all" %}All Time{% else %}{% if chart_name != "today" %}This {% endif %}{{chart_name|capfirst}}{% endif %}
|
||||
</button>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
@ -88,7 +88,7 @@
|
||||
<ul class="nav nav-tabs" id="artistTab" role="tablist">
|
||||
{% for chart_name in current_artist_charts.keys %}
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link {% if forloop.first %}active{% endif %}"
|
||||
<button class="nav-link {% if forloop.counter == 2 %}active{% endif %}"
|
||||
id="artist-{{chart_name}}-tab" data-bs-toggle="tab" data-bs-target="#artist-{{chart_name}}"
|
||||
type="button" role="tab" aria-controls="home" aria-selected="true">
|
||||
{% if chart_name == "all" %}All Time{% else %}{% if chart_name != "today" %}This {% endif %}{{chart_name|capfirst}}{% endif %}
|
||||
@ -99,7 +99,7 @@
|
||||
|
||||
<div class="tab-content" id="artistTabContent" class="maloja-chart">
|
||||
{% for chart_name, artists in current_artist_charts.items %}
|
||||
<div class="tab-pane fade {% if forloop.first %}show active{% endif %}" id="artist-{{chart_name}}" role="tabpanel" aria-labelledby="artist-{{chart_name}}-tab">
|
||||
<div class="tab-pane fade {% if forloop.counter == 2 %}show active{% endif %}" id="artist-{{chart_name}}" role="tabpanel" aria-labelledby="artist-{{chart_name}}-tab">
|
||||
<div style="display:block">
|
||||
<div style="float:left;">
|
||||
<div class="image-wrapper" style="display:flex; flex-wrap: wrap; margin:0">
|
||||
@ -118,31 +118,31 @@
|
||||
{% if artists.1.thumbnail %}
|
||||
<a href="{{artists.1.get_absolute_url}}"><img lt="{{artists.1.name}}" src="{{artists.1.thumbnail.url}}" width="150px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.1.get_absolute_url}}"><img lt="{{artists.1.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="150px"></a>
|
||||
<a href="{{artists.1.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="150px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:50%">
|
||||
<div class="caption-medium">#3 {{artists.2.name}}</div>
|
||||
{% if artists.2.thumbnail %}
|
||||
<a href="{{artists.2.get_absolute_url}}"><img lt="{{artists.2.name}}" src="{{artists.2.thumbnail.url}}" width="150px"></a>
|
||||
<a href="{{artists.2.get_absolute_url}}"><img src="{{artists.2.thumbnail.url}}" width="150px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.2.get_absolute_url}}"><img lt="{{artists.2.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="150px"></a>
|
||||
<a href="{{artists.2.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="150px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:50%">
|
||||
<div class="caption-medium">#4 {{artists.3.name}}</div>
|
||||
{% if artists.3.thumbnail %}
|
||||
<a href="{{artists.3.get_absolute_url}}"><img lt="{{artists.3.name}}" src="{{artists.3.thumbnail.url}}" width="150px"></a>
|
||||
<a href="{{artists.3.get_absolute_url}}"><img src="{{artists.3.thumbnail.url}}" width="150px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.3.get_absolute_url}}"><img lt="{{artists.3.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="150px"></a>
|
||||
<a href="{{artists.3.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="150px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:50%">
|
||||
<div class="caption-medium">#5 {{artists.4.name}}</div>
|
||||
{% if artists.4.thumbnail %}
|
||||
<a href="{{artists.4.get_absolute_url}}"><img lt="{{artists.4.name}}" src="{{artists.4.thumbnail.url}}" width="150px"></a>
|
||||
<a href="{{artists.4.get_absolute_url}}"><img src="{{artists.4.thumbnail.url}}" width="150px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.4.get_absolute_url}}"><img lt="{{artists.4.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="150px"></a>
|
||||
<a href="{{artists.4.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="150px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -152,73 +152,73 @@
|
||||
<div class="image-wrapper" class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#6 {{artists.5.name}}</div>
|
||||
{% if artists.5.thumbnail %}
|
||||
<a href="{{artists.5.get_absolute_url}}"><img lt="{{artists.5.name}}" src="{{artists.5.thumbnail.url}}" width="100px"></a>
|
||||
<a href="{{artists.5.get_absolute_url}}"><img src="{{artists.5.thumbnail.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.5.get_absolute_url}}"><img lt="{{artists.5.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
<a href="{{artists.5.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#7 {{artists.6.name}}</div>
|
||||
{% if artists.6.thumbnail %}
|
||||
<a href="{{artists.6.get_absolute_url}}"><img lt="{{artists.6.name}}" src="{{artists.6.thumbnail.url}}" width="100px"></a>
|
||||
<a href="{{artists.6.get_absolute_url}}"><img src="{{artists.6.thumbnail.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.6.get_absolute_url}}"><img lt="{{artists.6.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
<a href="{{artists.6.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#8 {{artists.7.name}}</div>
|
||||
{% if artists.7.thumbnail %}
|
||||
<a href="{{artists.7.get_absolute_url}}"><img lt="{{artists.7.name}}" src="{{artists.7.thumbnail.url}}" width="100px"></a>
|
||||
<a href="{{artists.7.get_absolute_url}}"><img src="{{artists.7.thumbnail.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.7.get_absolute_url}}"><img lt="{{artists.7.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
<a href="{{artists.7.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#9 {{artists.8.name}}</div>
|
||||
{% if artists.8.thumbnail %}
|
||||
<a href="{{artists.8.get_absolute_url}}"><img lt="{{artists.8.name}}" src="{{artists.8.thumbnail.url}}" width="100px"></a>
|
||||
<a href="{{artists.8.get_absolute_url}}"><img src="{{artists.8.thumbnail.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.8.get_absolute_url}}"><img lt="{{artists.8.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
<a href="{{artists.8.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#10 {{artists.9.name}}</div>
|
||||
{% if artists.9.thumbnail %}
|
||||
<a href="{{artists.9.get_absolute_url}}"><img lt="{{artists.9.name}}" src="{{artists.9.thumbnail.url}}" width="100px"></a>
|
||||
<a href="{{artists.9.get_absolute_url}}"><img src="{{artists.9.thumbnail.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.9.get_absolute_url}}"><img lt="{{artists.9.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
<a href="{{artists.9.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#11 {{artists.10.name}}</div>
|
||||
{% if artists.10.thumbnail %}
|
||||
<a href="{{artists.10.get_absolute_url}}"><img lt="{{artists.10.name}}" src="{{artists.10.thumbnail.url}}" width="100px"></a>
|
||||
<a href="{{artists.10.get_absolute_url}}"><img src="{{artists.10.thumbnail.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.10.get_absolute_url}}"><img lt="{{artists.10.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
<a href="{{artists.10.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#12 {{artists.11.name}}</div>
|
||||
{% if artists.11.thumbnail %}
|
||||
<a href="{{artists.11.get_absolute_url}}"><img lt="{{artists.11.name}}" src="{{artists.11.thumbnail.url}}" width="100px"></a>
|
||||
<a href="{{artists.11.get_absolute_url}}"><img src="{{artists.11.thumbnail.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.11.get_absolute_url}}"><img lt="{{artists.11.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
<a href="{{artists.11.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#13 {{artists.12.name}}</div>
|
||||
{% if artists.12thumbnail %}
|
||||
<a href="{{artists.12.get_absolute_url}}"><img lt="{{artists.13.name}}" src="{{artists.12.thumbnail.url}}" width="100px"></a>
|
||||
{% if artists.12.thumbnail %}
|
||||
<a href="{{artists.12.get_absolute_url}}"><img src="{{artists.12.thumbnail.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.12.get_absolute_url}}"><img lt="{{artists.12.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
<a href="{{artists.12.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#14 {{artists.13.name}}</div>
|
||||
{% if artists.13.thumbnail %}
|
||||
<a href="{{artists.13.get_absolute_url}}"><img lt="{{artists.13.name}}" src="{{artists.13.thumbnail.url}}" width="100px"></a>
|
||||
<a href="{{artists.13.get_absolute_url}}"><img src="{{artists.13.thumbnail.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{artists.13.get_absolute_url}}"><img lt="{{artists.13.name}}" src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
<a href="{{artists.13.get_absolute_url}}"><img src="{% static "images/artist-placeholder.jpg" %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -234,7 +234,7 @@
|
||||
<ul class="nav nav-tabs" id="trackTab" role="tablist">
|
||||
{% for chart_name in current_track_charts.keys %}
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link {% if forloop.first %}active{% endif %}" id="track-{{chart_name}}-tab" data-bs-toggle="tab"
|
||||
<button class="nav-link {% if forloop.counter == 2 %}active{% endif %}" id="track-{{chart_name}}-tab" data-bs-toggle="tab"
|
||||
data-bs-target="#track-{{chart_name}}" type="button" role="tab" aria-controls="home" aria-selected="true">
|
||||
{% if chart_name == "all" %}All Time{% else %}{% if chart_name != "today" %}This {% endif %}{{chart_name|capfirst}}{% endif %}
|
||||
</button>
|
||||
@ -244,15 +244,15 @@
|
||||
|
||||
<div class="tab-content" id="trackTabContent" class="maloja-chart">
|
||||
{% for chart_name, tracks in current_track_charts.items %}
|
||||
<div class="tab-pane fade {% if forloop.first %}show active{% endif %}" id="track-{{chart_name}}" role="tabpanel" aria-labelledby="track-{{chart_name}}-tab">
|
||||
<div class="tab-pane fade {% if forloop.counter == 2 %}show active{% endif %}" id="track-{{chart_name}}" role="tabpanel" aria-labelledby="track-{{chart_name}}-tab">
|
||||
<div style="display:block">
|
||||
<div style="float:left;">
|
||||
<div class="image-wrapper" style="display:flex; flex-wrap: wrap; margin:0">
|
||||
<div class="caption">#1 {{tracks.0.title}}</div>
|
||||
{% if tracks.0.album.cover_image %}
|
||||
<a href="{{tracks.0.get_absolute_url}}"><img lt="{{tracks.0.title}}" src="{{tracks.0.album.cover_image.url}}" width="300px"></a>
|
||||
<a href="{{tracks.0.get_absolute_url}}"><img src="{{tracks.0.album.cover_image.url}}" width="300px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.0.get_absolute_url}}"><img lt="{{tracks.0.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="300px"></a>
|
||||
<a href="{{tracks.0.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="300px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -261,33 +261,33 @@
|
||||
<div class="image-wrapper" style="width:50%">
|
||||
<div class="caption-medium">#2 {{tracks.1.title}}</div>
|
||||
{% if tracks.1.album.cover_image %}
|
||||
<a href="{{tracks.1.get_absolute_url}}"><img lt="{{tracks.1.title}}" src="{{tracks.1.album.cover_image.url}}" width="150px"></a>
|
||||
<a href="{{tracks.1.get_absolute_url}}"><img src="{{tracks.1.album.cover_image.url}}" width="150px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.1.get_absolute_url}}"><img lt="{{tracks.1.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="150px"></a>
|
||||
<a href="{{tracks.1.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="150px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" style="width:50%">
|
||||
<div class="caption-medium">#3 {{tracks.2.title}}</div>
|
||||
{% if tracks.2.album.cover_image %}
|
||||
<a href="{{tracks.2.get_absolute_url}}"><img lt="{{tracks.2.title}}" src="{{tracks.2.album.cover_image.url}}" width="150px"></a>
|
||||
<a href="{{tracks.2.get_absolute_url}}"><img src="{{tracks.2.album.cover_image.url}}" width="150px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.2.get_absolute_url}}"><img lt="{{tracks.2.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="150px"></a>
|
||||
<a href="{{tracks.2.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="150px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" style="width:50%">
|
||||
<div class="caption-medium">#4 {{tracks.3.title}}</div>
|
||||
{% if tracks.3.album.cover_image %}
|
||||
<a href="{{tracks.3.get_absolute_url}}"><img lt="{{tracks.3.title}}" src="{{tracks.3.album.cover_image.url}}" width="150px"></a>
|
||||
<a href="{{tracks.3.get_absolute_url}}"><img src="{{tracks.3.album.cover_image.url}}" width="150px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.3.get_absolute_url}}"><img lt="{{tracks.3.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="150px"></a>
|
||||
<a href="{{tracks.3.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="150px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" style="width:50%">
|
||||
<div class="caption-medium">#5 {{tracks.4.title}}</div>
|
||||
{% if tracks.4.album.cover_image %}
|
||||
<a href="{{tracks.4.get_absolute_url}}"><img lt="{{tracks.4.title}}" src="{{tracks.4.album.cover_image.url}}" width="150px"></a>
|
||||
<a href="{{tracks.4.get_absolute_url}}"><img src="{{tracks.4.album.cover_image.url}}" width="150px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.4.get_absolute_url}}"><img lt="{{tracks.4.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="150px"></a>
|
||||
<a href="{{tracks.4.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="150px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -297,73 +297,73 @@
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#6 {{tracks.5.title}}</div>
|
||||
{% if tracks.5.album.cover_image %}
|
||||
<a href="{{tracks.5.get_absolute_url}}"><img lt="{{tracks.5.title}}" src="{{tracks.5.album.cover_image.url}}" width="100px"></a>
|
||||
<a href="{{tracks.5.get_absolute_url}}"><img src="{{tracks.5.album.cover_image.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.5.get_absolute_url}}"><img lt="{{tracks.5.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
<a href="{{tracks.5.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#7 {{tracks.6.title}}</div>
|
||||
{% if tracks.6.album.cover_image %}
|
||||
<a href="{{tracks.6.get_absolute_url}}"><img lt="{{tracks.6.title}}" src="{{tracks.6.album.cover_image.url}}" width="100px"></a>
|
||||
<a href="{{tracks.6.get_absolute_url}}"><img src="{{tracks.6.album.cover_image.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.6.get_absolute_url}}"><img lt="{{tracks.6.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
<a href="{{tracks.6.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#8 {{tracks.7.title}}</div>
|
||||
{% if tracks.7.album.cover_image %}
|
||||
<a href="{{track.7.get_absolute_url}}"><img lt="{{tracks.7.title}}" src="{{tracks.7.album.cover_image.url}}" width="100px"></a>
|
||||
<a href="{{tracks.7.get_absolute_url}}"><img src="{{tracks.7.album.cover_image.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.7.get_absolute_url}}"><img lt="{{tracks.7.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
<a href="{{tracks.7.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#9 {{tracks.8.title}}</div>
|
||||
{% if tracks.8.album.cover_image %}
|
||||
<a href="{{track.8.get_absolute_url}}"><img lt="{{tracks.8.title}}" src="{{tracks.8.album.cover_image.url}}" width="100px"></a>
|
||||
<a href="{{tracks.8.get_absolute_url}}"><img src="{{tracks.8.album.cover_image.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.8.get_absolute_url}}"><img lt="{{tracks.8.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
<a href="{{tracks.8.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#10 {{tracks.9.title}}</div>
|
||||
{% if tracks.9.album.cover_image %}
|
||||
<a href="{{track.9.get_absolute_url}}"><img lt="{{tracks.9.title}}" src="{{tracks.9.album.cover_image.url}}" width="100px"></a>
|
||||
<a href="{{tracks.9.get_absolute_url}}"><img src="{{tracks.9.album.cover_image.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.9.get_absolute_url}}"><img lt="{{tracks.9.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
<a href="{{tracks.9.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#11 {{tracks.10.title}}</div>
|
||||
{% if tracks.10.album.cover_image %}
|
||||
<a href="{{tracks.10.get_absolute_url}}"><img lt="{{tracks.10.title}}" src="{{tracks.10.album.cover_image.url}}" width="100px"></a>
|
||||
<a href="{{tracks.10.get_absolute_url}}"><img src="{{tracks.10.album.cover_image.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.10.get_absolute_url}}"><img lt="{{tracks.10.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
<a href="{{tracks.10.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#12 {{tracks.11.title}}</div>
|
||||
{% if tracks.11.album.cover_image %}
|
||||
<a href="{{track.11.get_absolute_url}}"><img lt="{{tracks.11.title}}" src="{{tracks.11.album.cover_image.url}}" width="100px"></a>
|
||||
<a href="{{tracks.11.get_absolute_url}}"><img src="{{tracks.11.album.cover_image.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.11.get_absolute_url}}"><img lt="{{tracks.11.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
<a href="{{tracks.11.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#13 {{tracks.12.title}}</div>
|
||||
{% if tracks.12.album.cover_image %}
|
||||
<a href="{{track.12.get_absolute_url}}"><img lt="{{tracks.12.title}}" src="{{tracks.12.album.cover_image.url}}" width="100px"></a>
|
||||
<a href="{{tracks.12.get_absolute_url}}"><img src="{{tracks.12.album.cover_image.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.12.get_absolute_url}}"><img lt="{{tracks.12.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
<a href="{{tracks.12.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="image-wrapper" class="image-wrapper" style="width:33;">
|
||||
<div class="caption-small">#14 {{tracks.13.title}}</div>
|
||||
{% if tracks.13.album.cover_image %}
|
||||
<a href="{{track.13.get_absolute_url}}"><img lt="{{tracks.13.title}}" src="{{tracks.13.album.cover_image.url}}" width="100px"></a>
|
||||
<a href="{{tracks.13.get_absolute_url}}"><img src="{{tracks.13.album.cover_image.url}}" width="100px"></a>
|
||||
{% else %}
|
||||
<a href="{{tracks.13.get_absolute_url}}"><img lt="{{tracks.13.title}}" src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
<a href="{{tracks.13.get_absolute_url}}"><img src="{% static 'images/track-placeholder.jpg' %}" width="100px"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user