Not sure if this is a feature request or a support request, but I find it very frustrating that Sonarr doesn’t appear to touch the parent show’s folder when new episodes are added. This results in the parent show’s folder being modified potentially weeks ago, even though there is an episode added just last night. Since I tend to look at my show folder ordered by date in order to see what’s new and available for watching, this means I have no way to easily tell if I got anything new.
I’m on OSX so maybe other OSes handle this differently, but apparently (and somewhat understandably) the Mac only considers the actual file contents of a folder when considering if the folder has changed. Changing the contents of a folder within a folder, will update only the modified date of the sub-folder. I believe a simple touch of the parent folder when contents have been altered would be enough to update the modified date, and it would be a tremendously useful thing for anyone who does as I do, and sorts their shows directory by date in order to see “what’s on”.
If there’s already some better way to deal with this, I’m all ears! Thanks.
Interesting. How would I actually create such a script though? There’s variables listed on that page but no code examples or anything to point me to what language(s) to use, etc. Applescript? Automator?
If you’re aiming at touch folders then I guess the script should be in bash.
I only use bash for my sonarr scripts one for remove source file and other one for sending telegram notifications.
I know other users use python for scripts.
Now that it’s been running for more than a day, I see that it does not always work. Sometimes the script fails to touch the series parent directory. Any idea why that might happen?
I’m waiting on the show to download to see what happens, but in the meantime… why am I seeing piles of these errors?
Import failed, path does not exist or is not accessible by Sonarr: /Volumes/Media1/Complete Media/The.Player.2015.S01E08.HDTV.x264-FLEET
It’s for all different shows, and all shows that have been previously downloaded and move to my “series” folder. Those episodes aren’t in the location above and they shouldn’t be, as Sonarr has already long since moved them. I have DF turned completely off (set to zero and no path) so why is it automatically trying to import things from that location every minute??
Did Sonarr move them? Or were they moved by something else? It has nothing to do with Drone Factory, they’re coming from your download client and Sonarr doesn’t see them as imported (in its history), so its trying to import them.
ApplicationName='/Users/media/Documents/'
What did you set the custom script to, looks like its set to a folder, not something to actually execute.
The files would only ever have been moved by Sonarr.
Yeah Sonarr wouldn’t allow me to select the file, so I thought I was supposed to choose the directory. script.sh doesn’t appear in the file selection “dialog” in Sonarr when I tell it what script to execute.
At the moment the sonarr file browser doesn’t let you pick up files, just folder. So pick up the top folder where the script is, and after the slash type the name of the script. Leave the arguments field empty
Ahhhh that explains it. I figured it worked by just picking the top folder, since the “test” passed fine. I’ve manually typed in the script filename now, let’s see if that does the trick.
The strange part is that it worked several times. Seems like it would either work always, or not at all. Weird.
So, now Sonarr is failing to import the show at all after it’s downloaded. The episode is sitting there in my “completed” folder but never gets brought into Sonarr.
Also I still get lots of this error for shows which have long since been downloaded, imported, watched, and deleted:
Import failed, path does not exist or is not accessible by Sonarr: /Volumes/Media1/Complete Media/The.Player.2015.S01E08.HDTV.x264-FLEET
No, Media1 is a locally mounted drive on the server where Sonarr lives.
The script is definitely not executing, just watched as Sonarr downloaded a new episode of a show, properly imported it, and the parent folder was not touched. I then realized that the user’s /Documents folder was only executable to the user, and I’m not sure what user Sonarr runs as, so I made it executable for all, but it still doesn’t work.
I also still get loads of those errors for shows that are long gone. And I just re-downloaded an episode I’d already watched and deleted, in order to test the custom script handling, and Sonarr didn’t even import the episode at all let alone run the custom script.