Problem with importing (MP4 automator)

I use MP4 automator (https://github.com/mdhiggins/sickbeard_mp4_automator) to convert a lot of my downloaded shows. It works quite well for most of my content, but there are some exceptions and I can’t quite figure out why. I have isolated an example of a Jeopardy episode and included the Sonarr debug logs below:

17-12-12 15:14:29.0|Debug|Parser|Parsing string 'www.SceneTime.com - Jeopardy.2017.12.11.720p.HDTV.x264-NTb-convert’
17-12-12 15:14:29.0|Debug|Parser|Episode Parsed. www SceneTime com - Jeopardy - 2017-12-11
17-12-12 15:14:29.0|Debug|Parser|Language parsed: English
17-12-12 15:14:29.0|Debug|QualityParser|Trying to parse quality for www.SceneTime.com - Jeopardy.2017.12.11.720p.HDTV.x264-NTb-convert
17-12-12 15:14:29.0|Debug|Parser|Quality parsed: HDTV-720p v1
17-12-12 15:14:29.0|Debug|Parser|Release Group parsed: convert
17-12-12 15:14:29.0|Debug|DownloadedEpisodesImportService|Unknown Series www.SceneTime.com - Jeopardy.2017.12.11.720p.HDTV.x264-NTb-convert

It almost looks like it cannot find the proper episode to match to because of the folder name. Is this the issue? Is there a possible solution for this?

I can use the manual import feature and navigate to that folder on my computer and it works, but it doesn’t seem to work automatically for some reason.

Yes, the folder name has www.SceneTime.com at the start which Sonarr thinks is part of the series name (since it has no way to know it isn’t). Sonarr does some clean up when importing, but that pattern is not removed, it’d need to be cleaned up for Sonarr to import it.

Hmmm, interesting. Can you think of any work around for this, whether it be Sonarr, or maybe uTorrent? Jeopardy is pretty limited on torrent providers so I don’t know if grabbing a different torrent is an option.

If you can run a script in utorrent after download to rename it, that may work.

Ya that could be an option. Only thing about that is I already have a program running upon completion as part of the MP4 automator. Is it possible to run 2 different programs? One to rename it first, then the MP4 automator one second?

I appreciate your help with this, I know it’s not really a Sonarr issue technically.

You could have a script to rename that then calls MP4 Automator (just a simple script to chain things together).

I like the sounds of that, seems like it is worth a shot. Right now I’m running this program:

“C:<>\uTorrentPostProcess.py” “%L” “%T” “%D” “%K” “%F” “%I” “%N” and the details of that file are here:
https://github.com/mdhiggins/sickbeard_mp4_automator/blob/master/uTorrentPostProcess.py

I’m assuming the renaming would be using Filebot and I’ve used this script before:
filebot -script fn:amc --output “path” --log-file amc.log --action copy --conflict override -non-strict --def “ut_dir=%D” “ut_file=%F” “ut_kind=%K” “ut_title=%N” “ut_label=%L” “ut_state=%S”

How would I go about combining these? I have some understanding, but I am not extremely knowledgeable about this kind of stuff.

I don’t think you’d even need to use filebot, just a simple replace in the filename would suffice. Not sure what the best way to add it to that script is though. Probably somewhere where the output filename is set.

If you are talking about this part:

if settings.uTorrent[‘convert’]:
# Check for custom uTorrent output_dir
if settings.uTorrent[‘output_dir’]:
settings.output_dir = settings.uTorrent[‘output_dir’]
log.debug(“Overriding output_dir to %s.” % settings.uTorrent[‘output_dir’])

The attribute comes from a config file and I’m not sure how I can specify the proper folder/file name for each torrent.
The default config file is here:

Although you think it might not be best to use filebot, would there be a way to do it and then call this python postprocess file?

I think you’d want to scan the path (where the files are converted to it looks like) and rename the files in there:

Not 100% sure though, maybe this is worth a feature request to SB_mp4_automator to allow for removing things from the filename before import.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.