Multiple videos for download

Questions and answers on how to get the most out of FFAStrans
Post Reply
knk
Posts: 28
Joined: Wed Jun 21, 2017 3:50 pm

Multiple videos for download

Post by knk »

Hey guys!

I'm currently using JDwnldr to download clips from the web which are sent to me listed by mail.
Since JD allows to copy/paste a list of links, I was wondering if we could achieve this through the web browser in FFAS...

The ideal scenario was to have a text box (box, not field) in the web ui via browser, but I couldn't make it work.
I can only add a text input field, which results in a single line with all links separated by a whitespace, instead of several lines, each one with a link.

Tried to get this input field to text, read the text file and use the for each function to process every line (link).

I'm stuck and can only see two possible outcomes:
- either I break the lines (read about the \n but it only seems to find paragraphs, not add them... this is how bad my Regex knowledge is... :cry: )
- write the text file, but somehow getting from the text input all lines that start with "http" and end with " ", into separate lines...

I'm blocked.

Could anyone give a suggestion on where to move next?

Thanks again!
admin
Site Admin
Posts: 1659
Joined: Sat Feb 08, 2014 10:39 pm

Re: Multiple videos for download

Post by admin »

Hi knk,

This should be farily "easy" if you input always consists of space (" ") separated urls. The function $split() can split your string into an array you can then feed to the "For each" node.
For example: $split("%s_webui_variable%", " ") will split the %s_webui_variable% variable wherever there is a space. Then you can populate this into a new variable (or reuse the %s_webui_variable% if you like) and use this in the "For each" node.
Let me know if this can push you in the right direction.

By the way, I realize now that even though the $split() function is selectable from the functions list it's still undocumented. This will be fixed for the upcoming 1.4 release.

-steinar
knk
Posts: 28
Joined: Wed Jun 21, 2017 3:50 pm

Re: Multiple videos for download

Post by knk »

Hey Steinar! Long time since I got words from you, hope everything is going well!

Thanks for the suggestion, works like a charm!

Never thought of using the $split function... so I made a fairly complex workaround running a powershell command over a 15 nodes workflow...
now you have reduced about 95% complexity on my workflow :)

Best regards!
admin
Site Admin
Posts: 1659
Joined: Sat Feb 08, 2014 10:39 pm

Re: Multiple videos for download

Post by admin »

Yeah, luckily I have a team that can help with the forum so I can concentrate more on development. Also, I have some back issues that force me to spend less time in front of my computer. Anyway, glad the solution works for you! :-)

-steinar
knk
Posts: 28
Joined: Wed Jun 21, 2017 3:50 pm

Re: Multiple videos for download

Post by knk »

Back pain is one of us "IT'ers" worst enemy... get well soon!

All the best!
Post Reply