DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#226 2010-03-27 18:11:52

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Automatic for funplug-0.5

@NagyBandi  You can type 'automatic -h', which will display the normal help for Automatic, but also show the version.

@krystian  Automatic only works with RSS feeds that contain direct links to torrent files. If the feed items only refer to a details page where the actual download link is mentioned, Automatic won't work. (As you already said, it always assumes that the file it downloaded from a link within the RSS is a torrent, and it will send it to Transmission no matter what. Transmission though will detect if it's an actual torrent file or not).

Offline

 

#227 2010-03-27 23:58:54

krystian
Member
Registered: 2008-07-10
Posts: 7

Re: [REL] Automatic for funplug-0.5

Thanks. Thats what I also though. Are there any plans on changing this functionality?

Offline

 

#228 2010-03-28 00:22:53

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Automatic for funplug-0.5

No, not really. Parsing a HTML page for a link is much more difficult than an RSS feed.
a) What if there are multiple torrent links in that HTML?
b) What if the link isn't clearly pointing to a torrent file (i.e. http://example.com/download.php?id=12345)
and proably some other difficulties.

RSS is especially laid out to avoid such ambiguities, that's why most sites rely on parsing this instead of a HTML page.

I know there are some alternative tools out there that offer the functionality you're looking for, but they too can only use some sort of heuristic to "guess" which link to use.

Many private trackers already offer separate RSS feeds, one with links to the Details page, and another one with download links. I would advise you to ask your site administrator to look into this.

Offline

 

#229 2010-03-29 19:45:29

blase
Member
Registered: 2009-09-12
Posts: 9

Re: [REL] Automatic for funplug-0.5

Good at all

I have configured automatic, but can not get anything down I looked in the logs but I do not see where you can be the error.

automatic attach the log, I modified some data as the URL of traker and customer user and pass torrent.

Thanks

P.D.

Excuse my English


Attachments:
Attachment Icon automatic_log.txt, Size: 11,907 bytes, Downloads: 1,142

Offline

 

#230 2010-03-29 20:02:32

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Automatic for funplug-0.5

Looking at the log it seems  to me that the at the time you tried this the feed simply didn't contain anything that matches your filters.
Also, some of the filters are wrong, as they are not real regular expressions:

Code:

"RSS.Item.2x*"

The asterisk "*" means "the previous character exists 0 times or any number of times. So this expression matches "RSS.Item.2", "RSS.Item.2x", "RSS.Item.2xx" and so on.

To correct the pattern, put a dot (.) before the asterisk. The dot is s placeholder for "any character":

Code:

"RSS.Item.2x.*"

Some of your patterns contain the expression "*.". Especially at the beginning of a pattern this is wrong. You need to switch this around, so it means "any character, any number of times".

Last but not least: Automatic cannot deal with private torrent sites yet that require uid/pass as in your URL. I've implemented this already though and a new release should be ready in the coming weeks.

Last edited by KyleK (2010-05-16 19:42:58)

Offline

 

#231 2010-03-30 10:12:02

blase
Member
Registered: 2009-09-12
Posts: 9

Re: [REL] Automatic for funplug-0.5

thanks

we are waiting for the new version

Offline

 

#232 2010-04-07 14:48:46

r2d290
Member
Registered: 2010-04-07
Posts: 25

Re: [REL] Automatic for funplug-0.5

I've a little problem to edit the conf-file.
Am I supoused to edit it through telnet or notepad? I'm able to open the text with notepad, and I can read what is written there, but everything is just messed up. The "#" is randomly placed around in the text, an there is no end-lines in the text.

And through telnet, i've tried to open it with "vim" and "pico", but this read-option is not installed, and I'm no expert in linux.



Btw: I have an other anoying problem. I'm only able to set the ffproot-folder with read/write access. But not in the subfolders inside this folder. I've browsed to the folder with the userinterface, and alowed everyone to read and write, but still, I cant create new folders or edit the .conf-file.
But, it works to copy the .conf-file directly to the ffproot-folder, then edit the file, then move it to the correct adress with the "mv"-command in telnet.
Is there any way to do this easier?


