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 ability to filter languages in MediaInfo formatter #3484

Merged
merged 2 commits into from Feb 11, 2020

Conversation

Taloth
Copy link
Member

@Taloth Taloth commented Jan 2, 2020

Database Migration

NO

Description

Definitely a 1% feature.

@markus101 We talked about this and I think it would still be better to filter by language profile or something, but I feel like there's more edgecases there and harder to implement.
Allow {MediaInfo SubtitleLanguages:EN+DE} custom format to influence formatter:

  • :EN+DE filters out all except EN and DE (the order here determines the output order too)
  • :-DE-NO filters out DE and NO
  • :EN+DE+ (trailing + ) will replace any unlisted languages with --, so a file with EN+NL+NO would become [EN+--] (not sure about this one)

Formats work for AudioLanguages, AudioLanguagesAll and even Full. For Full it'll eliminates any possible future formatting for the codec/etc stuff that's in Full, but that's not a big issue imo.

Finally I'm also not sure about how to document it.

Todos

  • Tests
  • Documentation

@Taloth Taloth force-pushed the phantom-language-format-filter branch from a14f432 to 66f1c0e Compare January 2, 2020 22:53
Copy link
Member

@markus101 markus101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

:EN+DE+ (trailing + ) will replace any unlisted languages with --, so a file with EN+NL+NO would become [EN+--] (not sure about this one)

Maybe we should have the trailing + just indicate that there are more languages, using your example, a file with EN+NL+NO would become [EN+], but a file with EN+DE would just be [EN+DE]

@Taloth
Copy link
Member Author

Taloth commented Jan 5, 2020

Problem with that is what would you do if the languages are EN & NL and the format is :DE+.
In the current format it'd be [--], leaving the hyphens out would mean either [+] or just nothing.

@Taloth Taloth force-pushed the phantom-language-format-filter branch from 66f1c0e to b601c8b Compare February 11, 2020 20:13
@Taloth Taloth merged commit b601c8b into phantom-develop Feb 11, 2020
@Taloth Taloth deleted the phantom-language-format-filter branch February 14, 2020 20:31
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants