Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: option to search with renamed files #20

Open
Groofster opened this issue Oct 31, 2017 · 4 comments
Open

Feature: option to search with renamed files #20

Groofster opened this issue Oct 31, 2017 · 4 comments

Comments

@Groofster
Copy link

Could you please add the option to search with renamed files ? All the information you need is present in the JSON property 'ralativePath'. The full path can be created with: path + "/" + relativePath

Creating: /path/to/series/season/renamed-filename.ext

@gsemet
Copy link
Owner

gsemet commented Oct 31, 2017

Hello. Can you elaborate your use case. Which json property are you talking about ? Dopplerr react to the "On Download" event of sonarr, taking the filename (in SceneName of the notification json)

@Groofster
Copy link
Author

Hi,

as far as I can tell the event "On Download" fires after the move/rename by Sonarr. Now Dopplerr is not working with the option of renaming the download because Dopplerr is working with the "SceneName" which is the name before renaming.

Making Dopplerr be able to respect renaming a file by Sonarr might be accomplished by using different properties from the posted JSON information. A tcpdump showed me the JSON properties which are posted and I think Dopplerr can be "easily" (sorry, I'm not fluent in python) extended to work with the rename option.

All the information you need is present in the JSON property 'ralativePath'. The full path can be created with: path + "/" + relativePath

@gsemet
Copy link
Owner

gsemet commented Nov 8, 2017

Hello. I have started working on a regular file scanner that performs on background, regularly, to find out all missed files. It will land eventually :) For the moment I only react to the OnDownload event (see an example in https://github.com/Stibbons/dopplerr/blob/master/dopplerr/tests/vectors/sonarr_on_download.json). We can clearly imagine to react to on rename event as well

@Groofster
Copy link
Author

Groofster commented Nov 10, 2017

The following json is what gets posted on a download/upgrade when renaming is enabled in Sonarr:

{
"episodes":[
{
"id":3315,
"episode Number":25,
"seasonNumber":1,
"title":"Finale",
"airDate":"2013-03-17",
"airDateUtc":"2013-03-17T08:30:00Z",
"quality":"SDTV",
"qualityVersion":1,
"releaseGroup":"fqm",
"sceneName":"MasterChef.Australia.The.Professionals.S01E25.Finale.PDTV.x264-FQM"
}
],
"episodeFile":{
"id":1847,
"relativePath":"Season 1/MasterChef The Professionals Australia - S01E25 - Finale.mp4",
"path":"/Series/.downloaded/MasterChef.Australia.The.Professionals.S01E25.Finale.PDTV.x264-FQM/masterchef.australia.the.professionals.s01e25.pdtv.x264-fqm.mp4",
"quality":"SDTV",
"qualityVersion":1,
"releaseGroup":"fqm",
"sceneName":"MasterChef.Australia.The.Professionals.S01E25.Finale.PDTV.x264-FQM"
},
"isUpgrade":false,
"eventType":"Download",
"series":{
"id":71,
"title":"MasterChef The Professionals Australia",
"path":"/Series/MasterChef The Professionals Australia",
"tvdbId":265252
}
}

relativePath is the name of the file after renaming it and is located in the directory path.

So a search could be done with the original filename and info, but the file will be located in: path/relativePath

It seems all the information needed is present in the json to make dopplerr work very nicely with the renaming option enabled in Sonarr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants