QGet alternative JGet announced

Post your questions about BT download, FTP download, HTTP download, or QGet download software here.

Re: QGet alternative JGet announced

Postby picapica » Sun Apr 27, 2008 7:18 pm

Hi,
may I ask where did you get the info to connect and send messages to the download station ?

Thx a lot !

PS: feel free to PM me in french if you fill it's easier ;p
picapica
New here
 
Posts: 4
Joined: Sat Apr 05, 2008 5:41 pm
NAS Model: TS-101/TS-201

Re: QGet alternative JGet announced

Postby sabbelgreth » Sun Apr 27, 2008 7:46 pm

Hey picapica,

Actually, english is easier for me ;)
I looked up most of the commands in the HTML source code of the QNap browser interface. They are calls to some cgi scripts on the server. The QGet windows app uses other commands in some situations. I used Wireshark to see these commands. Markus who programmed the QDownloader (viewtopic.php?f=30&t=3700) told me, that there is also an "official" QNAP specification with all commands. If you ask in the forum, they may send it to you.

Cheers,
Nicolas
sabbelgreth
Starting out
 
Posts: 13
Joined: Sun Apr 06, 2008 4:59 pm
NAS Model: TS-100

Re: QGet alternative JGet announced

Postby elparia » Sun Jun 29, 2008 4:18 am

Hi,

Nice program, works great with Linux. There are some small issues with the latest firmware: the collums with the data are not on the right place and there is no option to configure encryption. Any chance for a updated version? I also have a suggestion: save all the connection options and not the password, saves time if you want to login and don't save your password.
elparia
New here
 
Posts: 3
Joined: Sat Jun 14, 2008 7:07 pm
NAS Model: TS-109/209 Pro

Re: QGet alternative JGet announced

Postby fullerlee » Sat Jul 26, 2008 5:49 pm

sabbelgreth wrote:Hey picapica,

Actually, english is easier for me ;)
I looked up most of the commands in the HTML source code of the QNap browser interface. They are calls to some cgi scripts on the server. The QGet windows app uses other commands in some situations. I used Wireshark to see these commands. Markus who programmed the QDownloader (viewtopic.php?f=30&t=3700) told me, that there is also an "official" QNAP specification with all commands. If you ask in the forum, they may send it to you.

Cheers,
Nicolas


Hi,
I've asked a question about whether the Download Station API could be published by QNAP (http://forum.qnap.com/viewtopic.php?f=16&t=6921). It seems you've already reverse-engineered the cgis. Could you share the source, or the specs, either by PM or here?

Thanks,
Lee
fullerlee
New here
 
Posts: 7
Joined: Fri Jul 25, 2008 7:43 pm
NAS Model: TS-101/TS-201

Re: QGet alternative JGet announced

Postby ansible » Sun Jul 27, 2008 2:39 pm

I've been looking into writing some custom scripts for my QNAP too, but haven't had much luck looking in the source, beacuse the CGIs are compiled. So you just make http requests to the CGIs? How do you get the Job IDs, screen scraping?
ansible
New here
 
Posts: 4
Joined: Thu Nov 01, 2007 12:38 am

Re: QGet alternative JGet announced

Postby fullerlee » Sun Jul 27, 2008 8:01 pm

ansible wrote:I've been looking into writing some custom scripts for my QNAP too, but haven't had much luck looking in the source, beacuse the CGIs are compiled. So you just make http requests to the CGIs? How do you get the Job IDs, screen scraping?


As the OP says, you can use Wireshark to see the contents of the requests/gets/posts, but since he's already done it, I'd rather not duplicate the work. The CGIs are binaries, but they can be called directly from the command line if you pipe in the correct form data - you can get that from inspecting the html source in a browser.
Since JGet is in java, you could probably decompile it, but best to sit tight and get the OPs permission.
Lee
fullerlee
New here
 
Posts: 7
Joined: Fri Jul 25, 2008 7:43 pm
NAS Model: TS-101/TS-201

Re: QGet alternative JGet announced

Postby nitingoyal » Tue Oct 07, 2008 3:41 am

hi

Jget does not pause or resume all the selected foles together. it does it in steps. like first it will resume 4 tasks ,then 2, then 1 ,then again 1. secondly in active downloads it shows the speed in done% column and done% in download rate column.

