- Fixed comments and whitespace

This commit is contained in:
Ross Stewart
2025-09-08 13:10:45 +01:00
parent cc3ab62abe
commit 338ede40c0
3 changed files with 15 additions and 14 deletions

View File

@@ -188,7 +188,7 @@ class MediaQueue:
return self.current_track
def get_prevous_track(self) -> Track:
def get_previous_track(self) -> Track:
"""Get the previous track
Get the last track added to the history deque and
@@ -198,7 +198,7 @@ class MediaQueue:
:rtype: Track
"""
self.logger.debug('In get_prevous_track()')
self.logger.debug('In get_previous_track()')
# Return the current track to the queue
self.queue.appendleft(self.current_track)
@@ -258,7 +258,7 @@ class MediaQueue:
return len(self.history)
def sync(self) -> None:
"""Syncronise the buffer with the queue
"""Synchronise the buffer with the queue
Overwrite the buffer with the current queue.
This is useful when pausing or stopping to ensure

View File

@@ -16,7 +16,7 @@ class SubsonicConnection:
:param str server_url: The URL of the Subsonic API compatible media server
:param str user: Username to authenticate against the API
:param str passwd: Password to authenticate against the API
:param int port: Port the Subsonic compatibe server is listening on
:param int port: Port the Subsonic compatible server is listening on
:param str api_location: Path to the API, this is appended to server_url
:param str api_version: The version of the Subsonic API that is in use
:return: None
@@ -284,7 +284,7 @@ class SubsonicConnection:
def build_song_list_from_genre(self, genre: str, count: int) -> Union[list, None]:
"""Build a shuffled list songs of songs from the given genre.
:param str genre: The genre, acceptible values are with the getGenres Subsonic API call.
:param str genre: The genre, acceptable values are with the getGenres Subsonic API call.
:param int count: The number of songs to return
:return: A list of song IDs or None if no tracks are found.
:rtype: list | None
@@ -292,7 +292,7 @@ class SubsonicConnection:
self.logger.debug('In function build_song_list_from_genre()')
# Note the use of title() to captalise the first letter of each word in the genre
# Note the use of title() to capitalise the first letter of each word in the genre
# without this the genres do not match the strings returned by the API.
self.logger.debug(f'Searching for {genre.title()} music')
songs_from_genre = self.conn.getSongsByGenre(genre.title(), count).get('songsByGenre').get('song')