Keeping lower resolutions

I have been using SickBeard/Rage for filling TV series and getting new episodes of TV series I’m following. I just noticed something I really DON’T like at all with Sonarr.

I downloaded an episode last night of one of the newly aired episodes, and Sonarr named it correctly and added the resolution to the name of the file as I set it up to do. Today, if found a higher resolution, which is good, as I keep several resolutions on hand already to support users of my Plex Media server streaming remotely.

Well, after this second download happened, it renamed the file, moved it into the folder that the series is kept in and then deleted the first version it downloaded last night.

This is NOT acceptable behavior. I want to keep the lower resolution for the remote users that stream from Plex to be streaming, and I want the higher resolutions for myself or anyone streaming locally to the server. How can this be done with Sonarr? It shouldn’t delete ANYTHING I don’t give it express permissions to delete, but still find the higher resolutions I’m looking for.

Do I need to set something else in the options to make sure this no longer happens? In some cases I have 2 or even 3 different resolutions of the same episodes. (1080, 480 and SD) I don’t want to lose several months of work getting all of these resolutions just to have Sonarr delete it all…

Sonarr will only keep one copy of the file, if you want something different you’ll need to use something else to sort the files (and tell Sonarr to rescan the series folder) or use a Custom Script to make a hardlink in another location on disk.

Keeping multiple copies is something we’re considering, but we’re a long way from implementing it:

That’s too bad. I was liking the way Sonarr could automate my downloading. Without retaining the smaller resolution files it’s basically worthless to me in my environment. This request from GitHub is over 2 years old, so obviously someone else has thought of this before me. And just as obvious, others have a use case as I do.

A simple check box for retaining lower resoltuions and then a check in the code for a “True” or “False” and this whole thing could easily be resolved. Maybe not elegant but workable. And it’s already taken 2 years+ to not see such a simple to add function that could add a lot of functionality.

If you really wanted to get fancy with the feature, add check boxes on the right side of each resolution in the profiles, saying to retain those with a check on the right side, delete the ones without the check mark. Simple, elegant and very workable. And likely not a lot of coding required, as it’s just a few lines testing for the true or false. Oh well, I guess I’ll have to find something else to help with the downloads.

I was fully prepared to donate to this app. It’s a good thing I saw this activity before I did. I would have been furious to lose days of remuxing my media to lower resolutions for my users to stream. As it is now, I’m just frustrated that this functionality isn’t there.

That’s just a small piece of the puzzle to make this possible, its not a trivial feature or it would be done already.

1 Like

I imagine an ‘on upgrade’ script combined with the ‘recycling bin’ option might be enough to hack together a workaround of sorts…

@markus101 what are the current ramifications for Sonarr if there are more then one version of an episode in a folder? Which one would be detected in a scan, etc?

I may have over-simplified things a bit. It’s been well over 20 years since I’ve written any code. To my mind, though, this is a simple Boolean… Replace, or keep. I don’t know if the episodes on disk are kept in a database, but even then, it’s a simple Boolean, right? Sonarr can delete this file, but not that file. But, as you pointed out, it may not be a trivial matter to put this into the database. Keep this, but don’t keep that… (Seems like it’s just a True/False toggle to me…)

Putting something in a Recycle bin would also likely remove it from my monitored library, so Plex wouldn’t have the visibility, unless it were pointing to the recycle in addition to the base TV Shows folder. And if something is put into a recycle, is it stored by the folder structure it had initially been in? So paths are based on the recycled folder path? /recycled/TV Shows/Game of Thrones/Season 1/…

Or would the file just be dumped there with no folder structure to support it? If there is a folder structure, then there is some potential to this, but if not, none at all. Plex uses the folder name as part of the matching of TV series, just as I suspect Sonarr does based on inputting the 250+ TV series I have Sonarr set up to track for me. If the folders are incorrectly named, the TV series isn’t matched correctly, so the show can’t be added without selecting it from a list of viable options. If Plex can find the options to select from I have to manually match the series, and that’s likely to happen for every file in the set.

In either case, I’m not prepared to waste the efforts I’ve put into making my library to test this. I have way too much time invested making media to support the users I have on my PMS now, to risk losing it all for one application. No matter how well that application appears to be able to do other tasks I want/need. I can kludge my way through it as I have been, without Sonarr if it isn’t able to support what I need done. I’ve been doing that for well over 2 years now, anyway.

As I stated before, it’s rather obvious that others are wanting the same thing, if there was a feature request from 2 years ago, already in the system. Now it’s a matter of if there is enough priority to make this happen. Since there aren’t a lot of people doing what I’m doing, probably not very high of a priority at all…

There are a lot of great features with Sonarr. This one thing is the only reason I can’t use it for my own library.

The recycle bin does not use the folder structure for an upgraded episode, but Plex will not loose track of the episode since it has been replaced by it’s upgraded copy.

I’m imagining using the script to move the file that has been upgraded back from the recycle folder into it’s original season folder. Something you could easily do now, manually.

Obviously, naming files with their qualities would aid with this sort of workaround to avoid name collisions, however knowing which episode Sonarr ‘sees’ when it scans and multiple copies exist is critical for this concept; it if picks up on the lower quality again despite the upgrade then it could attempt to upgrade again, etc.

[In my quick and dirty testing, it seems Sonarr keeps track of the highest quality version available, which means this could work, but I’d prefer confirmation of that.]

They are, so its not a simple boolean, its that plus everything else that currently assumes there is one file and how to deal with upgrades. There is a lot of things that would need to be tested to make sure it works as expected for all cases.

Others definitely want it, but its small number of our overall users. Its lower priority for us and with hundreds of feature requests and only a few developers working part time things take a while to get implemented.

That should be the case, refreshing with two files in there will confirm, I know if there are two equal quality episodes there Sonarr will bounce back and forth between them.

Since you are using Plex, the new “Optimized Versions” option may be helpful to you.

I would be inclined to agree, if the feature actually did a quality conversion. Or had options that I could set to make higher quality versions. As it is now, the OM feature uses the same default settings that the on-demand transcoder does, so action scenes are chunky/blocky/pixelated. All in all, doing the conversion outside of Plex produces a smaller and higher quality conversion than you can get with either OM or straight up transcoding in PMS. Which is why I prefer not to use Plex’s built in transcoding if I can avoid it.

I would likely need to maintain 2 complete folder structures, too, because I think Sonarr would see these “Plex Version” conversions and delete them as well. I’m on that forum a lot, and a big proponent to using OM, and Direct Play in particular. It was the only way I could make Plex work for me with my original NAS as it’s CPU was just too under-powered for any transcoding. So I had to convert all of the media I had to a Direct Play format rather than keep it in the original downloaded file.

I’ve looked at the on-upgrade script idea, but I don’t see a place to put any scripts within my NASes Sonarr installation. And then I think I would need some serious help putting something like this together, as well. I wouldn’t have a clue how to do it. There isn’t a folder path that I can see where the script should go, nor any sort of writing guide.

For right now, I’m going to use the recycle bin idea, without a script. Then manually move the files after the upgrade. A lot more hands on than I could hope for… I’m using the NZBDrone folder for importing shows into my library and that works well…

Sonarr finds missing episodes and send them to SABnzb. SABnzb downloads them and puts them into a folder that my conversion scripts watch. The conversion scripts automatically convert the media to MP4, H264 with AAC and AC3 audio (if there is supporting audio for it) and put into an NZBDrone folder. Sonarr finds the files there, imports them to the media folder structure and Plex automatically sees the new media and adds it to the library. Everything is working great, right now, except this multiple resolutions of the files issue.

Enrique.

Can you please give details as to this script and how to set it up .

SABnzb downloads them and puts them into a folder that my conversion scripts watch. The conversion scripts automatically convert the media to MP4, H264 with AAC and AC3 audio (if there is supporting audio for it) and put into an NZBDrone folder.

They are basically modifications of the SABnzb+ post processing scripts that are already packaged with that app. These have been modified a bit, so they can be called via a terminal window or through a cron job.

As I didn’t make the modifications myself, I probably shouldn’t have said anything about them. They really belong to the guy that made the modifications, and not to me… I further modified them to make them work on the NAS I use instead of the Windows machines he originally built them for. My modifications were trivial compared to his.

As they are now, they aren’t supported, except by trial and error. And not something I think the original modifier would want to have released.

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