Hi,
I have attempted to use a couple of the scanners here, but unfortunately there seem to be a few issues.
For example, when scanning movies, the year is taken from the E2 timestamp and not the meta info. This causes a mismatch or no match at all.
I decided to go down the route of a solution myself. I approached ti from another angle, whch I have found to be much simpler.
I have modified the RecordTimer.py file in /usr/lib/enigma2/python of the E2 box to create scannable movie and TV show file names that the default plex scanners can work with.
it is only a few lines of code change and so far works well for me. I am running OpenViX 4.1.009.
Iām a java dev by trade, so havenāt used python before, but I think it should all be working. Itās quite rough, but seems stable and does the job for me.
I just made a few changes to ācalculateFilenameā. Below is the code changes I have made:
def calculateFilename(self, name=None):
service_name = self.service_ref.getServiceName()
begin_date = strftime("%Y%m%d %H%M", localtime(self.begin))
desc = self.description
season_and_episode = re.search('[Ss]([0-9]{1,2})(.*)[Ee](.?[0-9]{1,2})', desc.replace(" ", ""))
episode = re.search('[Ee](.?[0-9]{1,2})', desc.replace(" ", ""))
year = re.search('\((\d{4})\)', desc)
display_season_and_episode = ""
display_year = ""
if season_and_episode:
display_season_and_episode = ".S" + season_and_episode.group(1).strip() + "E" + season_and_episode.group(3).replace("p", "").strip()
elif episode:
display_season_and_episode = ".S01E" + episode.group(1).replace("p", "").strip() # Allow for some instances where a season number isn't supplied
if year:
display_year = "." + year.group(1)
name = name or self.name
filename = ""
if name:
if config.recording.filename_composition.value == "event":
filename = name + ' - ' + begin_date + "_" + service_name
elif config.recording.filename_composition.value == "short":
filename = strftime("%Y%m%d", localtime(self.begin)) + " - " + name
elif config.recording.filename_composition.value == "long":
filename += " - " + name + " - " + self.description
else:
filename += name + "" + display_year + "" + display_season_and_episode # standard
if config.recording.ascii_filenames.value:
filename = ASCIItranslit.legacyEncode(filename)
self.Filename = Directories.getRecordingFilename(filename, self.MountPath)
self.log(0, "Filename calculated as: '%s'" % self.Filename)
return self.Filename
NOTE: Make a backup of you E2 image before making any of these changes as you can easily corrupt you image Just extract the python script from the zip file attached and upload if to you box to /usr/lib/enigma2/python. You will need to restart your box for the file to recompile and be usable by the system.