def parseStream(self, data): m2 = re.search('//www.youtube.*?com/(embed|v)/(.*?)(\?|" |&)', data) if m2: dhVideoId = m2.group(2) dhTitle = self.playList[self.playIdx][0] imgurl = self.playList[self.playIdx][2] YoutubeLink(self.session).getLink(self.playStream, self.ytError, dhTitle, dhVideoId, imgurl=imgurl) else: self.dataError("Kein Videostream gefunden!")
def getVideo(self): dhVideoId = self.playList[self.playIdx][1] dhTitle = self.playList[self.playIdx][0] imgurl = self.playList[self.playIdx][2] if not dhVideoId.startswith('http'): YoutubeLink(self.session).getLink(self.playStream, self.ytError, dhTitle, dhVideoId, imgurl=imgurl) else: getPage(dhVideoId).addCallback(self.parseStream).addErrback( self.dataError)
def getVideo2(self): print "getVideo2:" if self.playLen > 0: titel = self.playList2[self.playIdx][1] url = self.playList2[self.playIdx][2] album = self.playList2[self.playIdx][3] artist = self.playList2[self.playIdx][4] if len(self.playList2[self.playIdx]) < 6: ltype = '' else: ltype = self.playList2[self.playIdx][5] if ltype == 'youtube': YoutubeLink(self.session).getLink(self.playStream, self.dataError, titel, url) elif ltype == 'putpattv': token = self.playList2[self.playIdx][6] PutpattvLink(self.session).getLink(self.playStream, self.dataError, titel, url, token) elif ltype == 'myvideo': token = self.playList2[self.playIdx][6] MyvideoLink(self.session).getLink(self.playStream, self.dataError, titel, url, token) elif ltype == 'songsto': #print "songsto",titel,artist,album,token token = self.playList2[self.playIdx][6] SongstoLink(self.session).getLink(self.playStream, self.dataError, titel, artist, album, token) elif ltype == 'canna': #print "canna",titel,artist,album,token token = self.playList2[self.playIdx][6] CannaLink(self.session).getLink(self.playStream, self.dataError, titel, artist, album, url) else: self.playStream(titel, url, album, artist) else: self.close()
def getVideo(self): print "getVideo:" dhTitle = self.playList[self.playIdx][self.title_inr] dhVideoId = self.playList[self.playIdx][2] YoutubeLink(self.session).getLink(self.playStream, self.dataError, dhTitle, dhVideoId)