Exemple #1
0
 def spotify_player(self, trackid):
     with open('/home/pi/.trackqueue.json', 'r') as input_file:
         tracks = json.load(input_file)
     print(tracks[trackid])
     fullurl, urlid = youtube_search(tracks[trackid])
     audiostream, videostream = youtube_stream_link(fullurl)
     streamurl = audiostream
     self.media_player(streamurl)
Exemple #2
0
 def deezer_player(self, trackid):
     with open('{}/.trackqueue.json'.format(USER_PATH), 'r') as input_file:
         tracks = json.load(input_file)
     print(tracks[trackid])
     urlid = youtube_search(tracks[trackid])
     if urlid is not None:
         fullurl = "https://www.youtube.com/watch?v=" + urlid
         audiostream, videostream = youtube_stream_link(fullurl)
         streamurl = audiostream
         self.media_player(streamurl)
Exemple #3
0
 def spotify_player(self,trackid):
     with open('/home/pi/.trackqueue.json','r') as input_file:
         tracks= json.load(input_file)
     print(tracks[trackid])
     urlid = youtube_search(tracks[trackid])
     if urlid is not None:
         fullurl = "https://www.youtube.com/watch?v=" + urlid
         audiostream, videostream = youtube_stream_link(fullurl)
         streamurl = audiostream
         self.media_player(streamurl)