scanner for VDR Recordings
i'm trying to create a Scanner for VDR Recordings. Basics are working as below:
# -*- coding: iso-8859-15 -*- # VDR Recording Scanner # import re, os, os.path, sys, datetime import Media, VideoFiles, unicodedata def Scan(path, files, mediaList, subdirs): if len(files) >= 1: # Iterate through all the files for file in files: print "working on file",file if (file.endswith(".ts")): dir = os.path.dirname(file) infoname = dir + "/info" # later, parse dir to get recording time and date # dir = re.search('^.*/(.*)\.rec',dir).groups(1) # print "dirname:", dir infoFile = open(infoname).read() title = re.search('^T (.*)$', infoFile,re.M) if title: title = title.groups(1) else: title = "" print "found title ", title print "adding movie", (title) movie = Media.Movie(title) movie.source = VideoFiles.RetrieveSource(file) movie.parts.append(file) mediaList.append(movie)
Now my Question is: How do i stack several files ending with .ts into one movie? VDR can be configured to only create files of a certain size. So maybe, one have 10 files in the recording-dir, names would then be 0001.ts, 0002.ts, 0003.ts and so on.
Any Tipps on that?