2012-04-17, 20:07
Hi everybody.
I'm creating an add-on for a TV program, and the broadcasting channel doesn't split the upload by content. So, the website has the video file and the starting point of the show inside that video.
I tried Eden-RC2, Eden and git repository (this Sunday, 15th), all compiled at home in a Ubuntu distro.
After reading add-ons tutorials, documentation, source code and XBMC python libraries/XBMC PlayFile implementations, I doubt if it is a bug or I'm doing something wrong.
My code looks something like this:
When I select the item, it ignores the offset and starts at the beginning. I tried numeric values (integers and floats) for 'StartOffset' with identical results.
If I use the property 'StartPercent' instead 'StartOffset', it works correctly.
If, instead adding the item, I play it directly using xbmc.Player, it works:
After lurking in the C++ code, I found that 'StartOffset' is a special case of property, as it is directly stored in 'm_lStartOffset'.
jmarshall answered a thread from hippojay, pointing that it was a bug, as the property was properly set but not used where it's needed, as this post shows.
Is it a bug or am I doing something wrong using this property?
Thanks in advance.
I'm creating an add-on for a TV program, and the broadcasting channel doesn't split the upload by content. So, the website has the video file and the starting point of the show inside that video.
I tried Eden-RC2, Eden and git repository (this Sunday, 15th), all compiled at home in a Ubuntu distro.
After reading add-ons tutorials, documentation, source code and XBMC python libraries/XBMC PlayFile implementations, I doubt if it is a bug or I'm doing something wrong.
My code looks something like this:
PHP Code:
item = {
'name' : 'Chivo lechal asado en su jugo',
'date' : '12.04.2012',
'icon' : 'http://www.canalsuralacarta.es/pictures/17508/picture17508_20120413_120227_crop1sub3.jpg',
'videourl' : 'http://ondemand.rtva.ondemand.flumotion.com/rtva/ondemand/flash8/programas/cometelo/20120411130208-1-3-9-9-0-4-9-4-3-5-8-7-cometelo--martes.flv',
'startv': '653',
}
listitem = xbmcgui.ListItem(
item['name']
item['date'],
iconImage=item['icon'],
thumbnailImage=item['icon'],
path=item['videourl']
)
listitem.setProperty('StartOffset', item['startv'])
print 'OFFSET [%s]' % (listitem.getProperty('StartOffset'),)
xbmcplugin.addDirectoryItem(
thisPlugin,
url=item['videourl'],
listitem=listitem
)
When I select the item, it ignores the offset and starts at the beginning. I tried numeric values (integers and floats) for 'StartOffset' with identical results.
If I use the property 'StartPercent' instead 'StartOffset', it works correctly.
If, instead adding the item, I play it directly using xbmc.Player, it works:
PHP Code:
xbmc.Player( xbmc.PLAYER_CORE_AUTO ).play(item['videourl'], listitem, windowed=False)
After lurking in the C++ code, I found that 'StartOffset' is a special case of property, as it is directly stored in 'm_lStartOffset'.
jmarshall answered a thread from hippojay, pointing that it was a bug, as the property was properly set but not used where it's needed, as this post shows.
Is it a bug or am I doing something wrong using this property?
Thanks in advance.