2010-01-16, 05:55
I am developing a plugin that will act as a client to a custom streaming server I have built. Essentially, I have written a program that publishes my entire XBMC media library in a format that can be served by an http server, along with a plugin that acts as a consumer for it. It is essentially doing the same thing that most people use uPnp for, but it is routable over the internet (primary reason I did it this way) and it also exports nearly ALL information from the library (plot, cast, genre info, thumbnails, fanart, stream info, pretty much everything). I am essentially trying to have the experience of using the plugin be identical to the library view in XBMC, the difference being is the user's local database will not be involved at all, all the data is coming from the indexes being published on the http server for the plugin to consume .
As things are now pretty much everything works. Thumbnails and fanart work, and all the major infolabels are being read successfully, but there is one thing I cannot seem to get to work. I am setting infoLabels for videoResolution, videoCodec, audioCodec, and audoChannels. But when viewing the plugin from within XBMC the media flags are not being displayed...
I realize this is a fairly new feature. I am running the latest release of Camalot. When viewing my local library through the built in library view everything works as expected (the media flags are displayed). But when viewing through my plugin no media flags.
Am I missing something? This is an snippet from my code:
The value of video[ "data" ][ COL_VRES ] in this case is a string, it is either 480, 720, or 1080. And video[ "data" ][ COL_VCODEC ] is divx, xvid, h264, etc. These values are all being set by reading them directly from the streamdetails table in the xbmc video database (I am of course quantitizing the resolution to the acceptable values).
This is my first xbmc plugin, and also my first experience using python. I am an experienced programmer (10 years or so - C, C#, Java, javaScript, etc.). So far the experience has been excellent. I really like python and the xbmc api is very simple to use.
Thanks in advance for any help anyone might offer.
As things are now pretty much everything works. Thumbnails and fanart work, and all the major infolabels are being read successfully, but there is one thing I cannot seem to get to work. I am setting infoLabels for videoResolution, videoCodec, audioCodec, and audoChannels. But when viewing the plugin from within XBMC the media flags are not being displayed...
I realize this is a fairly new feature. I am running the latest release of Camalot. When viewing my local library through the built in library view everything works as expected (the media flags are displayed). But when viewing through my plugin no media flags.
Am I missing something? This is an snippet from my code:
Code:
if (contentType == "movies"):
dirItem.listitem.setInfo( "Video", {
"Title": video[ "data" ][ COL_TITLE ],
"Overlay": overlay,
"Size": long( video[ "data" ][ COL_SIZE ] ),
"Year": safecall(int, 0)( video[ "data" ][ COL_YEAR ] ),
"Plot": video[ "data" ][ COL_PLOT ],
"MPAA": video[ "data" ][ COL_MPAA ],
"Rating": safecall(float, 0.0)( video[ "data" ][ COL_RATING ] ),
"Genre": video[ "data" ][ COL_GENRE ],
"Studio": video[ "data" ][ COL_STUDIO ],
"Director": video[ "data" ][ COL_DIRECTOR ],
"Duration": video[ "data" ][ COL_DURATION ],
"CastAndRole": video[ "data" ][ COL_CAST ].split(','),
"VideoResolution": video[ "data" ][ COL_VRES ],
"VideoCodec": video[ "data" ][ COL_VCODEC ]
} )
The value of video[ "data" ][ COL_VRES ] in this case is a string, it is either 480, 720, or 1080. And video[ "data" ][ COL_VCODEC ] is divx, xvid, h264, etc. These values are all being set by reading them directly from the streamdetails table in the xbmc video database (I am of course quantitizing the resolution to the acceptable values).
This is my first xbmc plugin, and also my first experience using python. I am an experienced programmer (10 years or so - C, C#, Java, javaScript, etc.). So far the experience has been excellent. I really like python and the xbmc api is very simple to use.
Thanks in advance for any help anyone might offer.