Movie Info During Playback

pull/15/head
DiMartinoXBMC 2016-12-15 23:50:35 +03:00
parent 6d7a8945cc
commit 032fca5f95
5 changed files with 60 additions and 8 deletions

View File

@ -519,6 +519,10 @@ class AnteoPlayer(xbmc.Player):
listitem.setThumbnailImage(urllib.unquote_plus(thumbnail)) listitem.setThumbnailImage(urllib.unquote_plus(thumbnail))
self.display_name = label self.display_name = label
if self.get('listitem'):
listitem = self.get('listitem')
listitem.setPath(url)
player = xbmc.Player() player = xbmc.Player()
player.play(url, listitem) player.play(url, listitem)

View File

@ -1491,8 +1491,8 @@ class Core:
self.__settings__.setSetting("lastTorrent", torrent.saveTorrent(url)) self.__settings__.setSetting("lastTorrent", torrent.saveTorrent(url))
if fileIndex==None: fileIndex = chooseFile(torrent.getContentList()) if fileIndex==None: fileIndex = chooseFile(torrent.getContentList())
if fileIndex: if fileIndex:
self.playTorrent({'url': fileIndex}) item = get_item()
#xbmc.executebuiltin('xbmc.RunPlugin("plugin://plugin.video.torrenter/?action=playTorrent&url='+fileIndex+'")') self.playTorrent({'url': fileIndex, 'listitem': item})
def openTorrent(self, params={}): def openTorrent(self, params={}):
get = params.get get = params.get

View File

@ -499,9 +499,12 @@ class InposPlayer(xbmc.Player):
self.display_name = label self.display_name = label
log(self.display_name) log(self.display_name)
if self.get('listitem'):
listitem = self.get('listitem')
listitem.setPath(url)
player = xbmc.Player() player = xbmc.Player()
player.play(url, listitem) player.play(url, listitem)
#xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)
xbmc.sleep(2000) # very important, do not edit this, podavan xbmc.sleep(2000) # very important, do not edit this, podavan
i = 0 i = 0

View File

@ -338,12 +338,12 @@ class TorrentPlayer(xbmc.Player):
response = json.loads(request) response = json.loads(request)
xbmc.sleep(1000) xbmc.sleep(1000)
if self.get('listitem'):
listitem = self.get('listitem')
listitem.setPath(path)
if response: if response:
xbmc.Player().play(path, listitem) xbmc.Player().play(path, listitem)
#playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
#playlist.clear()
#playlist.add(path, listitem)
#xbmc.Player().play(playlist)
xbmc.sleep(2000) # very important, do not edit this, podavan xbmc.sleep(2000) # very important, do not edit this, podavan
i = 0 i = 0

View File

@ -2202,4 +2202,49 @@ def getTorrentClientIcon():
elif client == '4': elif client == '4':
return 'qbittorrent.png' return 'qbittorrent.png'
else: else:
return 'torrent-client.png' return 'torrent-client.png'
def get_item():
#some plugin.video.quasar magic
item = xbmcgui.ListItem(
path='',
label=xbmc.getInfoLabel("ListItem.Label"),
label2=xbmc.getInfoLabel("ListItem.label2"),
thumbnailImage=xbmc.getInfoLabel("ListItem.Art(thumb)"))
_infoLabels = {
"Title": xbmc.getInfoLabel("ListItem.Title"),
"OriginalTitle": xbmc.getInfoLabel("ListItem.OriginalTitle"),
"TVShowTitle": xbmc.getInfoLabel("ListItem.TVShowTitle"),
"Season": xbmc.getInfoLabel("ListItem.Season"),
"Episode": xbmc.getInfoLabel("ListItem.Episode"),
"Premiered": xbmc.getInfoLabel("ListItem.Premiered"),
"Plot": xbmc.getInfoLabel("ListItem.Plot"),
# "Date": xbmc.getInfoLabel("ListItem.Date"),
"VideoCodec": xbmc.getInfoLabel("ListItem.VideoCodec"),
"VideoResolution": xbmc.getInfoLabel("ListItem.VideoResolution"),
"VideoAspect": xbmc.getInfoLabel("ListItem.VideoAspect"),
"DBID": xbmc.getInfoLabel("ListItem.DBID"),
"DBTYPE": xbmc.getInfoLabel("ListItem.DBTYPE"),
"Writer": xbmc.getInfoLabel("ListItem.Writer"),
"Director": xbmc.getInfoLabel("ListItem.Director"),
"Rating": xbmc.getInfoLabel("ListItem.Rating"),
"Votes": xbmc.getInfoLabel("ListItem.Votes"),
"IMDBNumber": xbmc.getInfoLabel("ListItem.IMDBNumber"),
}
infoLabels = {}
for key, value in _infoLabels.iteritems():
if value:
infoLabels[key] = value
poster = xbmc.getInfoLabel("ListItem.Art(poster)")
if not poster:
poster = xbmc.getInfoLabel("ListItem.Art(tvshow.poster)")
item.setArt({
"poster": poster,
"banner": xbmc.getInfoLabel("ListItem.Art(banner)"),
"fanart": xbmc.getInfoLabel("ListItem.Art(fanart)")
})
item.setInfo(type='Video', infoLabels=infoLabels)
return item