thanx
------------------------------------------------------
TS-409 Pro (2.1.1 Build 0925T)
3 x Seagate ST31000340AS 1000GB drives (RAID5)
------------------------------------------------------
nitingoyal
New here
 
Posts: 5
Joined: Fri Aug 29, 2008 4:20 pm
NAS Model: QBack-35S

Re: QGet alternative JGet announced

Postby gdev » Thu Oct 09, 2008 5:58 am

Hi all,

is it possible to use the great jget-app with FlashGot (Firefox extension)?
What do i have to configure?
If this works, that will be a very beautiful solution to use the Qdownloadserver under linux...

Greetings, Gdev
gdev
New here
 
Posts: 4
Joined: Fri Aug 15, 2008 3:13 pm
NAS Model: TS-109/209 Pro

Re: QGet alternative JGet announced

Postby Pali » Sat Nov 01, 2008 9:14 pm

Hi,

I made short shell script, which can be used with great Firefox extension FlashGot on linux. It only support torrent files now. Script download torrent file and send it to the nas, which start torrent download automatically. Script probably works only with TS series and firmware versions 2.x (tested with ts-109 pro and fw v2.1.0). Script needs your nas password, so be carefully.

Hopefully sabbelgreth will add commandline support to JGet someday, then Flashgot can use it directly.

1. check/install wget, curl and zenity
1. Save script example to name send2nas.sh
2. Give execute rights
3. Edit NAS, PORT, TMP, USER and PASS variables on script.
4. Add new FlashGot download manager.
- name example: Send to NAS
- executable path example: /home/user/bin/send2nas.sh
- commandline argumets: [URL]

send2nas.sh script:
Code: Select all
#!/bin/sh
PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# QNAP NAS IP or host name
NAS=1.1.1.1

# QNAP NAS port addres: 80 or 8080
PORT=80

# Temp directory
DIR=/tmp

# QNAP NAS username
USER=admin

# QNAP NAS password
PASS=password

# -------------------------------------------

# parse file name from the url
file=$(basename $1)

# download file
wget --output-document "$DIR/$file" "$1"

# send file to NAS
CURL_OUTPUT=`curl --fail --silent --form "upload=@$DIR/$file" --form name=upload_file --user "$USER:$PASS" http://$NAS:$PORT/cgi-bin/Qdownload/btoption.cgi?name=add_submit`

# handle error
if [ $? = 0 ]; then
  INFO="$file has been successfully transmitted to $NAS on $(date)"
else
  INFO="$file $CURL_OUTPUT"
fi

# show notification
zenity --notification --title "send2nas" --text "$INFO"

# remove temp file
#rm "$DIR/$file"


-Pali
Last edited by Pali on Sun Dec 21, 2008 11:24 pm, edited 1 time in total.
Pali
New here
 
Posts: 8
Joined: Fri Feb 15, 2008 2:03 am
NAS Model: TS-119/219

Re: QGet alternative JGet announced

Postby CasperTDK » Sun Dec 14, 2008 2:22 am

If I run your script in the terminal, it works.

Such as:

/Users/caspertdk/Documents/send2nas.sh http://torrents.thepiratebay.org/457075 ... PB.torrent

If i type that, it works.

Via flashgot, nothing happens. Not even wget.

Running /Users/caspertdk/Documents/send2nas.sh http://torrents.thepiratebay.org/457075 ... PB.torrent -- async

This is the log output:
Adding authentication info
Preprocessing done in ms7
Starting dispatch
Converting 100073 long job to charset UTF-8
Writing 100073 bytes...
Running /Users/caspertdk/Documents/send2nas.sh http://torrents.thepiratebay.org/457075 ... PB.torrent -- async
Dispatch done in ms190
Total processing time: ms203
CasperTDK
Starting out
 
Posts: 23
Joined: Tue May 13, 2008 9:12 pm
NAS Model: None

Re: QGet alternative JGet announced

Postby sabbelgreth » Wed Dec 17, 2008 5:40 am

Hi everybody,

You can check the code below for some API information...hope this helps...if you need some feel free to write.

Code: Select all
private final String csvPath = "/cgi-bin/Qdownload/html/";
private final String btOptionCmd = "/cgi-bin/Qdownload/btoption.cgi?";
private final String upParam = "name=up";
private final String downParam = "name=down";
private final String pauseParam = "name=pause";
private final String indexParamKey = "index";
private final String restartParam = "name=restart";
private final String kindParamKey = "kind";
private final String showErrorParam = "name=show_error";
private final String pageParamKey = "page";
private final String jobIndexParamKey = "jobindex";
private final String submitTorrentParam = "name=add_submit";
private final String getConfigurationParam = "name=set";
private final String configurationSubmitParam = "name=set_submit";
private final String shareTimeParam = "name=edit";
private final String shareTimeSubmitParam = "name=edit_submit";
private final String addFtpParam = "name=add_qget";
private final String addFtpSubmitParam = "name=add_qget_submit";
private final String listUrl = "/cgi-bin/Qdownload/Get_DL_List.cgi?status=";
public enum TorrentDownloadState { Running, Paused, Finished };
sabbelgreth
Starting out
 
Posts: 13
Joined: Sun Apr 06, 2008 4:59 pm
NAS Model: TS-100

Re: QGet alternative JGet announced

Postby Pali » Sat Dec 20, 2008 12:30 am

CasperTDK wrote:If I run your script in the terminal, it works.

Such as:

/Users/caspertdk/Documents/send2nas.sh http://torrents.thepiratebay.org/457075 ... PB.torrent

If i type that, it works.


Sorry for late response.

If it works from the terminal, problem is probably in flashgot side.
I check my FlashGot log and it seems to be similar.

Preprocessing done in ms53
Starting dispatch
Converting 100675 long job to charset UTF-8
Writing 100675 bytes...
Running /home/pali/bin/send2nas.sh http://dummy.org/dummy.torrent -- async
Dispatch done in ms306
Total processing time: ms441

I use FlashGot v1.1.15

Did script give you dialog (zenity), when you launch it from the FlashGot? If not, then the script is not even executed. Did you give the execution rights to script (probably yes, because it works from the terminal)? Did you test to give execution flag also to group and others (I only have execution flag on owner).
Pali
New here
 
Posts: 8
Joined: Fri Feb 15, 2008 2:03 am
NAS Model: TS-119/219

Re: QGet alternative JGet announced

Postby CasperTDK » Sat Dec 20, 2008 1:26 am

No, I can't get zenity installed on my mac. It haven't had success in doing that.
I tried re-writing it, so it wouldn't use zenity, but simple do it without any notification messages on the status. Again, it worked in terminal but not in flashgot.

The whole execution flag. Do you mean group permission (chown)?
CasperTDK
Starting out
 
Posts: 23
Joined: Tue May 13, 2008 9:12 pm
NAS Model: None

Re: QGet alternative JGet announced

Postby Pali » Sat Dec 20, 2008 1:38 am

Hi Sabbelgreth,

can you add commandline support to the JGet?

Something like this:
JGet --add_torrent [URL]
or just file name if it is too tricky to first download the torrent file from the url.
JGet --add_torrent [FILE]

examples:
JGet --add_torrent "http://www.dummy.com/dummy.torrent"
JGet --add_ftp_http "http://www.dummy.com/dummy.iso"
or just
JGet --add "http://www.dummy.com/dummy.torrent"
and JGet recognize the type automatically.

If you can provide JGet source codes, I can try to add the commandline support.

P.S. Big thanks for you, great piece of software. There is one little bug in the columns: Download rate column shows the done %, done % shows the download rate and seeders column shows the upload rate. JGet v0.1 and QNAP TS-109 v2.1.0
Last edited by Pali on Sat Dec 20, 2008 2:17 am, edited 1 time in total.
Pali
New here
 
Posts: 8
Joined: Fri Feb 15, 2008 2:03 am
NAS Model: TS-119/219

Re: QGet alternative JGet announced

Postby Pali » Sat Dec 20, 2008 1:59 am

CasperTDK wrote:No, I can't get zenity installed on my mac. It haven't had success in doing that.
I tried re-writing it, so it wouldn't use zenity, but simple do it without any notification messages on the status. Again, it worked in terminal but not in flashgot.


I have not tested script on os x. Well, I have mac mini, so I can try to test it (hopefully in this weekend).

CasperTDK wrote:The whole execution flag. Do you mean group permission (chown)?

I mean to give execution right to all users. example "chmod 777 send2nas.sh", this give all permission (read, write and execute) to owner, group and others.
Pali
New here
 
Posts: 8
Joined: Fri Feb 15, 2008 2:03 am
NAS Model: TS-119/219

PreviousNext

Return to Download Station and QGet

Who is online

Users browsing this forum: No registered users and 1 guest