sublime_music.adapters.api_objects module
Defines the objects that are returned by adapter methods.
- class sublime_music.adapters.api_objects.Album[source]
Bases:
abc.ABC
The
id
field is optional, because there are some situations where an adapter (such as Subsonic) sends an album name, but not an album ID.- artist: Optional[sublime_music.adapters.api_objects.Artist]
- created: Optional[datetime.datetime]
- duration: Optional[datetime.timedelta]
- genre: Optional[sublime_music.adapters.api_objects.Genre]
- songs: Optional[Sequence[sublime_music.adapters.api_objects.Song]]
- starred: Optional[datetime.datetime]
- class sublime_music.adapters.api_objects.Artist[source]
Bases:
abc.ABC
The
id
field is optional, because there are some situations where an adapter (such as Subsonic) sends an artist name, but not an artist ID. This especially happens when there are multiple artists.- albums: Optional[Sequence[sublime_music.adapters.api_objects.Album]]
- similar_artists: Optional[Sequence[sublime_music.adapters.api_objects.Artist]] = None
- starred: Optional[datetime.datetime]
- class sublime_music.adapters.api_objects.Directory[source]
Bases:
abc.ABC
The special directory with
name
andid
should be used to indicate the top-level directory.- children: Sequence[Union[sublime_music.adapters.api_objects.Directory, sublime_music.adapters.api_objects.Song]]
- class sublime_music.adapters.api_objects.PlayQueue[source]
Bases:
abc.ABC
- changed: Optional[datetime.datetime]
- position: datetime.timedelta
- songs: Sequence[sublime_music.adapters.api_objects.Song]
- class sublime_music.adapters.api_objects.Playlist[source]
Bases:
abc.ABC
- changed: Optional[datetime.datetime]
- created: Optional[datetime.datetime]
- duration: Optional[datetime.timedelta]
- songs: Sequence[sublime_music.adapters.api_objects.Song]
- class sublime_music.adapters.api_objects.SearchResult(query=None)[source]
Bases:
object
An object representing the aggregate results of a search which can include both server and local results.
- property albums: List[sublime_music.adapters.api_objects.Album]
- property artists: List[sublime_music.adapters.api_objects.Artist]
- property playlists: List[sublime_music.adapters.api_objects.Playlist]
- property songs: List[sublime_music.adapters.api_objects.Song]
- class sublime_music.adapters.api_objects.Song[source]
Bases:
abc.ABC
- album: Optional[sublime_music.adapters.api_objects.Album]
- artist: Optional[sublime_music.adapters.api_objects.Artist]
- duration: Optional[datetime.timedelta]
- genre: Optional[sublime_music.adapters.api_objects.Genre]
- starred: Optional[datetime.datetime]