-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Command Line Interface #1181
Command Line Interface #1181
Conversation
FWIW I would recommend splitting the command line interface off into a separate target, instead of having it reside in the main binary. |
|
The binary would be bundled as part of IINA, and would handle parsing arguments and handling input/output. Then it would call the main binary and set it up for playback. |
In which way it calls the main binary? Is it possible to call methods in the main binary directly? |
Fair point; this is not easy to do and so probably not worth doing. A few things we should still look into: making IINA behave like a standard command line tool, and offering to symlink it to a directory in the user's |
Splitting CLI is not a good idea. Many applications (although not written in Swift) support CLI and GUI at the same time, including VLC, wine, etc. Also, since this feature is intended for advanced user, whether they want to put |
@@ -100,8 +146,20 @@ class AppDelegate: NSObject, NSApplicationDelegate { | |||
parsePendingURL(url) | |||
} | |||
|
|||
// check whether showing the welcome window after 0.1s | |||
Timer.scheduledTimer(timeInterval: TimeInterval(0.1), target: self, selector: #selector(self.checkForShowingInitialWindow), userInfo: nil, repeats: false) | |||
let _ = PlayerCore.first |
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.
I suggest wrapping this line into a class function of PlayerCore. Kind of wired.
I'm really pleased to see work being done on CLI support for IINA. |
Description:
Basic CLI support.
--no-*
ones) with--mpv-
prrefix.--stdin
.-Name VALUE
.