TrackerMarkClient

An interface for a tracker client that marks tracks as played after a certain duration.

This interface extends TrackerClient and provides methods to determine when a track should be marked as played based on its duration.

Functions

Link copied to clipboard
abstract suspend fun getMarkAsPlayedDuration(details: TrackDetails): Long?

The duration in milliseconds after which the track should be marked as played (defaults to null). If null, the onMarkAsPlayed method will not be called.

Link copied to clipboard
abstract suspend fun getSettingItems(): List<Setting>

List of Settings to be displayed in the settings screen

Link copied to clipboard
open suspend fun onExtensionSelected()

Only called when an extension is selected by the user, not when the extension is loaded Use the onInitialize for doing stuff to initialize the extension

Link copied to clipboard
open suspend fun onInitialize()

Called when the extension is loaded, called after all the injections are done. Only called once

Link copied to clipboard
abstract suspend fun onMarkAsPlayed(details: TrackDetails)

Called after the track has been streamed for getMarkAsPlayedDuration milliseconds. This method will not be called if getMarkAsPlayedDuration is null.

Link copied to clipboard
abstract suspend fun onPlayingStateChanged(details: TrackDetails?, isPlaying: Boolean)

Called when the player changes its playing state or when the position changes.

Link copied to clipboard
abstract suspend fun onTrackChanged(details: TrackDetails?)

Called when the player changes its current track.

Link copied to clipboard
abstract fun setSettings(settings: Settings)

Called when the extension is initialized, to provide the Settings to the extension