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 sabbelgreth » Sat Dec 20, 2008 2:54 am

Hi Pali,

The current version already supports that. To add a new torrent download task, you may just append the torrent file name to the command line, e.g. "C:\Program Files\Java\jre1.6.0_07\bin\java.exe" -jar jget.jar %*

In windows, I created a .bat in order to open the torrent files from firefox, for example...

For the bug: I think this is NAS model related...I'm using jget with a TS-101 and the column headers are displayed correctly...
sabbelgreth
Starting out
 
Posts: 13
Joined: Sun Apr 06, 2008 4:59 pm
NAS Model: TS-100

Re: QGet alternative JGet announced

Postby CasperTDK » Sat Dec 20, 2008 3:27 am

Pali wrote:
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.


Oh okay, well yeah, I did chmod it as the first thing i did :)

But yeah, please let me know if you can get it to work on your mac!

Oh yeah, just tried doing it in Ubuntu and it worked. Only difference between it and OSX is, that I have removed the zenity part from the send2nas.sh located on my OSX. Both scripts, mac and ubuntu is set to 777.
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 4:05 am

sabbelgreth wrote:The current version already supports that. To add a new torrent download task, you may just append the torrent file name to the command line, e.g. "C:\Program Files\Java\jre1.6.0_07\bin\java.exe" -jar jget.jar %*


That's a good news. I expected that I already have latest version, because version was same 0.1.

CasperTDK: I made new script, which use jget directly.

Code: Select all
#!/bin/sh

# Temp directory
DIR=/tmp

# JGet
JGET=/<path>/jget.jar

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

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

# send file to NAS
java -jar $JGET "$DIR/$file" &

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

Change the jget path and temp dir. Temporary directory location can be also the problem in os x. Change /tmp to somewhere you home directory.
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 4:28 am

Pali wrote:
sabbelgreth wrote:The current version already supports that. To add a new torrent download task, you may just append the torrent file name to the command line, e.g. "C:\Program Files\Java\jre1.6.0_07\bin\java.exe" -jar jget.jar %*


That's a good news. I expected that I already have latest version, because version was same 0.1.

CasperTDK: I made new script, which use jget directly.

Code: Select all
#!/bin/sh

# Temp directory
DIR=/tmp

# JGet
JGET=/<path>/jget.jar

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

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

# send file to NAS
java -jar $JGET "$DIR/$file" &

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

Change the jget path and temp dir. Temporary directory location can be also the problem in os x. Change /tmp to somewhere you home directory.


Thanks, I will download the beta java 1.6 for OS X and then try it out. I will provide feedback as soon as I have tried it.
UPDATE: It works. Thanks. I just appreciated your old method more. Except that the password was displayed plainly - Would have to figure out a work-around for that one.
This method launches a whole app, where I have to enter my information and then close down the program again. Also, it jget.jar doesn't remember any of my info, so I have to type everything each time. Not that it has to do anything with you though :) I appreciate the script.

I just like the whole idea: "alt-click link" and then you know that your NAS server is working on it. No popups where you have to type info and all that bloat.

Not that jGet is a bad program, it is just that its not what I am looking for. I don't need a program to manage my downloads :)

Back to your original script though:
I tried changing the temp directory to DIR=/Users/caspertdk/Documents/Torrents
The whole thing still works in terminal, but yeah, same result using flashgot. It does not even execute wget *sigh*. Which also means that, even if I had zenity installed, it wouldn't matter, since if wget does not execute, curl wouldn't either. No error would be displayed
CasperTDK
Starting out
 
Posts: 23
Joined: Tue May 13, 2008 9:12 pm
NAS Model: None

Re: QGet alternative JGet announced

Postby Pali » Sun Dec 21, 2008 5:04 pm

CasperTDK wrote:Back to your original script though:
I tried changing the temp directory to DIR=/Users/caspertdk/Documents/Torrents
The whole thing still works in terminal, but yeah, same result using flashgot. It does not even execute wget *sigh*. Which also means that, even if I had zenity installed, it wouldn't matter, since if wget does not execute, curl wouldn't either. No error would be displayed

I did't have time yet to test script on OS X environment. But one obvious reason can be PATH variable. Add path variable beginning of the script (after #!/bin/sh line) or change absolute paths to binaries.

PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
or
/usr/bin/wget (or where wget is)
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 21, 2008 8:19 pm

Pali wrote:
CasperTDK wrote:Back to your original script though:
I tried changing the temp directory to DIR=/Users/caspertdk/Documents/Torrents
The whole thing still works in terminal, but yeah, same result using flashgot. It does not even execute wget *sigh*. Which also means that, even if I had zenity installed, it wouldn't matter, since if wget does not execute, curl wouldn't either. No error would be displayed

I did't have time yet to test script on OS X environment. But one obvious reason can be PATH variable. Add path variable beginning of the script (after #!/bin/sh line) or change absolute paths to binaries.

PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
or
/usr/bin/wget (or where wget is)


You sir, are awesome. It works. The script works perfectly now.

Thank you again
CasperTDK
Starting out
 
Posts: 23
Joined: Tue May 13, 2008 9:12 pm
NAS Model: None

Re: QGet alternative JGet announced

Postby CasperTDK » Sun Dec 21, 2008 8:58 pm

Oh yeah, last request. I tried enabling a log. So I can verify that the file has been transitted properly.

Although, the issue is back to some degree.

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

#Save output for reference and potentially debugging
echo "$INFO">>log.txt


I have added this. The whole code still works, but it won't output results to log.txt.
If I run the code in terminal, it works :D

