- Investigate how historice lastfm imports work
- Fix LookupError on scrobble start/long-plays views
- Add Flexify workout importer
- Add workouts app with exercise catalog and workout routines
- When sharing a scrobble, share the log data too
Add django-filter support to the ScrobbleViewSet with filters for:
- in_progress: boolean filter for active scrobbles
- visibility: enum filter (public/shared/private)
- media_type: enum filter for all 25 media types
- source: text search filter (icontains)
- played_to_completion: boolean filter
- timestamp_after/before: datetime range filters
Changes:
- Create scrobbles/api/filters.py with ScrobbleFilter class
- Add filterset_class to ScrobbleViewSet
- Filters appear in OpenAPI schema at /api/v1/scrobbles/
VideoGame was missing from the API router, causing
HyperlinkedModelSerializer to fail when generating URLs for scrobble
relationships.
Changes:
- Create videogames/api/ with serializers and views
- Register VideoGameViewSet at /api/v1/videogames/
- Register VideoGameCollectionViewSet at /api/v1/videogame-collections/
- Register VideoGamePlatformViewSet at /api/v1/videogame-platforms/
TrailViewSet and FoodCategoryViewSet were imported but never registered
in the DRF router, causing HyperlinkedModelSerializer to fail when
trying to generate URLs for scrobble relationships.
Changes:
- Add router.register(r'trails', TrailViewSet)
- Add router.register(r'food-categories', FoodCategoryViewSet)
The ScrobbleViewSet was using lookup_field="uuid" which caused
API detail views to fail for scrobbles with NULL UUIDs. Rather
than backfilling all NULL UUIDs, switch to pk lookup which is
always populated.
Changes:
- Remove lookup_field="uuid" from ScrobbleViewSet (defaults to pk)
- Remove extra_kwargs from ScrobbleSerializer (URL now uses pk)
- Update regenerate_share_token action signature to use **kwargs
The ScrobbleSerializer uses HyperlinkedModelSerializer with
lookup_field='uuid', but 3,273 of 6,155 Scrobbles had NULL UUIDs,
causing URL resolution to fail.
Fix:
- Add migration 0104 to backfill NULL UUIDs with uuid4()
- All Scrobbles now have valid UUIDs for URL resolution
Same issue as drink-detail: Paper model had a template URL but no API
ViewSet, causing HyperlinkedModelSerializer to fail.
Fix:
- Add PaperSerializer and PaperViewSet to books/api/
- Register PaperViewSet as 'papers' in the DRF router
HyperlinkedModelSerializer could not resolve drink-detail because no
API ViewSet existed for the Drink model, even though the template URL
existed in drinks/urls.py.
Fix:
- Add DrinkSerializer and DrinkViewSet to drinks/api/
- Register DrinkViewSet as 'drinks' in the DRF router (vrobbler/urls.py)
- Mark task 8f2a3b4c as DONE in PROJECT.org
GET /api/v1/scrobbles/ now resolves without error.
GET /api/v1/scrobbles/ fails because HyperlinkedModelSerializer
can't resolve drink-detail — no API ViewSet exists for it, only a
template view in drinks/urls.py.