addStreamInfo in Frodo
#1
Edit: Err nevermind. It seems to be working now. Sorry I think it was caching something from before.



Does anyone have addStreamInfo working to display the associated icons for audio/video codec, resolutions, channels, etc.

I have been following the documentation from but I can't seem to get it to display. I have been using confluence.

Anyone have this working?

Code:
addStreamInfo(...)
    addStreamInfo(type, values)--Add a stream with details.
    
    type : string - type of stream(video/audio/subtitle). values : dictionary - pairs of { label: value }.
    
    Video Values: codec : string (h264) aspect : float (1.78) width : integer (1280) height : integer (720) duration : integer (seconds)
    
    Audio Values: codec : string (dts) language : string (en) channels : integer (2)
    
    Subtitle Values: language : string (en)
    
    example:
        - self.list.getSelectedItem().addStreamInfo('video', { 'Codec': 'h264', 'Width' : 1280 })

Reply
#2
Having the same issue. Can't get anything to display. What was the trick?

EDIT: The trick was to not follow the code example with Caps and lower case mixes. Using just lower case solved the issue.
Pneumatic | SABnzbd | XBMC that just works - openelec
Reply
#3
In case I doesn't misunderstand something, this doesn't work for me at all. If it add stream info to a listitem, nothing happens, no error, just nothing. All the labels (VideoResolution, VideoCodec etc.) are still empty. Other labels and properties are working fine.
Image
Reply
#4
PHP Code:
# video and audio stream details used by some skins to display flagging
        
stream_details = {
            
"video": {
                
"Standard": {"codec""h264""aspect"1.78"width"720"height"480},
                
"480p": {"codec""h264""aspect"1.78"width"720"height"480},
                
"720p": {"codec""h264""aspect"1.78"width"1280"height"720},
                
"1080p": {"codec""h264""aspect"1.78"width"1920"height"1080}
            },
            
"audio": {
                
"Standard": {"codec""aac""language""en""channels"2},
                
"480p": {"codec""aac""language""en""channels"2},
                
"720p": {"codec""aac""language""en""channels"2},
                
"1080p": {"codec""aac""language""en""channels"2}
            }
        } 

PHP Code:
stream_details["video"][movie[14]]["duration"] = movie[23]
            
dirItem.listitem.addStreamInfo("video"stream_details["video"][movie[14]])
            
dirItem.listitem.addStreamInfo("audio"stream_details["audio"][movie[14]]) 
this works fine in current git.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
This is what FrostBox did in the metadata.actors.script.

PHP Code:
for keyvalue in self.movie"streamdetails" ].items():
    try: 
self.listitem.addStreamInfokeyvalue] )
    
exceptprint_exc() 

self.movie is retrieved using this function
PHP Code:
def get_library_movie_detailsmovieid ):
    
props '["title", "genre", "year", "rating", "director", "trailer", "tagline", "plot",
"plotoutline", "originaltitle", "lastplayed", "playcount", "writer", "studio",
"mpaa", "cast", "country", "imdbnumber", "runtime", "set", "showlink",
"top250", "votes", "streamdetails", "art", "file", "resume"]'
    
json_string xbmc.executeJSONRPC'{"jsonrpc": "2.0", "id":"1", "method":"VideoLibrary.GetMovieDetails",
"params": {"movieid": %s, "properties": %s}}' 
% ( movieidprops ) )
    
json_string unicodejson_string'utf-8'errors='ignore' )
    
result = ( json.loadsjson_string ).get"result" ) or {} )
    return 
result.get"moviedetails" ) or {} 

I don't know what's wrong there and I also tried hardcoding some info with self.listitem.addStreamInfo('video', { 'codec': 'h264', 'width' : 1280 }) but I can't get any info label to display something.
Image
Reply

Logout Mark Read Team Forum Stats Members Help
addStreamInfo in Frodo0