@@ -276,7 +276,8 @@ def add(
276276
277277 :param media_ids: List of Media IDs to add.
278278 :param allow_duplicates: Allow adding duplicate items
279- :param position: Insert items at a specific position. Default: insert at the end of the playlist
279+ :param position: Insert items at a specific position. Default: insert at the end
280+ of the playlist
280281 :return: True, if successful.
281282 """
282283 # Insert items at a specific index
@@ -302,8 +303,7 @@ def add(
302303 return res .ok
303304
304305 def move_by_id (self , media_id : str , position : int ) -> bool :
305- """
306- Move an item to a new position, by media ID
306+ """Move an item to a new position, by media ID.
307307
308308 :param media_id: The index of the item to be moved
309309 :param position: The new position of the item
@@ -318,8 +318,7 @@ def move_by_id(self, media_id: str, position: int) -> bool:
318318 return False
319319
320320 def move_by_index (self , index : int , position : int ) -> bool :
321- """
322- Move a single item to a new position
321+ """Move a single item to a new position.
323322
324323 :param index: The index of the item to be moved
325324 :param position: The new position/offset of the item
@@ -328,8 +327,7 @@ def move_by_index(self, index: int, position: int) -> bool:
328327 return self .move_by_indices ([index ], position )
329328
330329 def move_by_indices (self , indices : Sequence [int ], position : int ) -> bool :
331- """
332- Move one or more items to a new position
330+ """Move one or more items to a new position.
333331
334332 :param indices: List containing indices to move.
335333 :param position: The new position/offset of the item(s)
@@ -353,7 +351,7 @@ def move_by_indices(self, indices: Sequence[int], position: int) -> bool:
353351 return res .ok
354352
355353 def remove_by_id (self , media_id : str ) -> bool :
356- """Remove a single item from the playlist, using the media ID
354+ """Remove a single item from the playlist, using the media ID.
357355
358356 :param media_id: Media ID to remove.
359357 :return: True, if successful.
@@ -403,10 +401,9 @@ def clear(self, chunk_size: int = 50) -> bool:
403401 return True
404402
405403 def set_playlist_public (self ):
406- """
407- Set UserPlaylist as Public.
404+ """Set UserPlaylist as Public.
408405
409- :return: True, if successful..
406+ :return: True, if successful.
410407 """
411408 res = self .request .request (
412409 "PUT" ,
@@ -418,10 +415,9 @@ def set_playlist_public(self):
418415 return res .ok
419416
420417 def set_playlist_private (self ):
421- """
422- Set UserPlaylist as Private.
418+ """Set UserPlaylist as Private.
423419
424- :return: True, if successful..
420+ :return: True, if successful.
425421 """
426422 res = self .request .request (
427423 "PUT" ,
@@ -435,6 +431,6 @@ def set_playlist_private(self):
435431 def delete_playlist (self ) -> bool :
436432 """Delete UserPlaylist.
437433
438- :return: True, if successful..
434+ :return: True, if successful.
439435 """
440436 return self .request .request ("DELETE" , path = "playlists/%s" % self .id ).ok
0 commit comments