Thanks Matt
The only issue with the previously proposed code appears to be an errant ] in the wrong place.
I’m using :
if VIDEO_LAYOUT_AUTOSELECT:
if info["VideoPlayer.ChannelName"] != '':
layout = VIDEO_LAYOUT["V_PVR"]
elif info["VideoPlayer.TVShowTitle"] != '':
layout = VIDEO_LAYOUT["V_TV_SHOW"]
else:
pass # leave as-is
My video Infolabels are :
# Retrieve video InfoLabels in a single JSON-RPC call
payload = {
"jsonrpc": "2.0",
"method" : "XBMC.GetInfoLabels",
"params" : {"labels": ["VideoPlayer.Title",
"VideoPlayer.TVShowTitle",
"VideoPlayer.Season",
"VideoPlayer.Episode",
"VideoPlayer.EpisodeName",
"VideoPlayer.PlotOutline",
"VideoPlayer.Plot",
"VideoPlayer.Duration",
"VideoPlayer.Time",
"VideoPlayer.Genre",
"VideoPlayer.Year",
"VideoPlayer.VideoCodec",
"VideoPlayer.AudioCodec",
"VideoPlayer.VideoResolution",
"VideoPlayer.ChannelName",
"VideoPlayer.ChannelNumberLabel",
"VideoPlayer.Rating",
"VideoPlayer.ParentalRating",
"VideoPlayer.Cover",
]},
"id" : 4,
}
I have V_PVR and V_TV_SHOW layouts along with V_DEFAULT in my setup.toml
The only thing I think may be an issue with the ChannelName check is that some channels may have null names - but equally I think a null channel number is also valid. Not sure there is an easy solution and this PVR check works for me. (I use PVR to differentiate between PVR TV Shows and Library TV Shows)