playback
backend.api.tracks.playback
Section titled “backend.api.tracks.playback”Track detail and playback endpoints.
Functions
Section titled “Functions”get_track source
Section titled “get_track source”get_track(track_id: int, db: Annotated[AsyncSession, Depends(get_db)], session: Session | None = Depends(get_optional_session)) -> TrackResponseGet a specific track.
increment_play_count source
Section titled “increment_play_count source”increment_play_count(track_id: int, db: Annotated[AsyncSession, Depends(get_db)], session: Session | None = Depends(get_optional_session), body: PlayRequest | None = Body(default=None)) -> PlayCountResponseIncrement play count for a track (called after 30 seconds of playback).
If user has teal.fm scrobbling enabled and has the required scopes, also writes play record to their PDS.
If a ref code is provided, also records a play event for share link tracking.
Classes
Section titled “Classes”PlayRequest source
Section titled “PlayRequest source”optional request body for play endpoint.