Esempio n. 1
0
  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'})
Esempio n. 2
0
    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'})
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
  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)
Esempio n. 6
0
  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)
Esempio n. 7
0
 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		
Esempio n. 8
0
 def play_artist_radio(self, artist):
   radio = RdioRadio(self._rdio_api)
   radio.start_radio(artist, user)