Skip to content

Make audio track picker accept video files #4840

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

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Make audio track picker accept video files #4840

merged 1 commit into from
Mar 6, 2024

Conversation

Scvairy
Copy link
Contributor

@Scvairy Scvairy commented Mar 2, 2024

issue #3259


Description:
I've added union of video and audio types to allowedFileTypes in "Load external audio file". Selecting video file works out of the box for years in IINA, and was allowed until 1.0.7 (on 1.0.7 it works, but on newer versions doesn't).
It's time to fix it! 💛

Comment on lines +666 to +669
title: "Load external audio file",
chooseDir: false,
dir: currentDir,
sheetWindow: player.currentWindow,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added new lines for better readability

chooseDir: false,
dir: currentDir,
sheetWindow: player.currentWindow,
allowedFileTypes: Utility.playableFileExt
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is actually Utility.supportedFileExt[.audio]! + Utility.supportedFileExt[.video]!, so I decided not to duplicate it and use existing static field. But I see its name makes no sense here ¯\_(ツ)_/¯

Copy link
Member

Choose a reason for hiding this comment

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

I think the naming here is fair.

@low-batt low-batt linked an issue Mar 2, 2024 that may be closed by this pull request
Copy link
Contributor

@low-batt low-batt left a comment

Choose a reason for hiding this comment

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

Pulled changes, built IINA, tested. Worked fine.

Changes look good to me.

@low-batt low-batt requested a review from uiryuu March 3, 2024 22:07
@uiryuu uiryuu merged commit 076e2fc into iina:develop Mar 6, 2024
@uiryuu
Copy link
Member

uiryuu commented Mar 6, 2024

Thanks for contributing to IINA!

@low-batt
Copy link
Contributor

low-batt commented Mar 6, 2024

Thanks from me as well! The comments in the PR explaining the thinking behind the code changes were very helpful.

svobs pushed a commit to svobs/iina-advance that referenced this pull request Mar 8, 2024
svobs added a commit to svobs/iina-advance that referenced this pull request Mar 13, 2024
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.

External Audio Tracks don't Work as before
3 participants