soco.plugins.sharelink module¶
ShareLink Plugin.
-
class
soco.plugins.sharelink.
ShareClass
[source]¶ Base class for supported services.
-
canonical_uri
(uri)[source]¶ Recognize a share link and return its canonical representation.
Parameters: uri (str) – A URI like “https://tidal.com/browse/album/157273956”. Returns: The canonical URI or None if not recognized. Return type: str
-
service_number
()[source]¶ Return the service number.
Returns: A number identifying the supported music service. Return type: int
-
-
class
soco.plugins.sharelink.
SpotifyShare
[source]¶ Spotify share class.
-
canonical_uri
(uri)[source]¶ Recognize a share link and return its canonical representation.
Parameters: uri (str) – A URI like “https://tidal.com/browse/album/157273956”. Returns: The canonical URI or None if not recognized. Return type: str
-
-
class
soco.plugins.sharelink.
TIDALShare
[source]¶ TIDAL share class.
-
canonical_uri
(uri)[source]¶ Recognize a share link and return its canonical representation.
Parameters: uri (str) – A URI like “https://tidal.com/browse/album/157273956”. Returns: The canonical URI or None if not recognized. Return type: str
-
-
class
soco.plugins.sharelink.
DeezerShare
[source]¶ Deezer share class.
-
canonical_uri
(uri)[source]¶ Recognize a share link and return its canonical representation.
Parameters: uri (str) – A URI like “https://tidal.com/browse/album/157273956”. Returns: The canonical URI or None if not recognized. Return type: str
-
-
class
soco.plugins.sharelink.
ShareLinkPlugin
(soco)[source]¶ A SoCo plugin for playing Spotify/Tidal share links.
Initialize the plugin.
-
name
¶ Human-readable name of the plugin
-
add_share_link_to_queue
(uri, position=0, as_next=False)[source]¶ Add a Spotify/Tidal/… item to the queue.
This is similar to soco.add_uri_to_queue() but will work with music service share links that do not directly point to sound files.
Parameters: - uri (str) – A URI like “spotify:album:6wiUBliPe76YAVpNEdidpY”.
- position (int) – The index (1-based) at which the URI should be added. Default is 0 (add URI at the end of the queue).
- as_next (bool) – Whether this URI should be played as the next track in shuffle mode. This only works if “play_mode=SHUFFLE”.
Returns: The index of the new item in the queue.
Return type:
-