Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

How to pass custom arguments in Videoner plugin? #2618

Open
ghost opened this issue Feb 24, 2018 · 8 comments
Open

How to pass custom arguments in Videoner plugin? #2618

ghost opened this issue Feb 24, 2018 · 8 comments

Comments

@ghost
Copy link

ghost commented Feb 24, 2018

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
Copy link
Author

ghost commented Feb 24, 2018

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

@ghost
Copy link
Author

ghost commented Feb 24, 2018

so is there any way we can pass custom arguments?

@ghost
Copy link
Author

ghost commented Feb 24, 2018

Sorry, what do you mean with custom arguments?

@ghost
Copy link
Author

ghost commented Feb 24, 2018

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
Copy link
Author

ghost commented Feb 24, 2018

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
Copy link
Author

ghost commented Feb 24, 2018

Can you give me some hint?

@nowrep
Copy link
Member

nowrep commented Feb 24, 2018

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.

@ghost
Copy link
Author

ghost commented Feb 24, 2018

"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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant