+class VideoFile (Source):
+ PREFIX = "file://"
+ TITLEP = CHAPTERP = False
+
+ def _duration(me, title, start_chapter, end_chaptwr):
+ out = program_output(["mediainfo", "--output=General;%Duration%",
+ OS.path.join(ROOT, me.fn)])
+ return int(out)//1000
+
+class VideoEpisode (VideoFile):
+ def __init__(me, fn, i, *args, **kw):
+ super().__init__(fn, *args, **kw)
+ me.i = i
+
+class VideoDir (SingleFileDir):
+ _EXT = ".mp4"
+ _CHECK_COMPLETE = False
+
+ def _mkepisode(me, path, i):
+ return VideoEpisode(path, i)