Update documentation saying that API version 1.8.0+ is reqiured

This commit is contained in:
Sumner Evans
2020-07-09 22:50:46 -06:00
parent b847a5500f
commit 4917574a83
3 changed files with 25 additions and 45 deletions

View File

@@ -22,6 +22,10 @@ v0.10.4
* ``semver``
The following dependencies were removed:
* ``pyyaml``
The following dependencies are now optional:
* ``pychromecast``
@@ -39,6 +43,9 @@ v0.10.4
with Gonic (Contributed by @sentriz).
* *Fixed Regression*: The load play queue button in the play queue popup works
again.
* Caching behavior has been greatly improved.
* The Subsonic adapter disables saving and loading the play queue if the server
doesn't implement the Subsonic API v1.12.0.
**Under the Hood**

View File

@@ -25,7 +25,7 @@ Linux Desktop.
Features
--------
* Switch between multiple Subsonic-API-compliant servers.
* Switch between multiple Subsonic-API-compliant [1]_ servers.
* Play music through Chromecast devices on the same LAN.
* Offline Mode where Sublime Music will not make any network requests.
* DBus MPRIS interface integration for controlling Sublime Music via clients
@@ -37,6 +37,8 @@ Features
* Create/delete/edit playlists.
* Download songs for offline listening.
.. [1] Requires a server which implements the Subsonic API version 1.8.0+.
Installation
------------

View File

@@ -264,42 +264,29 @@ class SubsonicAdapter(Adapter):
def ping_status(self) -> bool:
return self._server_available.value
# TODO (#199) make these way smarter
can_get_playlists = True
can_get_playlist_details = True
can_get_cover_art_uri = True
can_get_song_uri = True
can_stream = True
can_get_ignored_articles = True
can_create_playlist = True
can_delete_playlist = True
can_get_album = True
can_get_albums = True
can_get_artist = True
can_get_artists = True
can_get_cover_art_uri = True
can_get_directory = True
can_get_ignored_articles = True
can_get_playlist_details = True
can_get_playlists = True
can_get_song_details = True
can_get_song_uri = True
can_scrobble_song = True
can_search = True
can_stream = True
can_update_playlist = True
# TODO Consider just requiring the server to implement at least 1.8.0
def version_at_least(self, version: str) -> bool:
if not self._version.value:
return False
return semver.VersionInfo.parse(self._version.value.decode()) >= version
@property
def can_create_playlist(self) -> bool:
return self.version_at_least("1.2.0")
@property
def can_delete_playlist(self) -> bool:
return self.version_at_least("1.2.0")
@property
def can_get_albums(self) -> bool:
return self.version_at_least("1.8.0")
@property
def can_get_artists(self) -> bool:
return self.version_at_least("1.8.0")
@property
def can_get_artist(self) -> bool:
return self.version_at_least("1.8.0")
@property
def can_get_genres(self) -> bool:
return self.version_at_least("1.9.0")
@@ -312,22 +299,6 @@ class SubsonicAdapter(Adapter):
def can_save_play_queue(self) -> bool:
return self.version_at_least("1.12.0")
@property
def can_get_song_details(self) -> bool:
return self.version_at_least("1.8.0")
@property
def can_scrobble_song(self) -> bool:
return self.version_at_least("1.5.0")
@property
def can_search(self) -> bool:
return self.version_at_least("1.8.0")
@property
def can_update_playlist(self) -> bool:
return self.version_at_least("1.8.0")
_schemes = None
@property