I was not sure how to even search the forum for my issue to see if other people have had this so I am sorry if this has been discussed.
Background
I am running a DVR post-processing script to transcode DVR files to h264, extract subtitles, etc. Everything with my script is working fine, however, Plex does not seem to like the new files I create.
My script does leave the original recording as I know Plex doesn’t like when you delete that, and I thought that Plex would simply move all the files within the .grab/randomhash/
directory to where it wants to put them, however that is not what is happening
The problem
From looking at the logs (see below), Plex moves the first file it finds in the .grab/randomhash/
directory correctly; in this case a .srt
file my script created. However, when it goes to move the next file from the grab directory, a .mp4
file, Plex tries to put it in a directory in the destination with the name of the .srt
file. This issue is further compounded with the last file, the .ts
file, which Plex tries to put in a directory tree of srt_file.srt/mp4_file.mp4/
.
Seems like the output directory is changed to the location where the file is to be moved, which would mean the next file to be moved would go in a directory with the name of the last moved file. Pretty easy mistake to do coding wise (have done it myself), so shouldn’t be too hard to fix.
Version info
- Plex server Version 1.15.3.858
- Raspbian GNU/Linux 9 (stretch)
- Raspberry Pi 3 Model B
Log info
Apr 06, 2019 15:58:24.237 [0x57afc450] DEBUG - DVR:Grabber: Postprocessing, we're going to put `Monster Truck Adventures - Episode` in `/mnt/Media_6TB/TV Shows/Monster Truck Adventures (2013)/Season 2019/Monster Truck Adventures (2013) - 1900-01-01 00 00 00 - Episode.ts`
Apr 06, 2019 15:58:24.237 [0x57afc450] DEBUG - DVR:Grabber: Moving "/mnt/Media_6TB/TV Shows/.grab/834c1748377f77ef5f8bac5bb3b2ee9dcff6d294/1900-01-01 00 00 00 - Episode.480p.x264.EN_AAC..0.srt" to "/mnt/Media_6TB/TV Shows/Monster Truck Adventures (2013)/Season 2019/1900-01-01 00 00 00 - Episode.480p.x264.EN_AAC..0.srt"
Apr 06, 2019 15:58:24.238 [0x57afc450] DEBUG - DVR:Grabber: Moving "/mnt/Media_6TB/TV Shows/.grab/834c1748377f77ef5f8bac5bb3b2ee9dcff6d294/1900-01-01 00 00 00 - Episode.480p.x264.EN_AAC..mp4" to "/mnt/Media_6TB/TV Shows/Monster Truck Adventures (2013)/Season 2019/1900-01-01 00 00 00 - Episode.480p.x264.EN_AAC..0.srt/1900-01-01 00 00 00 - Episode.480p.x264.EN_AAC..mp4"
Apr 06, 2019 15:58:24.238 [0x57afc450] ERROR - Couldn't rename file "/mnt/Media_6TB/TV Shows/.grab/834c1748377f77ef5f8bac5bb3b2ee9dcff6d294/1900-01-01 00 00 00 - Episode.480p.x264.EN_AAC..mp4" to "/mnt/Media_6TB/TV Shows/Monster Truck Adventures (2013)/Season 2019/1900-01-01 00 00 00 - Episode.480p.x264.EN_AAC..0.srt/1900-01-01 00 00 00 - Episode.480p.x264.EN_AAC..mp4": Not a directory
Apr 06, 2019 15:58:24.238 [0x57afc450] DEBUG - DVR:Grabber: Moving "/mnt/Media_6TB/TV Shows/.grab/834c1748377f77ef5f8bac5bb3b2ee9dcff6d294/Monster Truck Adventures (2013) - 1900-01-01 00 00 00 - Episode.ts" to "/mnt/Media_6TB/TV Shows/Monster Truck Adventures (2013)/Season 2019/1900-01-01 00 00 00 - Episode.480p.x264.EN_AAC..0.srt/1900-01-01 00 00 00 - Episode.480p.x264.EN_AAC..mp4/Monster Truck Adventures (2013) - 1900-01-01 00 00 00 - Episode.ts"
Apr 06, 2019 15:58:24.238 [0x57afc450] ERROR - Couldn't rename file "/mnt/Media_6TB/TV Shows/.grab/834c1748377f77ef5f8bac5bb3b2ee9dcff6d294/Monster Truck Adventures (2013) - 1900-01-01 00 00 00 - Episode.ts" to "/mnt/Media_6TB/TV Shows/Monster Truck Adventures (2013)/Season 2019/1900-01-01 00 00 00 - Episode.480p.x264.EN_AAC..0.srt/1900-01-01 00 00 00 - Episode.480p.x264.EN_AAC..mp4/Monster Truck Adventures (2013) - 1900-01-01 00 00 00 - Episode.ts": Not a directory