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 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 Jan 2, 2020
Copy link
Member

markus101 left a comment

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

This comment has been minimized.

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 Feb 11, 2020
@Taloth Taloth merged commit b601c8b into phantom-develop Feb 11, 2020
31 checks passed
31 checks passed
security/snyk - package.json (markus101) No manifest changes detected
security/snyk - src/LogentriesCore/LogentriesCore.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/LogentriesNLog/LogentriesNLog.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/Marr.Data/Marr.Data.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/MonoTorrent/MonoTorrent.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Api.Test/Sonarr.Api.Test.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Api/Sonarr.Api.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Automation.Test/Sonarr.Automation.Test.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Common.Test/Sonarr.Common.Test.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Common/Sonarr.Common.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Console/Sonarr.Console.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Core.Test/Sonarr.Core.Test.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Core/Sonarr.Core.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Host.Test/Sonarr.Host.Test.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Host/Sonarr.Host.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Integration.Test/Sonarr.Integration.Test.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Libraries.Test/Sonarr.Libraries.Test.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Mono.Test/Sonarr.Mono.Test.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Mono/Sonarr.Mono.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.SignalR/Sonarr.SignalR.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Test.Common/Sonarr.Test.Common.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Test.Dummy/Sonarr.Test.Dummy.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Update.Test/Sonarr.Update.Test.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Update/Sonarr.Update.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Windows.Test/Sonarr.Windows.Test.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone.Windows/Sonarr.Windows.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/NzbDrone/Sonarr.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/Sonarr.Api.V3/Sonarr.Api.V3.csproj - net462 (markus101) No manifest changes detected
security/snyk - src/Sonarr.Http/Sonarr.Http.csproj - net462 (markus101) No manifest changes detected
@Taloth Taloth deleted the phantom-language-format-filter branch Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.