Does 'StartOffset' property in ListItem work?
#1
Sad 
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:

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.Playerxbmc.PLAYER_CORE_AUTO ).play(item['videourl'], listitemwindowed=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.
Reply
#2
*Bump.

This bug is still present in Krypton. 'StartPercent' works like described, but I can't use it without the duration of the video.
Reply
#3
Please make trac ticket for this
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#4
Done: http://trac.kodi.tv/ticket/17006#ticket
Reply
#5
StartOffset is a very internal thing. you specify position at 75 hz.
Reply
#6
(2016-10-25, 08:09)ironic_monkey Wrote: StartOffset is a very internal thing. you specify position at 75 hz.
Could you please explain to me what you mean by that?
Reply
#7
it's a bit too much for me to care to explain when the code does a much better job than i ever could, but https://github.com/xbmc/xbmc/blob/master....cpp#L3072 and https://github.com/xbmc/xbmc/blob/master....cpp#L3153 points out the gnist of it. but i looked a bit closer and https://github.com/xbmc/xbmc/blob/master...m.cpp#L196 seems to take care of that. it expects a floating point number with seconds passed as a string.
Reply
#8
Hello,
I got to testing the StartOffset property after reading about Wimpie's comment on CUE.
I stumbled upon this thread after searching why StartOffset would not work on listitems when played via setResolvedUrl (as video plugin)

I'd like to add that StartOffset property WORKS if the listitem is played from a playlist.
Reply

Logout Mark Read Team Forum Stats Members Help
Does 'StartOffset' property in ListItem work?0