-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Close option to start iina-cli in music-mode, #3651 #3926
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
iina/AppDelegate.swift
Outdated
if #available(macOS 10.12, *), let pc = lastPlayerCore, commandLineStatus.enterPIP { | ||
pc.mainWindow.enterPIP() | ||
if let pc = lastPlayerCore { | ||
// PiP is not supported in music mode. Ignore the PiP option if music mode was specified. |
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.
Can you add this to the help message?
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.
Happy to update the help. Something like this?
--music-mode:
Enter music mode after opening the media.
If --music-mode is specified the --pip option will be ignored.
What I thought was really needed was option validation where if you use both then IINA fails with an error. The typical style error message would be:
Cannot specify both --music-mode and --pip
I did not add that because validation is currently a missing feature of the IINA CLI. For example there is no attempt to reject mpv options that IINA does not support like the ones that configure mpv's basic controller. IINA ignores the options.
Should I just update the help, or also add validation and treat this as a fatal error like most command line utilities would do?
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.
+1 to failing with a useful error message. Otherwise it's not obvious why --music-mode should be favored over --pip
The commit in the pull request will: - Add a new enterMusicMode property to the CommandLineStatus struct - Add support for a new --music-mode option to the AppDelegate.parseArguments method - Add code to applicationDidFinishLaunching to switch to the mini player if the music-mode option is specified - Add the new --music-mode option to the output of the --help option
The commit in the pull request will: - Add a new enterMusicMode property to the CommandLineStatus struct - Add support for a new --music-mode option to the AppDelegate.parseArguments method - Add code to applicationDidFinishLaunching to switch to the mini player if the music-mode option is specified - Add the new --music-mode option to the output of the --help option - Update the help for --pip to indicate it can not be used with music mode - Terminate with a command line usage error if both --music-mode and --pip are specified
I updated the PR so that both iina-cli and the IINA executable will reject combining low-batt@gag MacOS$ ./iina-cli --music-mode --pip ~/Movies/resume-failure.mp4
Cannot specify both --music-mode and --pip
low-batt@gag MacOS$ The help for --pip now indicates that music mode does not support Picture-in-Picture. Help output:
|
The commit in the pull request will:
Add a new enterMusicMode property to the CommandLineStatus struct
Add support for a new --music-mode option to the
AppDelegate.parseArguments method
Add code to applicationDidFinishLaunching to switch to the mini player
if the music-mode option is specified
Add the new --music-mode option to the output of the --help option
This change has been discussed with the author.
It implements / fixes issue Missing option to start iina-cli in music-mode #3651.
Description: