2015-11-11, 10:45
Hey guys, I got another question I'm hoping you guys can help me out with (probably something easy I overlooked again, sorry in advance)
I have this script that controls an external player (chromecast). I got all the controls to work fine, except for the seek slider.
The Problem:
When I click the slider and drag, it starts okay. In the log, I see the new position is set correctly. But then things go haywire. The script keeps seeking to the same position over and over again. i.e. seek to 18 minutes using the slider, chromecast buffers, then starts playing from the new position. But then it seeks to that same position again, buffers again and plays again and so on. It' hard to explain exactly what's going on.
Hoping this will help: I basically have the same problem described by this guy:
Weird Slider behaviour
Here's the original code
The onClick() code for the Seek Slider Control:
The set_Seeked_Position function:
I know this is kind of a long shot. But figured it wouldn't hurt to ask before throwing in the towel lol.
I have this script that controls an external player (chromecast). I got all the controls to work fine, except for the seek slider.
The Problem:
When I click the slider and drag, it starts okay. In the log, I see the new position is set correctly. But then things go haywire. The script keeps seeking to the same position over and over again. i.e. seek to 18 minutes using the slider, chromecast buffers, then starts playing from the new position. But then it seeks to that same position again, buffers again and plays again and so on. It' hard to explain exactly what's going on.
Hoping this will help: I basically have the same problem described by this guy:
Weird Slider behaviour
Here's the original code
The onClick() code for the Seek Slider Control:
PHP Code:
elif controlID == 501:
newSliderPercent = int(self.SLIDER_SEEK.getPercent())
time.sleep(1)
self.set_Seeked_Position(newSliderPercent)
The set_Seeked_Position function:
PHP Code:
def set_Seeked_Position(self, newPercentage):
if self.cc_duration > 0:
# Get the new position in seconds
newPosition = int((float(newPercentage) * float(self.cc_duration)) / 100)
# Now send the seek message to the CC
kodicast.cmc.seek(newPosition)
I know this is kind of a long shot. But figured it wouldn't hurt to ask before throwing in the towel lol.