Springen naar inhoud


Lid geworden: 25 jan 2014
Offline Laatste activiteit: 11 mrt 2014 08:47

Onderwerpen die ik ben begonnen

Plugin development: get length of timeshift file

7 februari 2014 - 22:30

I'm trying to write a plugin and would like to determine the length (time duration) of the timeshift file.


If timeshift is enabled and I'm "in the past", the service is seekable and I can simply use something like



        service = self.session.nav.getCurrentService()
        seek = service.seek()
        length = seek.getLength()
        return int(length[1]) #pts

Unfortunately this does not work when timeshift is enabled but playing "live" at 0:00 (EOF), then the service is not seekable and the above does not work.


Does anyone have an idea how to get the length (time duration) of the timeshift file if the service is not seekable? - Thanks.