(Sorry for my bad english. Please let me know if I've written something you don't understand smile )



edit: I solved the first problem by using the program "Emacs" in windows. I guess there is many other ways to do it, but this method worked verry well smile

Last edited by r2d290 (2010-04-07 16:30:02)

Offline

 

#233 2010-04-07 21:11:30

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Automatic for funplug-0.5

Just for a little explanation: Windows uses 2 invisiable characters ("\r\n") as indicator when to break to a new line in a textfile, but Linux only uses one ("\n"). That's why the file looked all messed up in Notepad.

There are many editors for available for Windows though that do understand the Linux file format, for example Notepad++ or ScITE (or Emacs, as you've already found it smile.


To be able to edit the files directly in Windows via a network share, the user you're accessing the network share with must have read & write rights on the file(s).

Last edited by KyleK (2010-05-16 19:43:16)

Offline

 

#234 2010-04-07 23:05:52

r2d290
Member
Registered: 2010-04-07
Posts: 25

Re: [REL] Automatic for funplug-0.5

Thank you. That explanes my problem.


I thought I gave myself permisions for read and write, but I don't realy care.  It works when I move the file through the telnet, and I will not edit the file every day, so I guess I can live with the problem until I find a solution smile

I assume that "#" is a coment-sign, and that i should uncomment example this line: # rpc-port = 9091 ?
If so, what is the reason why it's commented?


Thanks for fast reply, and I hope I will be satisfied with your program smile

Offline

 

#235 2010-04-07 23:12:15

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Automatic for funplug-0.5

Yes, lines beginning with # are commented out and hence ignored by Automatic.
Transmission default RPC port is 9091. If you haven't changed it to something else, then Automatic will use the default as well.

Hence it's commented out.

Offline

 

#236 2010-04-09 07:53:49

nyunyu
Member
Registered: 2009-05-03
Posts: 44
Website

Re: [REL] Automatic for funplug-0.5

Can anyone help me with the patterns?
Can  you confirm my pattern are correct?

Code:

patterns =  { "[UTW]_B_Gata_H_Kei_-_*[0-9]_*XviD"
"[Doki] Chu-Bra!! - *[1-9] *mkv"

            }

Thank you.


DNS323 + 2x1TB WD GREEN + Fun Plug 0.5 (Fonz) + Transmission 1.92 + Automatic 0.6 = GREAT!
Looking for Auto Direct Download script if possible smile

Offline

 

#237 2010-04-09 15:40:58

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Automatic for funplug-0.5

I would assume that these patterns currently don't work for you.

1. The brackets '[]' are regular expression characters (as you used them in the pattern [0-9]). But I believe "[UTW]" is not meant to be a regular expression, so you have to escape these brackets: "\[UTW\]".
2. The asterisk '*' means that the character right before it (in this case the underscore) may exist 0 or more times. This is not what you want either. Change '*' to '.*'
3. Whitespaces can be problematic in a regular expression. It is best you replace them either with '\s', or the universal character '.'

If you send me some examples of actual filenames I can create a regular expression for you.

Offline

 

#238 2010-04-09 18:45:32

r2d290
Member
Registered: 2010-04-07
Posts: 25

Re: [REL] Automatic for funplug-0.5

I think I'm not far away from the goal now. I get automatic to find the torrentfeed, and the filter works at it should. What do I now need to do to have "Transmission" to start downloading the torrent?

root@nsa220plus:/ffp/etc# automatic -f
../src/automatic.c, 522: 1 feed URLs
../src/automatic.c, 523: Read 3 patterns from config file
../src/state.c, 100: [load_state] Error: Unable to open statefile '/root/.config                                                   /automatic.state' for reading: No such file or directory
[10/04/09 16:11:34] ../src/automatic.c, 383: Found new download: WWE.Friday.Nigh                                                   t.Smackdown.2010.04.09.720p.HDTV.x264-WB (http://torrents.thepiratebay.org/54879                                                   90/WWE.Friday.Night.Smackdown.2010.04.09.720p.HDTV.x264-WB.5487990.TPB.torrent)
../src/torrent.c, 131: sendHTTPData() failed!
../src/state.c, 66: Saving state (1 downloaded torrents) to disk
../src/state.c, 68: Error: Unable to open statefile '/root/.config/automatic.sta                                                   te' for writing: No such file or directory
../src/web.c, 421: [getHTTPData] 'http://rss.thepiratebay.org/205': Couldn't connect to server

Here is the config-file:

##############################
## Version-specific options ##
##############################

# Transmission version. Options are "1.2", "1.3", and "external"
transmission-version = "1.3"

# Call an external program instead of transmission directly
#
# If you use this, set transmission-version to "external"
# For best results, use an absolute path to the executable
# Executable is passed a single parameter, the name of the .torrent
# file that was downloaded.  The .torrent file passed to this external
# program may be removed after the program returns.
# The program should return exit code 0 for success and non-0 for failure
# Automatic won't respond to ctrl-C while waiting for this to return
#
# transmission-external = "/usr/local/bin/custom-add-torrent"

# For Transmission 1.3x and newer only: set the host on which Transmission runs (default: localhost)
# rpc-host = "localhost"

# For Transmission 1.3x and newer only: set the RPC port on which Transmission & Clutch communicate (default: 9091)
# rpc-port = 9091

# For Transmission 1.3x and newer only: If you configured Transmission/Clutch to use password authentication, Automatic needs that information as well
# rpc-auth = "user:password"

# For Transmission 1.2x only: Path to the Transmission configuration files
# transmission-home = "~/.config/transmission"


#####################
## General options ##
#####################


# list of feed URLs. You can specify one or more feeds, in case of the latter use curly brackets (see the "patterns" option for an example)
url = "http://rss.thepiratebay.org/205"

# interval in minutes between checks for new downloads
interval = 1

# Limit upload speed (in KB/s) for each torrent that is added to Transmission via Automatic
#upload-limit = 10

# Automatically add downloaded torrents to Transmission (requires
# transmission-daemon and transmission-remote to be installed or use
# of "external" option)
# If this is not set, all Automatic will do is save the .torrent file.
use-transmission = yes

# Instruct Transmission to immediately start downloading torrents after being added
# If set to 'no' torrents will be added in a paused state
start-torrents = yes

# path where Automatic will store downloaded torrents
torrent-folder = "/tmp"

# path to the file which stores information about already downloaded torrents (so they don't get readded to Transmission)
statefile = "~/.config/automatic.state"

# Prowl API key. You can use this to send push notifications to an iPhone. See http://prowl.weks.net for more information
#prowl-apikey = ""

# patterns contains a number of regular expressions which are matched against the RSS feed entries
# please don't use curly brackets within a regular expression, it'll horribly break the configuration parser smile
# letter-casing does not matter

patterns =  {
          "WWE"
          "Something.else.to.download.*720p"
              "(?!.*720p)Some.Video.But.Not.The.HD.Version"
            }

Offline

 

#239 2010-04-09 18:52:31

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Automatic for funplug-0.5

First you uncomment the option "rpc-host". I assume Automatic and Transmission are running on the same machine, so you can leave the parameter as "localhost".

If you protected Transmission with a login, then also uncomment "rpc-auth" and set login and password appropriately.

After that Automatic should automatically add any downloads to Transmission.

Offline

 

#240 2010-04-09 19:33:31

r2d290
Member
Registered: 2010-04-07
Posts: 25

Re: [REL] Automatic for funplug-0.5

Fabulous! Now it works. Thank you smile

Next up now is to wait for the next update that suports private trackers. Can't wait big_smile

Offline

 

#241 2010-04-10 02:22:53

nyunyu
Member
Registered: 2009-05-03
Posts: 44
Website

Re: [REL] Automatic for funplug-0.5

KyleK wrote:

I would assume that these patterns currently don't work for you.

1. The brackets '[]' are regular expression characters (as you used them in the pattern [0-9]). But I believe "[UTW]" is not meant to be a regular expression, so you have to escape these brackets: "\[UTW\]".
2. The asterisk '*' means that the character right before it (in this case the underscore) may exist 0 or more times. This is not what you want either. Change '*' to '.*'
3. Whitespaces can be problematic in a regular expression. It is best you replace them either with '\s', or the universal character '.'

If you send me some examples of actual filenames I can create a regular expression for you.

KyleK, here is the file name that I want to download:
[UTW]_B_Gata_H_Kei_-_02v2_[h264_720p][75413583].mkv.torrent
[UTW]_Gata_H_Kei_-_01_[XviD][F15F1392].avi.torrent

And is this correct?
              "Chuck.*S0[3-9]E.*xvid"

Thank you.


DNS323 + 2x1TB WD GREEN + Fun Plug 0.5 (Fonz) + Transmission 1.92 + Automatic 0.6 = GREAT!
Looking for Auto Direct Download script if possible smile

Offline

 

#242 2010-04-11 13:55:01

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Automatic for funplug-0.5

Removed.

Last edited by KyleK (2010-05-16 19:43:55)

Offline

 

#243 2010-04-11 15:23:46

nyunyu
Member
Registered: 2009-05-03
Posts: 44
Website

Re: [REL] Automatic for funplug-0.5

KyleK wrote:

Sorry nyunyu, totally forgot about you smile

Ok, here are the patterns:

Code:

pattern = "\[UTW\].+Gata_H_Kei_-_\d+.*(xvid|h264)"
pattern = "\[Doki\].+Chu\-Bra"

The Chuck pattern is correct.

No worries, smile
Thank you for the help.


DNS323 + 2x1TB WD GREEN + Fun Plug 0.5 (Fonz) + Transmission 1.92 + Automatic 0.6 = GREAT!
Looking for Auto Direct Download script if possible smile

Offline

 

#244 2010-04-11 18:25:17

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Automatic for funplug-0.5

Ok guys,

I've updated Automatic to v0.6 bringing the much-requested support for private tracker feeds, as well as separate download folders per filter.

You can download the new version here.

Unfortunately, I've had only one website to test this with, and I do know that there are multiple implementations used by the private sites, so this might not work for everyone.
Also, it's not very user-friendly to set up, so I'm going to post the instructions only here, at the end of the thread for now, and will update the first post later, after I've got some feedback from you guys.

Ok, let's get started!

1. Feeds

So far, you've specified RSS feeds with the "url" option in the config file:

Code:

url = { "http://myfirstfeed.com/rss.xml"
        "http://betterfeed.com/rss.php"
     }

This is still supported to remain backwards-compatible, and if you only use public feeds you can leave everything just as it is now.

The new way to specify feeds goes like this:

Code:

feed = { url => "http://myfirstfeed.com/rss.xml"
         cookies => "uid=12345;pass=abcde98765"
       }

feed = { url => "http://betterfeed.com/rss.php?:COOKIE:uid=12345;pass=abcde98765;session=98328sdsd982389sd" }

The hard part for you is to figure out which cookies are required. Some tracker sites already give you the proper URL, so this shouldn't be too hard.
If not, you need to check which cookies your browser stores for the website and add those to the config file manually.

If the URL contains the sequence "?:COOKIE:", Automatic will parse everything after that string automatically and use it as cookies, so you don't have to specify them separately.

I'm really sorry that this is as complicated as it is, but there's not much I can do about it.

2. Filters

Similar to feeds, the "patterns" option has gotten a facelift as well:

Code:

filter = { pattern => "Name.of.Something.I.Want.to.Download.Automatically.*"
           folder => "/mnt/HD_a2/Downloads/Automatic"
         }

Now you can specify a specific download folder for each pattern, so any particular matches will land in that directory.
You can omit the "folder" sub-option of course, then the downloads go to Transmissions default download folder.
You can define as many "filter" options in the config file as you want.

The previous "patterns" option is still supported, so if you don't want to download into separate folders you won't have to update your config file.


Please give me as much feedback on this as you can (it works, it doesn't work, Automatic crashes, etc.). You're gonna be my beta testers for a while :)

Last edited by KyleK (2010-05-16 19:44:44)

Offline

 

#245 2010-04-12 03:55:03

nyunyu
Member
Registered: 2009-05-03
Posts: 44
Website

Re: [REL] Automatic for funplug-0.5

Nice updates.
Thank you KyleK.


DNS323 + 2x1TB WD GREEN + Fun Plug 0.5 (Fonz) + Transmission 1.92 + Automatic 0.6 = GREAT!
Looking for Auto Direct Download script if possible smile

Offline

 

#246 2010-04-12 05:24:45

nyunyu
Member
Registered: 2009-05-03
Posts: 44
Website

Re: [REL] Automatic for funplug-0.5

KyleK,

Folder filter is awesome.
Want to know, if I have several series and want them all to be stored in /Anime/ folder,
Should I repeat the "filter"  or can I use bracket?

Should I do it like this:

Code:

 filter = { pattern => { "\[UTW\].+Gata_H_Kei_-_\d+.*(xvid|h264)"
"\[Doki\].+Chu\-Bra"
}
           folder => "/mnt/HD_a2/media/anime"
         }
filter = { pattern => { "Chuck.*S0[3-9]E.*xvid"
"Heroes.*S0[4-9]E.*xvid"
"Merlin.*S0[3-9]E.*xvid"
}
           folder => "/mnt/HD_a2/media/tv series"
         }

Or like this:

Code:

filter = { pattern => "\[UTW\].+Gata_H_Kei_-_\d+.*(xvid|h264)"
           folder => "/mnt/HD_a2/media/anime"
         }
filter = { pattern => "\[Doki\].+Chu\-Bra"
           folder => "/mnt/HD_a2/media/anime"
         }
filter = { pattern => "Chuck.*S0[3-9]E.*xvid"
           folder => "/mnt/HD_a2/media/tv series"
         }
filter = { pattern => "Heroes.*S0[4-9]E.*xvid"
           folder => "/mnt/HD_a2/media/tv series"
         }
filter = { pattern => "Merlin.*S0[3-9]E.*xvid"
           folder => "/mnt/HD_a2/media/tv series"
         }

Also, the "\[Doki\].+Chu\-Bra" pattern, how to specify from which episodes I want to download?

Thanks in advance.




==================
UPDATE
==================

Got this when trying to start automatic.

Code:

Starting /ffp/bin/automatic -c /ffp/etc/automatic.conf
../src/config_parser.c, 491: parse error at line 117 (pos: 4610)
Error parsing config file: Unknown error
[10/04/12 10:39:00] ../src/automatic.c, 128: Shutting down daemon

Last edited by nyunyu (2010-04-12 05:39:32)


DNS323 + 2x1TB WD GREEN + Fun Plug 0.5 (Fonz) + Transmission 1.92 + Automatic 0.6 = GREAT!
Looking for Auto Direct Download script if possible smile

Offline

 

#247 2010-04-12 12:57:17

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Automatic for funplug-0.5

You can currently specify only 1 pattern per filter, so your first example would be wrong. You have to do it like in the second example.
This should also explain the error you got when starting Automatic.

Offline

 

#248 2010-04-12 13:19:17

nyunyu
Member
Registered: 2009-05-03
Posts: 44
Website

Re: [REL] Automatic for funplug-0.5

Thanks KyleK, I did use the second patterns and it shows as error. So, I remove automatic and reinstall it again and all is fine now.
Btw, about the second question,
"\[Doki\].+Chu\-Bra" pattern, how to specify from which episodes I want to download?


DNS323 + 2x1TB WD GREEN + Fun Plug 0.5 (Fonz) + Transmission 1.92 + Automatic 0.6 = GREAT!
Looking for Auto Direct Download script if possible smile

Offline

 

#249 2010-04-12 18:49:30

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Automatic for funplug-0.5

Well, on what criteria do you want to select? By type (eg. H.264 or XviD) or only certain episodes (for example "episode 12 and later")?

Offline

 

#250 2010-04-12 20:50:31

nyunyu
Member
Registered: 2009-05-03
Posts: 44
Website

Re: [REL] Automatic for funplug-0.5

I would like to select an episode like episode 3 and later with xvid type.


DNS323 + 2x1TB WD GREEN + Fun Plug 0.5 (Fonz) + Transmission 1.92 + Automatic 0.6 = GREAT!
Looking for Auto Direct Download script if possible smile

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB