Jump to content


Member Since 25 Jan 2014
Offline Last Active 11 Mar 2014 08:47

Topics I've Started

Plugin development: get length of timeshift file

7 February 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.