I’ve run into a quandary: because Plex no longer writes DVR recordings as MKVs, the metadata Plex creates is lost when the filename changes from a .TS file to a .MKV following conversion. If I use MCEBuddy to rename the files, because they pull from different data sources, I often get incorrect results (i.e., Using Season 4 vs season 2017 for @Midnight, though that won’t be much of a problem for too much longer, sniff).
I can preserve the metadata if I invoke MCEBuddy via the postprocessing script option. I’ve got that working, but it creates a new problem for me: right now I make the determination on if a recording should be run through comskip by virtue of where the recording is made (TV vs TV-Commercials). MCEBuddy has a handy-dandy ability to restrict the execution of a particular profile by file monitored location. I don’t seem to have that ability when I invoke it via the script.
Is there a way to selectively run recordings through Comskip via the postprocessing option?
For reference, Plex DVR provides the following:
The script runs in whatever directory you have placed it.
DVR Post processing simply calls your script and passes it a single variable of the full path and filename of the recorded video in the .grab processing folder. That variable (file name) can be referenced in your script with standard input variable names:
So anywhere in your script where you need to refer to the full path and filename you can use the standard variable. You can also use standard modifiers to refer to pieces of the drive/path/filename with or without the extension:
%~d1 = drive only
%~p1 = path only
%~n1 = filename only without path or extension
In Windows %1 should not be in quotes, but you’ll need to quote any partial reference as the path/filename will have spaces in it.