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

Keep files even if not everything is successfull. #896

Closed
CurlyFlow opened this issue Oct 26, 2023 · 16 comments
Closed

Keep files even if not everything is successfull. #896

CurlyFlow opened this issue Oct 26, 2023 · 16 comments

Comments

@CurlyFlow
Copy link

Is your feature request related to a problem? Please describe.
I have some files where i cant successfull run the whole flow.

I connected them if they fail to keep going, but tdarr currently discards everything anyways.

Describe the solution you'd like
I would like an option to just say, what ever comes out of it, keep it.

@supersnellehenk
Copy link

You can output any error from a block into 'Reset flow error' which would do what you want I believe

@CurlyFlow
Copy link
Author

Would it keep going afterwards?

@HaveAGitGat
Copy link
Owner

Yes, mentioned in the flow error tutorial templates, take a look if you haven't already:
image

@CurlyFlow
Copy link
Author

I thought a little bit about this.

Its a workaround, but not really what i want.

I would like to know when somethings fail, but still keep the files, if i use reset error flow, it thinkts there were no error.

So a "keep files even if error" would be needed.

@HaveAGitGat
Copy link
Owner

@CurlyFlow why would you want to keep the file if it's failed? Often if ffmpeg fails on a file it won't produce anything.

And in that case you can not use 'Reset Flow Error' and continue as normal. The rest of the flow will continue and then at the end the item will be put into the transcode error table in the UI.

Or you can use the 'Copy To Directory' plugin to copy the failed file wherever you'd like.

Best to post your flow (you can export it on the flows tab).

@CurlyFlow
Copy link
Author

If only one plugin fails, i dont see a reason to throw it away.

Like if transcode not work, but it atleast did the sound job, its ok for me.

btw did you fix the notify plugin? :(

That way i have it now, is working, but since i never see any errors, i will never see when a new problem come...

data (2).txt

@HaveAGitGat
Copy link
Owner

HaveAGitGat commented Nov 27, 2023

@CurlyFlow which notify plugin? You don't have it in your flow so you won't get notified. It's the Send Web Request plugin, you need to fill in the details for whichever service you use. There is nothing wrong with that plugin as far as I'm aware, has been working fine. What is the issue?

@CurlyFlow
Copy link
Author

CurlyFlow commented Nov 27, 2023

@CurlyFlow which notify plugin? You don't have it in your flow so you won't get notified. It's the Send Web Request plugin, you need to fill in the details for whichever service you use. There is nothing wrong with that plugin as far as I'm aware, has been working fine. What is the issue?

Its your notify plugin you created... for sonarr it works, but radarr is broken since you created it, didn tgot a response...

edit

25

2023-11-27T20:44:04.169Z LaE3TPwlf:Node[MyInternalNode]:Worker[easy-elver]:Refreshing Radarr...

26

2023-11-27T20:44:04.170Z LaE3TPwlf:Node[MyInternalNode]:Worker[easy-elver]:[-error-]

27

2023-11-27T20:44:04.170Z LaE3TPwlf:Node[MyInternalNode]:Worker[easy-elver]:TypeError: Cannot read properties of undefined (reading 'movieFile')

28

2023-11-27T20:44:04.170Z LaE3TPwlf:Node[MyInternalNode]:Worker[easy-elver]:"Cannot read properties of undefined (reading 'movieFile')"

29

2023-11-27T20:44:04.170Z LaE3TPwlf:Node[MyInternalNode]:Worker[easy-elver]:"TypeError: Cannot read properties of undefined (reading 'movieFile')\n at /app/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/tools/notifyRadarrOrSonarr/1.0.0/index.js:126:42\n at step (/app/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/tools/notifyRadarrOrSonarr/1.0.0/index.js:33:23)\n at Object.next (/app/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/tools/notifyRadarrOrSonarr/1.0.0/index.js:14:53)\n at fulfilled (/app/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/tools/notifyRadarrOrSonarr/1.0.0/index.js:5:58)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"

30

2023-11-27T20:44:04.170Z LaE3TPwlf:Node[MyInternalNode]:Worker[easy-elver]:Flow has failed

@HaveAGitGat
Copy link
Owner

@CurlyFlow thanks, the logic for that plugin is mostly fine but suppose depends on how much the filename is changed as if it's changed too much then Radarr won't recognise the new file.

I've made a small change to the plugin here so it sends the original filename to radarr/sonarr, so hopefully it should work for you:

HaveAGitGat/Tdarr_Plugins#557

But yeah it's quick picky. For example I tried putting the exact movie name in request sent to Radarr and it didn't work, but when putting the gibberish sample filename sample.x264.ac3.mkv it worked.

@CurlyFlow
Copy link
Author

Cant you get an id from radarr and use that?

How to update that? I clicked update plugins under classic plugins and did a restart...

22

2023-11-28T10:07:14.539Z h0hJwpGJU:Node[MyInternalNode]:Worker[valid-vole]:Refreshing Radarr...

23

2023-11-28T10:07:14.539Z h0hJwpGJU:Node[MyInternalNode]:Worker[valid-vole]:[-error-]

24

2023-11-28T10:07:14.539Z h0hJwpGJU:Node[MyInternalNode]:Worker[valid-vole]:TypeError: Cannot read properties of undefined (reading 'movieFile')

25

2023-11-28T10:07:14.540Z h0hJwpGJU:Node[MyInternalNode]:Worker[valid-vole]:"Cannot read properties of undefined (reading 'movieFile')"

26

2023-11-28T10:07:14.540Z h0hJwpGJU:Node[MyInternalNode]:Worker[valid-vole]:"TypeError: Cannot read properties of undefined (reading 'movieFile')\n at /app/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/tools/notifyRadarrOrSonarr/1.0.0/index.js:127:42\n at step (/app/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/tools/notifyRadarrOrSonarr/1.0.0/index.js:33:23)\n at Object.next (/app/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/tools/notifyRadarrOrSonarr/1.0.0/index.js:14:53)\n at fulfilled (/app/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/tools/notifyRadarrOrSonarr/1.0.0/index.js:5:58)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"

27

2023-11-28T10:07:14.540Z h0hJwpGJU:Node[MyInternalNode]:Worker[valid-vole]:Flow has failed

@supersnellehenk
Copy link

Cant you get an id from radarr and use that?

That's exactly what the plugin is trying to do, based off of the original filename. For updating I believe you have to click update, then sync.

@CurlyFlow
Copy link
Author

CurlyFlow commented Nov 28, 2023

Cant you get an id from radarr and use that?

That's exactly what the plugin is trying to do, based off of the original filename. For updating I believe you have to click update, then sync.

Ok, i updatede and then synced, same thing (i would make it one button)

Name is like "The XXX (2023) {imdb-tt123456789}/The XXX [DE+EN] Remux-2160p.mp4"

23

2023-11-28T10:13:23.746Z L2zYREy_t:Node[MyInternalNode]:Worker[yearly-yak]:[-error-]

24

2023-11-28T10:13:23.747Z L2zYREy_t:Node[MyInternalNode]:Worker[yearly-yak]:TypeError: Cannot read properties of undefined (reading 'movieFile')

25

2023-11-28T10:13:23.747Z L2zYREy_t:Node[MyInternalNode]:Worker[yearly-yak]:"Cannot read properties of undefined (reading 'movieFile')"

26

2023-11-28T10:13:23.747Z L2zYREy_t:Node[MyInternalNode]:Worker[yearly-yak]:"TypeError: Cannot read properties of undefined (reading 'movieFile')\n at /app/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/tools/notifyRadarrOrSonarr/1.0.0/index.js:127:42\n at step (/app/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/tools/notifyRadarrOrSonarr/1.0.0/index.js:33:23)\n at Object.next (/app/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/tools/notifyRadarrOrSonarr/1.0.0/index.js:14:53)\n at fulfilled (/app/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/tools/notifyRadarrOrSonarr/1.0.0/index.js:5:58)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"

27

2023-11-28T10:13:23.747Z L2zYREy_t:Node[MyInternalNode]:Worker[yearly-yak]:Flow has failed

@HaveAGitGat
Copy link
Owner

@CurlyFlow it's worth just testing the Radarr API directly. Seems it still can't deal with the file you're giving it (perhaps that specific file is not in Radarr db)

For example add ip, api key and run the following command in a terminal:

curl -X GET "http://192.168.1.1:7878/api/v3/parse?title=test.mkv" \
     -H "Content-Type: application/json" \
     -H "X-Api-Key: xxx" \
     -H "Accept: application/json"

The title needs to be url encoded (can use https://www.urlencoder.org/) so for you it should be:

curl -X GET "http://192.168.1.1:7878/api/v3/parse?title=The%20XXX%20%282023%29%20%7Bimdb-tt123456789%7D%2FThe%20XXX%20%5BDE%2BEN%5D%20Remux-2160p.mp4" \
     -H "Content-Type: application/json" \
     -H "X-Api-Key: xxx" \
     -H "Accept: application/json"

It should give response with file info but in your case I assume the response is

{
  "title": "xyz",
  "customFormatScore": 0
}

Which means it can't find the file.

@CurlyFlow
Copy link
Author

@HaveAGitGat

DOnt ask my why, but if you use ORIGINAL FILENAME radarr finds it, but your script doenst use it, so th at would be an easy fix.

@HaveAGitGat
Copy link
Owner

@CurlyFlow sorry what do you mean ORIGINAL FILENAME, is that a variable?

@CurlyFlow
Copy link
Author

CurlyFlow commented Dec 18, 2023

@CurlyFlow sorry what do you mean ORIGINAL FILENAME, is that a variable?

Tdarr shows "original filename", that has to be used.

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

No branches or pull requests

3 participants