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

Add Custom Format "Rename To" #6431

Open
1 task done
salomj opened this issue Jan 26, 2024 · 11 comments
Open
1 task done

Add Custom Format "Rename To" #6431

salomj opened this issue Jan 26, 2024 · 11 comments

Comments

@salomj
Copy link

salomj commented Jan 26, 2024

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Is your feature request related to a problem? Please describe

I would like to have more qualified Custom Format names, to make it easier to see what is going on, such as Audio: AAC instead of just aac, while still allowing it to be renamed when checking Include Custom Format when Renaming.

Describe the solution you'd like

Another text field called something like Rename To when checking Include Custom Format when Renaming

Describe alternatives you've considered

The two alternatives is to set the name to what you want it to be, which makes Custom Formats pretty messy, or to add a second format with the exact same conditions with renaming checked.

Anything else?

No response

@markus101
Copy link
Member

We need to determine what the behaviour is if this is not set or whether it must always be set if renaming is enabled or if it'll fall back to use name if unset (which will be a little more flexible with the current API). This field will need to also be unique like name is (and also not be the same as the name).

@bakerboy448
Copy link
Contributor

Xref Radarr/Radarr#6801

@Alanoll
Copy link
Contributor

Alanoll commented Feb 29, 2024

@salomj would the Radarr suggestion would for you? e.g. {CustomFormat:FormatName}

I implemented something similar in the v3 release (#4453), but when work started on v4 and the transition to CustomFormats it was dropped because it seemed like I may have been the only one using it :)

I can look into adding it back in.

@salomj
Copy link
Author

salomj commented Mar 1, 2024

@salomj would the Radarr suggestion would for you? e.g. {CustomFormat:FormatName}

I implemented something similar in the v3 release (#4453), but when work started on v4 and the transition to CustomFormats it was dropped because it seemed like I may have been the only one using it :)

I can look into adding it back in.

Can you specify each individual Custom Formats that way? Because I'll have more than one Custom Format being renamed.

The way they are right now, I have to split my Custom Formats into its matching profile and its renaming profile. I do prefer this, except that the renaming profiles show up in matching.

@Alanoll
Copy link
Contributor

Alanoll commented Mar 1, 2024

In theory you would be able to do:
{Episode Title}.s{Season:00}e{Episode:00}.{Custom Format:AudioAAC}.{Quality Title}.{Custom Format:SomeOtherFormat}-{Custom Formats}

And if the Custom Format was matched, it would put that format's name AudioAAC or SomeOtherFormat where you told it to. Custom Formats would be all matched formats like it is now. You would still possibly need to have dupe Custom Formats profiles to.

If a Rename token was added to the custom format spec, this idea could then use that token instead of the Custom Format Name. I could take a stab at that as well, but I'm not that experienced with the UI framework Sonarr uses

@Alanoll
Copy link
Contributor

Alanoll commented Mar 2, 2024

I implemented the {Custom Format:Format} in PR #6585.

I started to add support for a "rename token" for a custom format that was different from the name, but I started thinking about Recyclarr and what happens when it syncs Custom Formats. I don't use it, but my concern would be: on refresh, does Recyclarr need to provide the rename token to the API to it's not wiped out?

Since I didn't know the direction, I opted to not try to implement the "rename token" yet.

@markus101
Copy link
Member

Typically that is the behaviour, the body of the PUT is used to replace the existing stored value, but could be an if null don't overwrite situation.

@Alanoll
Copy link
Contributor

Alanoll commented Mar 10, 2024

@salomj Do you still need the ability to specify a "rename token" on a Custom Format? Or would the new token get what you want?

@markus101
Copy link
Member

I was thinking about this a bit and think the better option is "Display Name", that way name remains the unique field that file names will get and the display name can be shown in the UI (if set) and we don't need to worry about keeping "Rename To" unique between name and "Rename To".

@Alanoll
Copy link
Contributor

Alanoll commented Mar 10, 2024

I was thinking about this a bit and think the better option is "Display Name", that way name remains the unique field that file names will get and the display name can be shown in the UI (if set) and we don't need to worry about keeping "Rename To" unique between name and "Rename To".

I was leaning the same direction for that uniqueness side of things, but then veered on how it'd be used. My thoughts were if someone has Display Name as HDR for multiple Custom Format, the UI and renaming would only output a single HDR

But then it could come down to the use case. In my example, the user could instead have multiple specs in a single HDR Custom Format and achieve the same thing

@salomj
Copy link
Author

salomj commented Mar 15, 2024

I was thinking about this a bit and think the better option is "Display Name", that way name remains the unique field that file names will get and the display name can be shown in the UI (if set) and we don't need to worry about keeping "Rename To" unique between name and "Rename To".

I was leaning the same direction for that uniqueness side of things, but then veered on how it'd be used. My thoughts were if someone has Display Name as HDR for multiple Custom Format, the UI and renaming would only output a single HDR

But then it could come down to the use case. In my example, the user could instead have multiple specs in a single HDR Custom Format and achieve the same thing

Work for me!

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

4 participants