def play_artist_radio_track(self, **params): self.play(**params) radio = RdioRadio(self._addon, self._rdio_api) track = radio.next_track() if track: playlist = xbmc.PlayList(xbmc.PLAYLIST_MUSIC) self._add_tracks([track], xbmc_playlist = playlist, extra_queries = {'mode': 'play_artist_radio_track'})
def play_artist_radio_track(self, **params): self.play(**params) radio = RdioRadio(self._addon, self._rdio_api) track = radio.next_track() if track: playlist = xbmc.PlayList(xbmc.PLAYLIST_MUSIC) self._add_tracks([track], xbmc_playlist=playlist, extra_queries={'mode': 'play_artist_radio_track'})
def play_artist_radio(self, **params): artist = params['key'] user = params['user'] if 'user' in params else None radio = RdioRadio(self._addon, self._rdio_api) radio.start_radio(artist, user) track = radio.next_track() if track: playlist = xbmc.PlayList(xbmc.PLAYLIST_MUSIC) playlist.clear() self._add_tracks([track], xbmc_playlist = playlist, extra_queries = {'mode': 'play_artist_radio_track'}) xbmc.Player().play(playlist)
def play_artist_radio(self, **params): artist = params['key'] user = params['user'] if 'user' in params else None radio = RdioRadio(self._addon, self._rdio_api) radio.start_radio(artist, user) track = radio.next_track() if track: playlist = xbmc.PlayList(xbmc.PLAYLIST_MUSIC) playlist.clear() self._add_tracks([track], xbmc_playlist=playlist, extra_queries={'mode': 'play_artist_radio_track'}) xbmc.Player().play(playlist)
def play_artist_radio(self, **params): artist = params['key'] user = params['user'] if 'user' in params else None radio = RdioRadio(self._addon, self._rdio_api) track = radio.next_track(params['key'], user = user) if track: playlist = xbmc.PlayList(xbmc.PLAYLIST_MUSIC) playlist.clear() queries = {'mode': 'play_artist_radio_track', 'artist': artist, 'baseArtist': artist} if user: queries['user'] = user self._add_tracks([track], xbmc_playlist = playlist, extra_queries = queries) xbmc.Player().play(playlist)
def play_artist_radio_track(self, **params): self.play(**params) this_artist = params['artist'] base_artist = params['baseArtist'] user = params['user'] if 'user' in params else None radio = RdioRadio(self._addon, self._rdio_api) track = radio.next_track(base_artist, this_artist, user = user) if track: playlist = xbmc.PlayList(xbmc.PLAYLIST_MUSIC) queries = {'mode': 'play_artist_radio_track', 'artist': track['artistKey'], 'baseArtist': base_artist} if user: queries['user'] = user self._add_tracks([track], xbmc_playlist = playlist, extra_queries = queries)
def __init__(self): self._cookie_file = os.path.join('rdio_cookies.txt') self._net = Net(user_agent = getUserAgent(), cookie_file = self._cookie_file) self.debug('Persistent auth state not loaded') self._state = self._INITIAL_STATE self._init_rdio() self.authenticate() radio = RdioRadio(self) radio.start_radio("r139688", None) track = radio.next_track() if track: print "Play" print track['key'] stream_url = self.resolve_playback_url(track['key']) if stream_url: print "Play this" print stream_url
def play_artist_radio(self, artist): radio = RdioRadio(self._rdio_api) radio.start_radio(artist, user)