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

Prefer language settings #87 #89

Merged
merged 13 commits into from
Jun 25, 2021
Merged

Conversation

PangMo5
Copy link
Member

@PangMo5 PangMo5 commented Jun 25, 2021

Changed

  • Add prefer language settings
  • Apply prefer language settings to iOS VideoPlayer
  • Add https://github.com/sindresorhus/Defaults Package
    • If use it, reduces human issues with auto-completion. And more sugar!
  • Replaced UserDefaults.default with Defaults

replaced UserDefaults.default with Defaults
add prefer language settings
@PangMo5 PangMo5 changed the title Prefer language settings Prefer language settings #87 Jun 25, 2021
@stevebyatt10
Copy link
Contributor

stevebyatt10 commented Jun 25, 2021

Would these options apply across all media? Is there anything sever side to have preferences apply to an entire series, e.g a show to have a preference of no subtitles but prefer subtitles for everything else

@PangMo5
Copy link
Member Author

PangMo5 commented Jun 25, 2021

Would these options apply across all media? Is there anything sever side to have preferences apply to an entire series, e.g a show to have a preference of no subtitles but prefer subtitles for everything else

Currently, the settings are applied to the entire video.

@PangMo5 PangMo5 marked this pull request as ready for review June 25, 2021 10:07
@PangMo5 PangMo5 requested a review from acvigue as a code owner June 25, 2021 10:07
selectedAudioTrack = audio.id
mediaPlayer.currentAudioTrackIndex = audio.id
} else if audio.langCode.contains(Defaults[.autoSelectAudioLangCode]) {
if audio.langCode.contains(Defaults[.autoSelectAudioLangCode]) {
selectedAudioTrack = audio.id
Copy link
Contributor

Choose a reason for hiding this comment

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

There is also a function to set either the audio or subtitle tracks

JellyfinPlayer/SettingsView.swift Outdated Show resolved Hide resolved
JellyfinPlayer/SettingsView.swift Outdated Show resolved Hide resolved
JellyfinPlayer/SettingsView.swift Outdated Show resolved Hide resolved
JellyfinPlayer/VideoPlayer.swift Outdated Show resolved Hide resolved
@PangMo5 PangMo5 requested a review from acvigue June 25, 2021 17:34
Fix formatting
Shared/ViewModels/SettingsViewModel.swift Outdated Show resolved Hide resolved
Shared/ViewModels/VideoPlayerModel.swift Outdated Show resolved Hide resolved
@PangMo5 PangMo5 requested a review from acvigue June 25, 2021 18:10
@PangMo5
Copy link
Member Author

PangMo5 commented Jun 25, 2021

oh build error.. sry wait a min

@acvigue acvigue merged commit 75e7081 into jellyfin:main Jun 25, 2021
@PangMo5 PangMo5 deleted the PangMo5/settings branch July 23, 2021 03:20
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

Successfully merging this pull request may close these issues.

None yet

3 participants