Sonarr not finding extracted files in a subfolder


#1

Hello,
Sometimes when downloading through torrents, the files are a succession of rar files, so the video file is not available right after the download.

It is possible to extract manually or automatically (rutorrent has a feature that does it after the torrent has finished downloading) and run manual import, and that’s fine.

But I think that it could be simply automated by doing a recursive search through all directories in the initial dir rather than only checking the dir contents itself. Maybe adding an option to enable the feature and doing it after the “simple” search.

Not sure I’m clear but hope I am :slight_smile:


#2

This info isn’t provided by the API.
It should be in the filename then you will be able to ignore them…
Personally I completely ignore trackers that allow rar files for media files.


#3

I’m not sure you have understood what I was saying. In my case when rutorrent extracts the file it creates a new directory in the download directory.

So at first you have
/download_dir/
With like for example your latest Linux distribution in rar files
Then when the torrent has finished downloading, rutorrent extracts the rar in /download_dir/download_dir/.
So a simple option for recursive search would be enough, no need to get the info from the API.
I believe it can be done after the regular search, in the case where sonarr wouldn’t be able to find the file in the first sweep. Then it does a recursive search, finds there is another directory and searches for the file in it.
Or it can try to detect if there is rar files in the directory, then do a recursive check.
IMO there is no need to get the info directly from the downloader since sonarr knows where the torrent is being downloaded (at least it does with rtorrent).


#4

Hmm didn’t know that sonarr didn’t do that.


#5

Sonarr uses the path reported by the download client to find files, if the files are extracted within the path Sonarr gets from the client and they’re named in a way Sonarr can process then it won’t be a problem. If you’re having a specific problem then we’ll need the usual information to troubleshoot, version info, OS info, debug logs (everything we ask for when opening a support thread).

One potential issue is extracting takes time, if a season pack is RARed Sonarr may try to import before all files are extracted and the remaining files will be ignored, this is because Sonarr has no information from the download client that an extracting is taking place.


#6

Yes I thought about the extracting time, and that Sonarr indeed has no way of knowing that.
When you say “if the files are extracted within the path” you do include any subdirectories right? Since like I said, the files are extracted in a subdir, and not in the current dir.
I have a doubt because when I go into the queue and that I see the downloads yellow icon that say that Sonarr cannot find any file in the directory, there is also a button for manual import and clicking on it, when the rar have been extracted, only says that there is no files in the directory.


#7

If your client reports the path C:\Downloads\Series.Title.S01E01.WEB.h264-Sonarr and the files are in C:\Downloads\Series.Title.S01E01.WEB.h264-Sonarr\extracted (or any subfolder within C:\Downloads\Series.Title.S01E01.WEB.h264-Sonarr) Sonarr should have no problem finding it, if it’s off in another folder then Sonarr won’t.

Sounds like they’re not in the folder reported by the download client, but if you have a concrete example that’d be helpful.


#8

Here’s one example: https://i.imgur.com/wcm0bZg.png
And of course, the mkv file is in the subdirectory, perfectly named for Sonarr to recognize it.
I don’t have one in Sonarr UI but hopefully I can have one by next week.


#9

Okay, we’ll also need the information I mentioned before:

Sonarr version (exact version):
Mono version (if Sonarr is not running on Windows):
OS:
Debug logs:
Description of issue:

(Upload the logs somewhere and link them here).

Enable trace logging instead of debug, that way we’ll also get some more information in the response from the client.

The output from dir /s /b from the folder reported to Sonarr will also help.


#10

if the download client is setup correctly it will do the unrar/unzip before flagging the job as completed

you should never unrar/unzip to the root download location as that would allow the overwriting of existing files (or a failure to unrar), you always unrar in the job folder

the only reasons sonarr would fail on a job that required unrar would be that it was unrared outside the job folder (in which case you can do a manual import), or the job was flagged as completed before it was handed off to the unrar task and it hadnt finished unraring before sonarr ran the import

which download client are you actually using? and is it configured to do the unrar or is that done by something else?


#11

Valid point. Sadly the built-in extraction feature in rutorrent UI does not allow for such configuration.

I never said that the extraction was done in the download directory, I said it is done in a subdirectory of it.


#12

I’m not aware of any torrent client that waits for unrarring to complete before marking the download as complete, in most clients that functionality comes via a plugin that isn’t integrated the same way it is in usenet clients.


#13

Hey Markus,

I had the issue with an episode from an old serie. Episode is The Get Down - S01E11, but the issue is also seen with Bobs.Burgers.S09E11.

Sonarr version : 2.0.0.5252
Mono Version : 5.16.0.220
OS : Ubuntu 16.04
Debug logs: https://pastebin.com/Nq0T0tbV (expires in 2 weeks)
Directory listing: https://pastebin.com/YViJiPsh


#14

According to the logs, Sonarr can’t access the directory where the file is at all:

19-1-7 23:44:46.1|Error|DownloadedEpisodesImportService|Import failed, path does not exist or is not accessible by Sonarr: /sdh/0072/downloads/tv/The.Get.Down.S01E11.720p.WEBRip.X264-DEFLATE

Looks like the user running Sonarr doesn’t have access to that directory.


#15

Oh, I understand now. Problem is that the path reported by rutorrent does not exist from sonarr POV.
It seems to be chrooted to /downloads directly.
I can’t really do anything about it sadly since I don’t have full access to the machine :confused:

Well thank you for your help, I don’t really see what could be done about it!


#16

Use a remote path mapping in Sonarr to remap the path reported by rutorrent to one that Sonarr can actually access.


#17

I’ve done that, I will check if it resolves the issue


#18

Hey, just writing to say it solved the issue. Thanks for the help!


closed #19

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