and yeah, the script and log.txt is set to 777 :)
CasperTDK
Starting out
 
Posts: 23
Joined: Tue May 13, 2008 9:12 pm
NAS Model: None

Re: QGet alternative JGet announced

Postby Pali » Sun Dec 21, 2008 11:01 pm

CasperTDK wrote:Oh yeah, last request. I tried enabling a log. So I can verify that the file has been transitted properly.

Although, the issue is back to some degree.

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

#Save output for reference and potentially debugging
echo "$INFO">>log.txt


I have added this. The whole code still works, but it won't output results to log.txt.
If I run the code in terminal, it works :D

and yeah, the script and log.txt is set to 777 :)

One solution is to use growl and send notification from script. Growl is commonly used notification system in OS X (http://growl.info/).
/usr/local/bin/growlnotify -m "send2nas: $CURL_OUTPUT"
this will give you nice transparent notification, which fade out automatically. I did not test command, but google will help if it does not work :D

Anyway, I think that you need give absolute path for log.txt, example /Users/caspertdk/Documents/Torrents/log.txt. Also $? = 0 might not work, better use $? = "0" or $? --eq 0
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 21, 2008 11:24 pm

Pali wrote:
CasperTDK wrote:Oh yeah, last request. I tried enabling a log. So I can verify that the file has been transitted properly.

Although, the issue is back to some degree.

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

#Save output for reference and potentially debugging
echo "$INFO">>log.txt


I have added this. The whole code still works, but it won't output results to log.txt.
If I run the code in terminal, it works :D

and yeah, the script and log.txt is set to 777 :)

One solution is to use growl and send notification from script. Growl is commonly used notification system in OS X (http://growl.info/).
/usr/local/bin/growlnotify -m "send2nas: $CURL_OUTPUT"
this will give you nice transparent notification, which fade out automatically. I did not test command, but google will help if it does not work :D

Anyway, I think that you need give absolute path for log.txt, example /Users/caspertdk/Documents/Torrents/log.txt. Also $? = 0 might not work, better use $? = "0" or $? --eq 0


Yeah, absolute path was all that it needed. Feel kinda stupid now. But thanks again, everything works exactly like I want it to :)
CasperTDK
Starting out
 
Posts: 23
Joined: Tue May 13, 2008 9:12 pm
NAS Model: None

Re: QGet alternative JGet announced

Postby Sargan » Tue Jan 27, 2009 7:38 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 Nicolas .. well I'm trying to write a shell script to modify the bandwidth paramerets ( upParam , downParam ) and use cron for throw this script.

You can tell me the especification of the request to btoption comand ?
it will be something like ... ( http://192.168.1.130:8080/cgi-bin/Qdown ... i?upParam="50"& downParam="50" & name=add_submit
)
or how can i do that in my NAS.



Thanks
Sargan
Starting out
 
Posts: 17
Joined: Tue Jan 27, 2009 5:51 pm
NAS Model: TS-109/209 Pro

Re: QGet alternative JGet announced

Postby sabbelgreth » Fri Jan 30, 2009 3:20 am

Hi,

If you want to move a job up, it would be rather /cgi-bin/Qdownload/btoption.cgi?name=up&index=50

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

Re: QGet alternative JGet announced

Postby Sargan » Fri Jan 30, 2009 3:24 pm

sabbelgreth wrote:Hi,

If you want to move a job up, it would be rather /cgi-bin/Qdownload/btoption.cgi?name=up&index=50

Cheers


Well but how can I call this cgi ? it's like this ..

Code: Select all
#!/bin/bash

/home/httpd/cgi-bin/Qdownload/btoption.cgi ? name=up & index=50
/home/httpd/cgi-bin/Qdownload/btoption.cgi ? name=down & index=100


but I run it, and doens't work.
Sargan
Starting out
 
Posts: 17
Joined: Tue Jan 27, 2009 5:51 pm
NAS Model: TS-109/209 Pro

Re: QGet alternative JGet announced

Postby Pali » Sun Feb 08, 2009 4:38 pm

Sargan wrote:I
Code: Select all
#!/bin/bash

/home/httpd/cgi-bin/Qdownload/btoption.cgi ? name=up & index=50
/home/httpd/cgi-bin/Qdownload/btoption.cgi ? name=down & index=100


but I run it, and doens't work.


You can't call url's directly from shell script. Use eaxample curl, to handle http protocol. See help from man pages (man curl) and hint from my script (few pages backward).
Pali
New here
 
Posts: 8
Joined: Fri Feb 15, 2008 2:03 am
NAS Model: TS-119/219

Re: QGet alternative JGet announced

Postby Tabit » Wed Feb 18, 2009 11:29 pm

I have installed JGet on Ubuntu Hardy and it works brilliantly, even managed to associate Torrent files with it so it works just like QGet. But it seems that you can't get it to connect to DNS addresses, only straight IPs. On QGet this is possible. Would it be possible to implement this, as it seems like a fairly simple thing to do?

Thanks :D
Tabit
New here
 
Posts: 7
Joined: Wed Jul 30, 2008 9:19 pm
NAS Model: TS-109/209 Pro

Re: QGet alternative JGet announced

Postby sjaglin » Tue Mar 10, 2009 6:22 pm

Hi,

Just installed Jget on my eeepc (Mandriva 2009) in order to control my TS-109, works a treat, thank you very much for that software!

Stef
sjaglin
Getting the hang of things
 
Posts: 53
Joined: Sat Sep 15, 2007 2:52 am

PreviousNext

Return to Download Station and QGet

Who is online

Users browsing this forum: No registered users and 2 guests