-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix cannot apply filters to multiple windows, #4273 #4288
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
Conversation
This commit will: - Change FilterWindowController to use the active PlayerCore - Change FilterWindowController.reloadTable to check if the active PlayerCore is shutting down - Disable the ability to add a filter if the active core is stopping - Change PlayerCore.playbackStopped to clear all audio and video filters
NOTE the change to clear filters in |
This commit will: - Change FilterWindowController to use the active PlayerCore - Change FilterWindowController.reloadTable to check if the active PlayerCore is shutting down - Disable the ability to add a filter if the active core is stopping if IINA is configured to support multiple windows - Change PlayerCore.playbackStopped to clear all audio and video filters if IINA is configured to support multiple windows
The mpv player carries over many settings when playing the next video. This behavior is useful when playing a series of videos such as the episodes of a show. However IINA differs from mpv in that if the preference Trouble is Thoughts? I can pull the change to clear filters for now and we can discuss how to handle the random behavior when there are multiple mpv cores in the next release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are assuming that if "Always open media in a new window" is disabled, then there must be one player core at a time, which is not true. One can open multiple window, and then uncheck that option. So logically I think we shouldn't implement the behavior based on that preference.
// being stopped and about to be added to the player core cache. With that preference enabled | ||
// there can be multiple player/mpv cores cached which would result in random behavior as to | ||
// what filters would be applied to the next video. | ||
addButton.isEnabled = !Preference.bool(for: .alwaysOpenInNewWindow) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add parentheses for better readability.
Examined this one a bit more, and I think this isn't quite a good fit for A better solution would be to always clear the filters for the mpv core when the window state goes from closed to opened. From the description in the issue, the user expected to have to re-enable the filter for every window already.
If the user is switching between files in a playlist, then |
Yes, I regretted pushing that proposed change after making it. That change is going into the toilet due to the problems you pointed out as well as concerns from @uiryuu. I will pull the changes for clearing filters. We will take up the issue of mpv settings when there are multiple cores in the feature release. By the way while testing this I think I found another error. I need to reproduce it again and dig into it so I've not filed an issue yet. Retained filters can fail when you open a new video. From the UI you don't know this has happened. I noticed this in mpv log messages. |
This PR has been replaced by PR #4316 which does not attempt to deal with the issue of filters remaining configured in the mpv core and being applied to the next video. |
This commit will:
Change
FilterWindowController
to use the activePlayerCore
Change
FilterWindowController.reloadTable
to check if the activePlayerCore
is shutting downDisable the ability to add a filter if the active core is stopping
Change
PlayerCore.playbackStopped
to clear all audio and video filtersI have read CONTRIBUTING.md
This implements/fixes issue Cannot apply video filters to multiple windows #4273.
Description: