Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9ba6fec14 | |||
| 5f55163147 | |||
| a6ef34623e | |||
| 7cb48d20f6 | |||
| 445103a878 | |||
| 579da8c44e | |||
| daabd2f37f | |||
| 039c58cf89 | |||
| 410c033f12 |
@ -95,6 +95,15 @@ jobs:
|
|||||||
poetry build
|
poetry build
|
||||||
git checkout vrobbler/_commit.py
|
git checkout vrobbler/_commit.py
|
||||||
|
|
||||||
|
- name: Clean old wheels from server
|
||||||
|
uses: appleboy/ssh-action@v1.0.3
|
||||||
|
with:
|
||||||
|
host: vrobbler.service
|
||||||
|
username: root
|
||||||
|
key: ${{ secrets.JAIL_KEY }}
|
||||||
|
script: |
|
||||||
|
rm -f /var/lib/vrobbler/dist/*.whl
|
||||||
|
|
||||||
- name: Copy wheel to server and deploy
|
- name: Copy wheel to server and deploy
|
||||||
uses: appleboy/scp-action@v1.0.0
|
uses: appleboy/scp-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
@ -116,8 +125,8 @@ jobs:
|
|||||||
mkdir -p /var/lib/vrobbler
|
mkdir -p /var/lib/vrobbler
|
||||||
echo "${{ gitea.sha }}" | cut -c1-8 > /var/lib/vrobbler/commit.txt
|
echo "${{ gitea.sha }}" | cut -c1-8 > /var/lib/vrobbler/commit.txt
|
||||||
pip uninstall -y vrobbler
|
pip uninstall -y vrobbler
|
||||||
rm -f /var/lib/vrobbler/dist/*.whl
|
|
||||||
pip install /var/lib/vrobbler/dist/*.whl
|
pip install /var/lib/vrobbler/dist/*.whl
|
||||||
|
rm -f /var/lib/vrobbler/dist/*.whl
|
||||||
python -c "import vrobbler; print(f'vrobbler {vrobbler.__version__} installed OK')"
|
python -c "import vrobbler; print(f'vrobbler {vrobbler.__version__} installed OK')"
|
||||||
vrobbler migrate
|
vrobbler migrate
|
||||||
vrobbler collectstatic --noinput
|
vrobbler collectstatic --noinput
|
||||||
|
|||||||
96
PROJECT.org
96
PROJECT.org
@ -93,7 +93,7 @@ fetching and simple saving.
|
|||||||
:LOGBOOK:
|
:LOGBOOK:
|
||||||
CLOCK: [2025-07-09 Wed 09:55]--[2025-07-09 Wed 10:15] => 0:20
|
CLOCK: [2025-07-09 Wed 09:55]--[2025-07-09 Wed 10:15] => 0:20
|
||||||
:END:
|
:END:
|
||||||
* Backlog [-2/11] :vrobbler:project:personal:
|
* Backlog [0/15] :vrobbler:project:personal:
|
||||||
** TODO [#C] Add sentiment parsing for Scrobbles with notes :vrobbler:project:scrobbles:sentiment:
|
** TODO [#C] Add sentiment parsing for Scrobbles with notes :vrobbler:project:scrobbles:sentiment:
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: 37781d6a-f3b0-48b2-bf98-33c2c791cf85
|
:ID: 37781d6a-f3b0-48b2-bf98-33c2c791cf85
|
||||||
@ -428,7 +428,7 @@ Pretty clear, I would love to make trails more useful. Historically I wasn't
|
|||||||
hiking a lot, which made the source for this a bit silly. But it's clear that
|
hiking a lot, which made the source for this a bit silly. But it's clear that
|
||||||
AllTrails is the best source, though having TrailForks is nice to.
|
AllTrails is the best source, though having TrailForks is nice to.
|
||||||
|
|
||||||
** TODO [#B] Add `garmin_activity_id` to the TrailMetadataLog class :vrobbler:trails:feature:personal:project:
|
** TODO [#B] Add `garmin_activity_id` to the TrailLogData class :trails:feature:personal:project:
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: 5a4fb0f8-0555-40ec-b06f-93c26bd686f4
|
:ID: 5a4fb0f8-0555-40ec-b06f-93c26bd686f4
|
||||||
:END:
|
:END:
|
||||||
@ -489,6 +489,96 @@ whatever time KoReader reports, we need to know, given the date and the user
|
|||||||
profile's historic timezone, how many hours to adjust the KoReader time to get
|
profile's historic timezone, how many hours to adjust the KoReader time to get
|
||||||
to GMT to save it in the database.
|
to GMT to save it in the database.
|
||||||
|
|
||||||
|
** TODO [#A] Orgmode tasks are not updated if in progress :tasks:orgmode:bug:
|
||||||
|
:PROPERTIES:
|
||||||
|
:ID: 7dcebb2c-7c4c-4ac5-bee6-c2e36c3811f9
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Description
|
||||||
|
|
||||||
|
Currently if you POST to the orgmode webhook with a task that's already in progress, the request just stops there.
|
||||||
|
|
||||||
|
We should add logic where if the task is in-progress, instead of doing nothing,
|
||||||
|
it checks the webhook payload against the in-progress tasks and updates the
|
||||||
|
description of the scrobble.log with the incoming task description if it's
|
||||||
|
different. And the same for comments. If a comment (by timestamp key) is
|
||||||
|
different in the webhook than what's in the scrobble.log, update the comment in
|
||||||
|
the scrobble.log
|
||||||
|
|
||||||
|
** TODO [#C] Fix bug where Weigh-in imports do not set title :bug:tasks:scale:
|
||||||
|
:PROPERTIES:
|
||||||
|
:ID: 622e354a-8e66-4ecd-9e1c-a53f0a2ec362
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Description
|
||||||
|
|
||||||
|
Currently when we import a scale CSV row and create data, the title is left
|
||||||
|
blank which makes it look funny in a list view. Let's save the weight as the
|
||||||
|
title of the Weigh-in task.
|
||||||
|
|
||||||
|
* Version 40.2 [1/1]
|
||||||
|
** DONE [#A] Try fixing deploy bugs again :tooling:releases:bug:
|
||||||
|
:PROPERTIES:
|
||||||
|
:ID: 15894943-be1d-200f-8400-a136770ad9d2
|
||||||
|
:END:
|
||||||
|
|
||||||
|
* Version 40.1 [2/2]
|
||||||
|
** DONE [#A] Releases are still broken :bug:releases:tooling:
|
||||||
|
:PROPERTIES:
|
||||||
|
:ID: bca37a18-afa2-4ddd-a11b-ef0555f38bc9
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Description
|
||||||
|
|
||||||
|
Deploys are still broken, even with them being pulled apart and run separately.
|
||||||
|
|
||||||
|
We need to address the way the commit ends up stashed in the codebase.
|
||||||
|
|
||||||
|
** DONE [#C] Fix bug on chart pages where trail titles missing :bug:trails:charts:
|
||||||
|
:PROPERTIES:
|
||||||
|
:ID: 21075430-8a93-4e59-9a02-479315960ae6
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Description
|
||||||
|
|
||||||
|
When trails are rendered on the chart views, there are no titles, which means we don't see
|
||||||
|
anything except the ranking number.
|
||||||
|
|
||||||
|
|
||||||
|
* Version 40.0 [2/2]
|
||||||
|
** DONE [#A] Fix error in org-mode task sync :emacs:orgmode:tasks:bug:
|
||||||
|
:PROPERTIES:
|
||||||
|
:ID: 03256d2a-48aa-4be7-aeb3-fa1cfddc86bf
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Description
|
||||||
|
#+begin_src python
|
||||||
|
File "/usr/local/lib/python3.11/site-packages/vrobbler/apps/tasks/webhooks.py", line 236, in post
|
||||||
|
emacs_scrobble_update_task(
|
||||||
|
File "/usr/local/lib/python3.11/site-packages/vrobbler/apps/scrobbles/scrobblers.py", line 844, in emacs_scrobble_update_task
|
||||||
|
for note in emacs_notes:
|
||||||
|
TypeError: 'NoneType' object is not iterable
|
||||||
|
#+end_src
|
||||||
|
** DONE [#B] Adjust how similar artists are shown :feature:templates:artists:music:
|
||||||
|
:PROPERTIES:
|
||||||
|
:ID: 2a081620-a0a2-4851-a7cf-4043f9c2ee31
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Description
|
||||||
|
|
||||||
|
Currently we show the top 10 similar artists on the Artist detail page linked to
|
||||||
|
the artist detail page on Vrobbler.
|
||||||
|
|
||||||
|
First off, this is very slow. We should look into speeding up the rendering of
|
||||||
|
the similar artists widget.
|
||||||
|
|
||||||
|
Second, the artist name in the similar artist list should be a link to the
|
||||||
|
Vrobbler artist detail page, but there should also be a [musicbrainz] link next
|
||||||
|
to it, that links out to the musicbrainz page whether we have the artist in the
|
||||||
|
Vrobbler database or not.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* Version 39.3 [2/2]
|
* Version 39.3 [2/2]
|
||||||
** DONE [#A] Issue found when doing a release :bug:tooling:release:cicd:
|
** DONE [#A] Issue found when doing a release :bug:tooling:release:cicd:
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
@ -522,7 +612,7 @@ and once on tag push.
|
|||||||
We should do builds on each push and build and deploys only when a new tag is
|
We should do builds on each push and build and deploys only when a new tag is
|
||||||
detected.
|
detected.
|
||||||
|
|
||||||
|
|
||||||
* Version 39.2 [2/2]
|
* Version 39.2 [2/2]
|
||||||
** DONE [#B] Releases do not pin commit to the repo for display :bug:tooling:releases:
|
** DONE [#B] Releases do not pin commit to the repo for display :bug:tooling:releases:
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "vrobbler"
|
name = "vrobbler"
|
||||||
version = "39.3"
|
version = "40.2"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Colin Powell <colin@unbl.ink>"]
|
authors = ["Colin Powell <colin@unbl.ink>"]
|
||||||
|
|
||||||
|
|||||||
@ -19,11 +19,7 @@ class ArtistListView(generic.ListView):
|
|||||||
paginate_by = 100
|
paginate_by = 100
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = (
|
qs = super().get_queryset().annotate(scrobble_count=Count("track__scrobble"))
|
||||||
super()
|
|
||||||
.get_queryset()
|
|
||||||
.annotate(scrobble_count=Count("track__scrobble"))
|
|
||||||
)
|
|
||||||
genre = self.request.GET.get("genre")
|
genre = self.request.GET.get("genre")
|
||||||
if genre:
|
if genre:
|
||||||
qs = qs.filter(theaudiodb_genre=genre)
|
qs = qs.filter(theaudiodb_genre=genre)
|
||||||
@ -82,26 +78,30 @@ class ArtistDetailView(generic.DetailView):
|
|||||||
|
|
||||||
similar = artist.similar_artists or []
|
similar = artist.similar_artists or []
|
||||||
if similar:
|
if similar:
|
||||||
mbids = [sa["artist_mbid"] for sa in similar if sa.get("artist_mbid")]
|
top = similar[:10]
|
||||||
|
mbids = [sa["artist_mbid"] for sa in top if sa.get("artist_mbid")]
|
||||||
local_artists = {
|
local_artists = {
|
||||||
a.musicbrainz_id: a
|
a.musicbrainz_id: a
|
||||||
for a in Artist.objects.filter(musicbrainz_id__in=mbids)
|
for a in Artist.objects.filter(musicbrainz_id__in=mbids)
|
||||||
}
|
}
|
||||||
for sa in similar:
|
for sa in top:
|
||||||
local = local_artists.get(sa.get("artist_mbid"))
|
local = local_artists.get(sa.get("artist_mbid"))
|
||||||
sa["local_url"] = local.get_absolute_url() if local else None
|
sa["local_url"] = local.get_absolute_url() if local else None
|
||||||
context_data["similar_artists"] = similar
|
sa["musicbrainz_url"] = (
|
||||||
|
f"https://musicbrainz.org/artist/{sa['artist_mbid']}"
|
||||||
|
if sa.get("artist_mbid")
|
||||||
|
else None
|
||||||
|
)
|
||||||
|
context_data["similar_artists"] = top
|
||||||
|
|
||||||
if artist.theaudiodb_genre:
|
if artist.theaudiodb_genre:
|
||||||
context_data["genre_count"] = (
|
context_data["genre_count"] = Artist.objects.filter(
|
||||||
Artist.objects.filter(theaudiodb_genre=artist.theaudiodb_genre)
|
theaudiodb_genre=artist.theaudiodb_genre
|
||||||
.count()
|
).count()
|
||||||
)
|
|
||||||
if artist.theaudiodb_mood:
|
if artist.theaudiodb_mood:
|
||||||
context_data["mood_count"] = (
|
context_data["mood_count"] = Artist.objects.filter(
|
||||||
Artist.objects.filter(theaudiodb_mood=artist.theaudiodb_mood)
|
theaudiodb_mood=artist.theaudiodb_mood
|
||||||
.count()
|
).count()
|
||||||
)
|
|
||||||
|
|
||||||
return context_data
|
return context_data
|
||||||
|
|
||||||
|
|||||||
@ -235,7 +235,7 @@ class EmacsWebhookView(APIView):
|
|||||||
if task_in_progress:
|
if task_in_progress:
|
||||||
emacs_scrobble_update_task(
|
emacs_scrobble_update_task(
|
||||||
post_data.get("source_id"),
|
post_data.get("source_id"),
|
||||||
post_data.get("notes", []),
|
post_data.get("notes") or [],
|
||||||
user_id,
|
user_id,
|
||||||
description=post_data.get("body"),
|
description=post_data.get("body"),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -258,7 +258,7 @@
|
|||||||
{% for chart in charts.trail|slice:":20" %}
|
{% for chart in charts.trail|slice:":20" %}
|
||||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
<span class="me-2"><strong>#{{chart.rank}}</strong></span>
|
<span class="me-2"><strong>#{{chart.rank}}</strong></span>
|
||||||
<a href="{{chart.trail.get_absolute_url}}">{{chart.trail.name}}</a>
|
<a href="{{chart.trail.get_absolute_url}}">{{chart.trail.title}}</a>
|
||||||
<span class="badge bg-primary rounded-pill">{{chart.count}}</span>
|
<span class="badge bg-primary rounded-pill">{{chart.count}}</span>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@ -53,13 +53,15 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Artist</th>
|
<th scope="col">Artist</th>
|
||||||
<th scope="col">Score</th>
|
<th scope="col">Score</th>
|
||||||
|
<th scope="col"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for sa in similar_artists|slice:":10" %}
|
{% for sa in similar_artists %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% if sa.local_url %}<a href="{{sa.local_url}}">{{sa.name}}</a>{% else %}{{sa.name}}{% endif %}</td>
|
<td>{% if sa.local_url %}<a href="{{sa.local_url}}">{{sa.name}}</a>{% else %}{{sa.name}}{% endif %}</td>
|
||||||
<td>{{sa.score}}</td>
|
<td>{{sa.score}}</td>
|
||||||
|
<td>{% if sa.musicbrainz_url %}<a href="{{sa.musicbrainz_url}}">musicbrainz</a>{% endif %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user