Skip to content

Support passing URLs as cmdline arguments - #15

Open
bionade24 wants to merge 10 commits into
brainrom:masterfrom
bionade24:cmdline-url-support
Open

bionade24 wants to merge 10 commits into
brainrom:masterfrom
bionade24:cmdline-url-support

Conversation

@bionade24

Copy link
Copy Markdown
Contributor

I've not renamed the vars with file in it in all files as I want your opinion on that 1st. I settled for mediaUrl and mediaRessource, to make it more obvious that it may also be a stream and "medium" sounded more too much like esoteric magic.

Spaces in URLs don't work yet.

@bionade24

Copy link
Copy Markdown
Contributor Author

Force-pushed to drop commits from other PR I accidentally included.

@bionade24

Copy link
Copy Markdown
Contributor Author

@brainrom Could I please get your opinion on this?

@brainrom brainrom left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

A lot of meaningless and confusing variable/methods renames, one mpv keyword is broken.
program_arg is over-engineering, which greatly limits class usage scope.
New URL converter is really needed and maybe will allow to accept URLs without any other changes.

Comment thread playercontroller.cpp Outdated
Comment thread program_arg.h
Comment thread playercontroller.h
Comment thread main.cpp
parser.addHelpOption();
parser.addVersionOption();
parser.addPositionalArgument("media", QCoreApplication::translate("KokoVP", "Media files to play"));
parser.addPositionalArgument("urls", QCoreApplication::translate("KokoVP", "URLs to play"));

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

How multiple position arguments lists should work at all? Maybe just accept media by local file paths and by urls?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

May you please elaborate on this? I don't understand what you mean by this.

Comment thread helper.cpp

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks really useful for achieving accepting URLs. Needs testing and fixing mentioned issue, but anyway.

This makes it possible to use smtube with kokovp instead of smplayer.
If something is already currently playing on the existing instance, the
media gets added to the playlist, like before. If nothing is playing,
start playback of the added media.
@bionade24
bionade24 force-pushed the cmdline-url-support branch from a4fc913 to 21936c7 Compare June 25, 2025 22:48
@bionade24
bionade24 force-pushed the cmdline-url-support branch from f985537 to 5f4f1fa Compare June 26, 2025 01:23
@bionade24
bionade24 marked this pull request as ready for review June 26, 2025 01:23
@bionade24
bionade24 requested a review from brainrom June 26, 2025 01:23
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.

2 participants