Skip to content
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

[Feature request] Add multiple links #206

Open
piter-pit opened this issue Dec 20, 2022 · 10 comments
Open

[Feature request] Add multiple links #206

piter-pit opened this issue Dec 20, 2022 · 10 comments

Comments

@piter-pit
Copy link

piter-pit commented Dec 20, 2022

Would it be possible to add feature that would allow to add multiple links at once (multiple line input)
I believe currently it is possible to add only one link either movie or playlist/channel.

@PikuZheng
Copy link
Contributor

It is possible to push multiple links sequentially to metube using other programs, but why? What is the source of multiple links?

@piter-pit
Copy link
Author

I've tried plugin for browser but failed.
The source would be just part of the playlist (update) or when playlist is not supported for specific service

@PikuZheng
Copy link
Contributor

Try using bash and a loop to bulk add from text like this #96 (comment)

or metube plugin for chrome, can't batch but can reduce workload.

@piter-pit
Copy link
Author

Thanks, I haven't noticed that topic - I checked - I swear :) ok, maybe first page only :)
Nevertheless import via bash especially for docker goes against GUI idea, although it is some kind of solution.

@kblock1
Copy link

kblock1 commented Dec 23, 2022

I've tried plugin for browser but failed. The source would be just part of the playlist (update) or when playlist is not supported for specific service

What failed with the browser plugin? You'll need to be able to access metube on https if you are trying to use the add-in for youtube videos

@piter-pit
Copy link
Author

I mean, I use Firefox plugin and it allows add only one link

@PikuZheng
Copy link
Contributor

I mean, I use Firefox plugin and it allows add only one link

a simple html page for batch add download links (one link per line) if you want to try:

<!DOCTYPE HTML>
<html><body>
<script language="javascript" type="text/javascript">
	function add_to_metube(){
		var links=document.getElementById("links").value.split("\n")
		links.forEach(function(link){
			if(link!=''){
			            var xhr = new XMLHttpRequest()
			            xhr.open('POST', 'http://your-metube-web-address:8090/add', true)
			            var str = '{"url":"'+link+'","quality":"best"}'
			            xhr.send(str)          
			}; //end if
		}); //end forEach
		alert("added!");
	}; //end function
</script>

<textarea id="links" style="width:400px;height:300px"></textarea>
<br />
<input type="button" id="add-to-metube" value="add-to-metube!" onclick="add_to_metube()" />
</body></html>

image

@piter-pit
Copy link
Author

Yes, thank you :)
It works fine. Is it foreseen to implement it to MeTube?

@PikuZheng
Copy link
Contributor

Yes, thank you :) It works fine. Is it foreseen to implement it to MeTube?

Currently it is very crude, and there is still a lot of work to be done before it can be officially used. maybe in the future?

@wweevv-johndpope
Copy link

this maybe useful - hat tip to @lanfon72 - though it still needs to be wired up
https://gist.github.com/lanfon72/7284f83552eb871220804f8ee850fe0e

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

No branches or pull requests

4 participants