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

[Request] Add flow plugins to mark audio or subtitle streams as default #741

Open
Marnalas opened this issue Jan 11, 2025 · 2 comments
Open

Comments

@Marnalas
Copy link
Contributor

Marnalas commented Jan 11, 2025

Hello, I had some need that I took the time to implement.

Basically I wanted to have two flow plugins:

  • One for audio streams : that would mark a stream as default based on language (either manual or original language read from Radarr/Sonarr) and channels (either manual or highest count available) and whether descriptive streams are allowed or not.
  • One for subtitles streams : that would mark a stream as default based on language (either manual or original language read from Radarr/Sonarr) and whether descriptive or forced streams are allowed or not.

I previously developped the applyRadarrSonarrNamingPolicy flow plugin and wrote the 2.0.0 version of the notifyRadarrOrSonarr flow plugin. All four of these plugins imply to be able to access the id used by Sonarr and Radarr, which I already implemented in these last two plugins.
While I was working on the two new plugins I started to think that it would be great (more efficient, maintenable, etc.) to share these duplicated features between the plugins. I remembered that a setFlowVariable flow plugin had been added. So I started working on an additional setFlowVariablesFromRadarrOrSonarr flow plugin that would read informations (ex: id and original language) and then store it in variables for use in the following steps of a flow.

Long story short, there are the pull requests for all of this work :

Here is an example of how to use all these plugins. It's my test flow, so it's normal that it doesn't really make sense in terms of logic.
image

@Marnalas Marnalas changed the title [Request] Add a flow plugin thats [Request] Add a flow plugins to mark audio or subtitle streams as default Jan 11, 2025
@dennix85
Copy link

image

there is one,
i assume this is what you looking for since there is no further info in your post

@Marnalas
Copy link
Contributor Author

Marnalas commented Jan 11, 2025

image

there is one, i assume this is what you looking for since there is no further info in your post

Yeah, I was still writing the message but I hit 'enter' by mistake. I completed the first message.
I will create the pull requests right away.

Pretty sure what I implemented doesn't already exist as reordering streams doesn't make a stream default.

@Marnalas Marnalas changed the title [Request] Add a flow plugins to mark audio or subtitle streams as default [Request] Add flow plugins to mark audio or subtitle streams as default Jan 11, 2025
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

2 participants