Skip to content

albums

albums api endpoints.

invalidate_album_cache(handle: str, slug: str) -> None

delete cached album response. fails silently.

invalidate_album_cache_by_id(db: AsyncSession, album_id: str) -> None

look up album handle+slug and invalidate cache. fails silently.

list_albums(db: Annotated[AsyncSession, Depends(get_db)]) -> dict[str, list[AlbumListItem]]

list all albums with basic metadata.

list_artist_albums(handle: str, db: Annotated[AsyncSession, Depends(get_db)]) -> dict[str, list[ArtistAlbumListItem]]

list albums for a specific artist.

get_album(handle: str, slug: str, db: Annotated[AsyncSession, Depends(get_db)], session: AuthSession | None = Depends(get_optional_session)) -> AlbumResponse

get album details with tracks (ordered by ATProto list record or created_at).

upload_album_cover(album_id: str, db: Annotated[AsyncSession, Depends(get_db)], auth_session: Annotated[AuthSession, Depends(require_artist_profile)], image: UploadFile = File(...)) -> dict[str, str | None]

upload cover art for an album (requires authentication).

update_album(album_id: str, db: Annotated[AsyncSession, Depends(get_db)], auth_session: Annotated[AuthSession, Depends(require_artist_profile)], title: Annotated[str | None, Query(description='new album title')] = None, description: Annotated[str | None, Query(description='new album description')] = None) -> AlbumMetadata

update album metadata (title, description). syncs ATProto records on title change.

remove_track_from_album(album_id: str, track_id: int, db: Annotated[AsyncSession, Depends(get_db)], auth_session: Annotated[AuthSession, Depends(require_artist_profile)]) -> RemoveTrackFromAlbumResponse

remove a track from an album (orphan it, don’t delete).

the track remains available as a standalone track.

delete_album(album_id: str, db: Annotated[AsyncSession, Depends(get_db)], auth_session: Annotated[AuthSession, Depends(require_artist_profile)], cascade: Annotated[bool, Query(description='if true, also delete all tracks in the album')] = False) -> DeleteAlbumResponse

delete album. tracks are orphaned unless cascade=true. removes ATProto list record.

album metadata response.

album detail response with tracks.

minimal album info for listing.

response for removing a track from an album.

response for deleting an album.

album info for a specific artist (used on artist pages).