qupzilla icon indicating copy to clipboard operation
qupzilla copied to clipboard

How to pass custom arguments in Videoner plugin?

Open ghost opened this issue 7 years ago • 8 comments

After recently discovering videoner plugin. I streams youtube videos exclusively using this plugin and Its awesome. My default streaming pixel quality is 480p but some times I require to stream videos in 360p or below. I know that videoner plugin has a box for passing arguments . How should I use this box to pass my custom arguments. This is my full script.

#!/bin/sh

if [[ -z "$2"]]; then
    p=480
else
    p="$2"
fi

mpv --cache=1024 --no-config --slang=en --ytdl-raw-options=write-auto-sub=,sub-lang=en --ytdl-format='bestvideo[height<=?$p]+bestaudio' $1

ghost avatar Feb 24 '18 04:02 ghost

That's not for custom arguments, it's for program arguments (mpv arguments) in this case.

ghost avatar Feb 24 '18 05:02 ghost

so is there any way we can pass custom arguments?

ghost avatar Feb 24 '18 10:02 ghost

Sorry, what do you mean with custom arguments?

ghost avatar Feb 24 '18 10:02 ghost

I think videoner plugin if used properly can do some powerful stuff with it. Let say for example if I want to use videoner plugin for both streaming as well as downloading. Currently we have to make two different scripts for streaming and downloading and then needs to load those files in the plugin depending on the use. It will be more efficent if we can do that stuff in a single exectuable file by passing a argument such as --youtube_download boolean

if [argument false|| no arguments]
then
    # Stream youtube videos
    mpv $1
else
   # download video
   youtube-dl $1
fi

This way we can either download or stream videos by passing our custom parameter in videoner plugin. Not only that we should be able to pass additional paramerters --youtube_download boolean --quality 480 or some-other arguments

Sorry english is not my first language and I suppose you understood what I am saying

ghost avatar Feb 24 '18 14:02 ghost

Sorry english is not my first language and I suppose you understood what I am saying

Ha ha ha, my English is terrible and even i never learned it, so you should not apologize about that. ;-D

So, if you write the script properly, you should can do what you want. You just must do that in single script.

ghost avatar Feb 24 '18 14:02 ghost

Can you give me some hint?

ghost avatar Feb 24 '18 15:02 ghost

You can only set which additional arguments are passed to your program/script before the URL. If you want "custom arguments" as in some placeholders for additional context (like page title, link title, or whatnot) it's not implemented.

nowrep avatar Feb 24 '18 15:02 nowrep

"custom arguments" as in some placeholders for additional context (like page title, link title, or whatnot) it's not implemented.

Yeah, that is most important here.

Otherwise, the option like that --youtube_download boolean, you may use without problems . If you want the boolean value or even the whole option to be dynamically changing, you can use some program such like zenity (in the script).

ghost avatar Feb 24 '18 15:02 ghost