foo-webview-sdk
    Preparing search index...

    Interface SelectionGetViewingTrackSuccess

    Successful response from selection.getViewingTrack.

    interface SelectionGetViewingTrackSuccess {
        found: boolean;
        handle?: string;
        itemIndex?: number;
        mode: "prefer_playing" | "prefer_selection";
        playlistGuid?: string;
        playlistIndex?: number;
        source?: "selection" | "now_playing";
        success: true;
        track?: Track;
    }
    Index
    found: boolean

    Whether either source had a track.

    handle?: string

    The track's handle (native path, |subsong:N appended when the subsong is not 0); absent when found is false.

    itemIndex?: number

    Row of the track in that playlist, the first one holding it; absent when playlistIndex is.

    mode: "prefer_playing" | "prefer_selection"

    The preference the resolution used.

    playlistGuid?: string

    GUID of that playlist, as playlistGuid takes it; present exactly when playlistIndex is.

    playlistIndex?: number

    Playlist holding the track; absent when no playlist row is known for it. For the playing track this is where playback took it from; for the selection only the active playlist is looked through, so a selection made elsewhere (the Media Library, another playlist) has no row. Present exactly when itemIndex is.

    source?: "selection" | "now_playing"

    Which source supplied the track; absent when found is false.

    success: true

    Always true here; a failed call resolves with ApiFailure instead.

    track?: Track

    The full track row; only with includeTrackInfo.