Trees | Indices | Help |
|
---|
|
A Dynamic Playlist object
session_id (str): Playlist Session ID
song (song object): The current song
info (dictionary): Information about this playlist
>>> p = Playlist(type='artist-radio', artist=['ida maria', 'florence + the machine']) >>> p <Dynamic Playlist - 9c210205d4784144b4fa90770fa55d0b> >>> p.song <song - Later On> >>> p.get_next_song() <song - Overall> >>>
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
song Get the current song in the playlist |
|||
info Get information about the playlist |
|||
Inherited from |
|
Args:
|
|
Get the next song in the playlist Args: Kwargs:
Example: >>> p = playlist.Playlist(type='artist-radio', artist=['ida maria', 'florence + the machine']) >>> p.get_next_song() <song - She Said> >>> |
Get the current song in the playlist Args: Kwargs:
Example: >>> p = playlist.Playlist(type='artist-radio', artist=['ida maria', 'florence + the machine']) >>> p.song <song - Later On> >>> p.get_current_song() <song - Later On> >>> |
Get information about the playlist Args: Kwargs:
Example: >>> p = playlist.Playlist(type='artist-radio', artist=['ida maria', 'florence + the machine']) >>> p.info { u 'terms': [{ u 'frequency': 1.0, u 'name': u 'rock' }, { u 'frequency': 0.99646542152360207, u 'name': u 'pop' }, { u 'frequency': 0.90801905502131963, u 'name': u 'indie' }, { u 'frequency': 0.90586455490260576, u 'name': u 'indie rock' }, { u 'frequency': 0.8968907243373172, u 'name': u 'alternative' }, [...] { u 'frequency': 0.052197425644931635, u 'name': u 'easy listening' }], u 'description': [], u 'seed_songs': [], u 'banned_artists': [], u 'rules': [{ u 'rule': u "Don't put two copies of the same song in a playlist." }, { u 'rule': u 'Give preference to artists that are not already in the playlist' }], u 'session_id': u '9c1893e6ace04c8f9ce745f38b35ff95', u 'seeds': [u 'ARI4XHX1187B9A1216', u 'ARNCHOP121318C56B8'], u 'skipped_songs': [], u 'banned_songs': [], u 'playlist_type': u 'artist-radio', u 'seed_catalogs': [], u 'rated_songs': [], u 'history': [{ u 'artist_id': u 'ARN6QMG1187FB56C8D', u 'artist_name': u 'Laura Marling', u 'id': u 'SOMSHNP12AB018513F', u 'served_time': 1291412277.204201, u 'title': u 'Hope In The Air' }] } >>> p.session_info() (same result as above) >>> |
|
songGet the current song in the playlist Args: Kwargs:
Example: >>> p = playlist.Playlist(type='artist-radio', artist=['ida maria', 'florence + the machine']) >>> p.song <song - Later On> >>> p.get_current_song() <song - Later On> >>>
|
infoGet information about the playlist Args: Kwargs:
Example: >>> p = playlist.Playlist(type='artist-radio', artist=['ida maria', 'florence + the machine']) >>> p.info { u 'terms': [{ u 'frequency': 1.0, u 'name': u 'rock' }, { u 'frequency': 0.99646542152360207, u 'name': u 'pop' }, { u 'frequency': 0.90801905502131963, u 'name': u 'indie' }, { u 'frequency': 0.90586455490260576, u 'name': u 'indie rock' }, { u 'frequency': 0.8968907243373172, u 'name': u 'alternative' }, [...] { u 'frequency': 0.052197425644931635, u 'name': u 'easy listening' }], u 'description': [], u 'seed_songs': [], u 'banned_artists': [], u 'rules': [{ u 'rule': u "Don't put two copies of the same song in a playlist." }, { u 'rule': u 'Give preference to artists that are not already in the playlist' }], u 'session_id': u '9c1893e6ace04c8f9ce745f38b35ff95', u 'seeds': [u 'ARI4XHX1187B9A1216', u 'ARNCHOP121318C56B8'], u 'skipped_songs': [], u 'banned_songs': [], u 'playlist_type': u 'artist-radio', u 'seed_catalogs': [], u 'rated_songs': [], u 'history': [{ u 'artist_id': u 'ARN6QMG1187FB56C8D', u 'artist_name': u 'Laura Marling', u 'id': u 'SOMSHNP12AB018513F', u 'served_time': 1291412277.204201, u 'title': u 'Hope In The Air' }] } >>> p.session_info() (same result as above) >>>
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Dec 12 11:24:23 2012 | http://epydoc.sourceforge.net |