player.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:plex-for-kodi-mod 作者: mrclemds 项目源码 文件源码
def playAt(self, path, ms):
        """
        Plays the video specified by path.
        Optionally set the start position with h,m,s,ms keyword args.
        """
        seconds = ms / 1000.0

        h = int(seconds / 3600)
        m = int((seconds % 3600) / 60)
        s = int(seconds % 60)
        ms = int((seconds % 1) * 1000)

        kodijsonrpc.rpc.Player.Open(
            item={'file': path},
            options={'resume': {'hours': h, 'minutes': m, 'seconds': s, 'milliseconds': ms}}
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号