Feature Request: Add more "Placeholders" for custom DM

Bug reports and enhancement requests
Post Reply
t-bon3
Posts: 4
Joined: Sun Jul 12, 2009 11:25 am

Feature Request: Add more "Placeholders" for custom DM

Post by t-bon3 »

I have added a custom download manager (Mplayer) to download the BBC's listen again links at The Beebotron (these are rtsp:// links)

I previously used FlashGet for these downloads but Mplayer does a better job with the download (quicker d/l and less 'skips' in the final audio).

When a link is download with FlashGet the text of the clicked link would be passed to the "Comment:" field.

My request for FlashGot is that this "Link text" is included In the "Placeholders" for the "Command line arguments template:" box.

Example of a link on the Beebotron site:
[url=rtsp://rmv8.bbc.net.uk/bbc7coyopa/bbc7_-_saturday_1800.ra]The Man in Black, Bombers' Moon[/url] - A horrifying tale of something evil stalking four stranded soldiers in Afghanistan
FlashGot the link with FlashGet gives:
Image

So I'd like that "Link text" to be available for custom download managers in FlashGot:
Image
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
User avatar
therube
Ambassador
Posts: 7929
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Feature Request: Add more "Placeholders" for custom DM

Post by therube »

I previously used FlashGet for these downloads
How?
With an actual download manager, not with Browser Built In?


(How does your ace.bat read?)


An aside, should FNAME be included in the Placeholders dropdown?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1pre) Gecko/20090705 SeaMonkey/2.0b1pre
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Feature Request: Add more "Placeholders" for custom DM

Post by Giorgio Maone »

Ok, putting it in my TODO list.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
t-bon3
Posts: 4
Joined: Sun Jul 12, 2009 11:25 am

Re: Feature Request: Add more "Placeholders" for custom DM

Post by t-bon3 »

@Giorgio Maone

That's great, thanks for the support!

@therube
(How does your ace.bat read?)
Well it downloads the linked file with mplayer then converts to mp3 (so I can listen on my portable) using ffmpeg and lame.
Here is the bat file:

Code: Select all

@echo OFF
MPLAYER -bandwidth 99999999 -noframedrop -prefer-ipv4 -dumpfile C:\Downloads\Radio\%~nx1 -dumpstream %1
FFMPEG -i C:\Downloads\Radio\%~nx1 -f wav - | LAME -b 112 -f - C:\Downloads\Radio\%~n1.mp3
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
t-bon3
Posts: 4
Joined: Sun Jul 12, 2009 11:25 am

Re: Feature Request: Add more "Placeholders" for custom DM

Post by t-bon3 »

Thanks for adding the new feature, my Custom DL manager is now working great with links from Beebotron.org.
On my connection (1Mbit) it takes just 3 minutes to download and convert a 30 minute show to a tagged mp3. :D

FlashGot Custom DL manager executable is: "bbc.bat", with command arguments: "[URL] [COMMENT]"

bbc.bat

Code: Select all

@echo OFF
SETLOCAL ENABLEEXTENSIONS

:: This is where mp3 will be saved (no spaces allows in path)
set mp3dir=C:\Radio\

:: Reject invalid links
if not %~x1==.ra (
goto error
) else (
echo Downloading %~2 with Mplayer!)

:: Strip invalid characters
set filename=%2
set filename=%filename:|=%
set filename=%filename:\=%
set filename=%filename:/=%
set filename=%filename::=%
set filename=%filename:<=%
set filename=%filename:>=%
set filename=%filename:?=%
set filename=%filename:"=%

:: Download .ra, convert to .mp3, delete .ra
cd %~dp0
MPLAYER -bandwidth 99999999 -noframedrop -prefer-ipv4 -dumpfile "%mp3dir%%~nx1" -dumpstream %1
FFMPEG -i "%mp3dir%%~nx1" -f wav - | LAME -b 112 -f --tg Podcast --tt %2 --ta "BBC Radio" --ty 2009 --ti "bbc_radio_icon.png" - "%mp3dir%%filename%.mp3"
del "%mp3dir%%~nx1"
goto end

:error
echo That link is not a realaudio file, Press any key to exit.
:end
pause
Last edited by t-bon3 on Mon Aug 24, 2009 4:20 am, edited 2 times in total.
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
hgabreu
Posts: 2
Joined: Mon Mar 30, 2009 12:41 pm

Re: Feature Request: Add more "Placeholders" for custom DM

Post by hgabreu »

Does FNAME work at all?
If it does please tell me how to use it, because I couldn't get it to work.
Thanks
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11) Gecko/2009061208 Iceweasel/3.0.12 (Debian-3.0.12-1)
t-bon3
Posts: 4
Joined: Sun Jul 12, 2009 11:25 am

Re: Feature Request: Add more "Placeholders" for custom DM

Post by t-bon3 »

hgabreu wrote:Does FNAME work at all?
If it does please tell me how to use it, because I couldn't get it to work.
If you use a .bat file as the download manager in windows (as above) with [URL] as the first command line argument then you use:

Code: Select all

%~nx1
In your .bat file to return the name and extension of the download file. See http://www.microsoft.com/resources/docu ... rcent.mspx for a full explanation.
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
hgabreu
Posts: 2
Joined: Mon Mar 30, 2009 12:41 pm

Re: Feature Request: Add more "Placeholders" for custom DM

Post by hgabreu »

t-bon3 wrote:If you use a .bat file as the download manager in windows (as above) with [URL] as the first command line argument then you use:
Thanks t-bon3, but you're trying to extract the file name from the URL (which I already do) and it's not possible for every URL.
For example, try getting the file name when downloading an attachment from gmail. That's why I asked for the FNAME argument.

Thanks again ;)
(btw, I don't use windows)
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11) Gecko/2009061208 Iceweasel/3.0.12 (Debian-3.0.12-1)
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Feature Request: Add more "Placeholders" for custom DM

Post by Giorgio Maone »

FNAME works almost exclusively for media (audio/video) downloads: since guessing a file name which is not contained in the URL involves sniffing the "Content-disposition" header, this would require an extra HTTP request for each link to be captured.
In the "FlashGot Media" case it comes for free, since FlashGot Media already sniffs the HTTP traffic when the video/audio clip starts playing.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
Post Reply