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.

#801 2013-06-24 02:42:37

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: [REL] Automatic for funplug-0.5

Hey don't take my comments the wrong way either. I'm just a user. What you are asking is something similar to that which others have asked for too. If you need help with some scripts in the meantime maybe we can help.


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#802 2013-06-24 03:28:20

punchinello
Member
Registered: 2013-06-22
Posts: 6

Re: [REL] Automatic for funplug-0.5

I am currently reading about string manipulation, this is what my bash script currently looks like:

Code:

#!/bin/bash
readonly BASEDIR=/mnt/TV
readonly STYL_NUM=[sS][0-9][0-9]
readonly STYL_YEAR=[0-9][0-9][0-9][0-9]
readonly HDTV=720p.HDTV.x264
readonly WEB=1080p.WEB-DL.DD5.1.H.264

# case insensitive for flexible regex matching
shopt -s nocasematch

for f in *.torrent
do
  echo Parsing information from $f
  # determine style of naming scheme
  if [[ $f =~ $STYL_NUM ]]; then
    styl=$STYL_NUM
  elif [[ $f =~ $STYL_DATE ]]; then
    styl=$STYL_YEAR
  else
    echo STYLE UNKNOWN
    continue
  fi

  # get show name
  # passing a variable to awk and expanding its value (http://www.unix.com/shell-programming-scripting/151742-awk-variables-regex-expression.html)
  show=$(echo $f | awk '{gsub(/.'"$styl"'.*/,x)}1')
  echo Show Name: $show

  # get two-digit season number or four-digit season year
  season=$(echo $f | grep -o "$styl")
  echo Season: $season

  # get quality designated suffix
  if [[ $f =~ $HDTV ]]; then
    qual=$HDTV
  elif [[ $f =~ $WEB ]]; then
    qual=$WEB
  else
    echo UNKNOWN QUALITY
    continue
  fi
  echo Quality: $qual

  # finalize download directory
  ddir=$BASEDIR/$show/$show.$season.$qual
  echo -e Download Directory: $ddir "\n"

  # add torrent with download directory set by matched information and trash torrent file
  transmission-remote --no-start-paused -a "$f" -w "$ddir" && trash-put "$f"
done

Last edited by punchinello (2013-06-25 03:02:30)

Offline

 

#803 2013-06-24 07:20:50

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: [REL] Automatic for funplug-0.5

I was assuming that you would let Automatic handle the torrent collection then let Transmission handle the download, then uses the post-download option to call your script to "place" it, the download file(s), wherever you wanted rather than manipulate the torrent file. In any case, I'd suggest starting a new thread for script writing.


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#804 2013-06-24 07:40:19

punchinello
Member
Registered: 2013-06-22
Posts: 6

Re: [REL] Automatic for funplug-0.5

FunFiler wrote:

I was assuming that you would let Automatic handle the torrent collection then let Transmission handle the download, then uses the post-download option to call your script to "place" it, the download file(s), wherever you wanted rather than manipulate the torrent file. In any case, I'd suggest starting a new thread for script writing.

If I don't download files to their permanent resting place, then I run into IO blocking issues performing large moves with transmission that frequently lead to failure.

Offline

 

#805 2013-07-02 12:31:41

whiteout
Member
Registered: 2011-09-06
Posts: 31

Re: [REL] Automatic for funplug-0.5

KyleK wrote:

If the NAS is on the same network as your notebook/PC, it should have the same access.

Unless there's some firewall blocking outgoing connections from your NAS, I don't know what could be the reason.

I really cant figure out whats wrong since it works fine from a browser.

Can you possibly help me out compiling the latest version of Automatic like you did a year ago?

Offline

 

#806 2013-07-02 14:42:12

frdkenny
New member
Registered: 2013-07-02
Posts: 3

Re: [REL] Automatic for funplug-0.5

hello
i'm trying to install automatic but when i start it i got this in the file "automatic.log":

../src/automatic.c, 702: Automatic version: 0.8.2 (4ceb0cc)
../src/config_parser.c, 258: Invalid suboption string: '"'
../src/state.c, 102: [load_state] Error: Unable to open statefile '/ffp/home/root//.config/automatic.state' for reading: No such file or directory
../src/automatic.c, 290: 1 feed URLs
../src/automatic.c, 291: Read 2 filters from config file
[13/07/02 11:36:32] ../src/automatic.c, 736: Daemon started


something goes wrong?
thanks for your help

Last edited by frdkenny (2013-07-02 14:43:11)


Attachments:
Attachment Icon automatic.log, Size: 420 bytes, Downloads: 452

Offline

 

#807 2013-07-02 17:19:11

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: [REL] Automatic for funplug-0.5

frdkenny wrote:

Error: Unable to open statefile '/ffp/home/root//.config/automatic.state' for reading: No such file or directory

In the startup script [automatic.sh] you should have a line like:
CFG_FILE="/ffp/etc/automatic.conf"

It points to the configuration file [automatic.conf]. Within that file there is a line like:
statefile = "/ffp/tmp/automatic.state"

Ensure that the path that YOU use is accessible to the user you are running Automatic as.

Either the path you specified does not exist OR the user does not have access and you need to change permissions.

Note the examples above reflect MY setup. I forget what the default values are.

Last edited by FunFiler (2013-07-02 17:19:41)


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#808 2013-07-02 17:25:44

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: [REL] Automatic for funplug-0.5

punchinello wrote:

If I don't download files to their permanent resting place, then I run into IO blocking issues performing large moves with transmission that frequently lead to failure.

Personally, I would resolve that issue instead. I have no issues moving files, small or large, post-download either to the same disk, the second disk in the NAS or to a second NAS unit.


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#809 2013-07-02 17:51:30

frdkenny
New member
Registered: 2013-07-02
Posts: 3

Re: [REL] Automatic for funplug-0.5

FunFiler wrote:

frdkenny wrote:

Error: Unable to open statefile '/ffp/home/root//.config/automatic.state' for reading: No such file or directory

In the startup script [automatic.sh] you should have a line like:
CFG_FILE="/ffp/etc/automatic.conf"

It points to the configuration file [automatic.conf]. Within that file there is a line like:
statefile = "/ffp/tmp/automatic.state"

Ensure that the path that YOU use is accessible to the user you are running Automatic as.

Either the path you specified does not exist OR the user does not have access and you need to change permissions.

Note the examples above reflect MY setup. I forget what the default values are.

ok i changed the path and created a folder; automatic.log has changed but i'm not sure it's working now:

../src/automatic.c, 702: Automatic version: 0.8.2 (4ceb0cc)
../src/config_parser.c, 258: Invalid suboption string: '"'
../src/state.c, 111: Restored 0 old entries
../src/automatic.c, 290: 1 feed URLs
../src/automatic.c, 291: Read 2 filters from config file
[13/07/02 14:49:26] ../src/automatic.c, 736: Daemon started

Offline

 

#810 2013-07-02 22:15:19

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

Re: [REL] Automatic for funplug-0.5

There's a stray quote somewhere in your config file (I guess inside a 'feed' or 'filter' option, which is why there's a warning in the log.

Through this I actually found a tiny memleak in the code, so thanks, I guess! smile

Offline

 

#811 2013-07-03 01:34:40

frdkenny
New member
Registered: 2013-07-02
Posts: 3

Re: [REL] Automatic for funplug-0.5

found it, it works fine thank you!

Offline

 

#812 2013-07-06 20:38:10

whiteout
Member
Registered: 2011-09-06
Posts: 31

Re: [REL] Automatic for funplug-0.5

Anyone else having problems with feeds from torrentleech?

Offline

 

#813 2013-07-15 20:53:07

wolfgang1986
New member
Registered: 2013-07-15
Posts: 3

Re: [REL] Automatic for funplug-0.5

hallo... im a totally noop to this transmissin and automatic.

i have installed transmission and it works.

now i have try to install automatic 0.8.3 with the slacker command on my NSA325

and i have edited automatic.conf but im stuck when i come to this part:

feed =  {  url          => ""
           cookie       => ""
           id           => 1
           url_pattern  => ""
           url_replace  => ""         
        }

my english is not the best. and i got a rss code from my tracker ther looks like this. (the code is changed for privacy)

https://danishbits.org/rss.php?id=0& … 95ec473b73

And i can't make the directory for Automatic.state

Can someone help me?

Offline

 

#814 2013-07-15 21:32:20

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

Re: [REL] Automatic for funplug-0.5

How about:

Code:

feed =  {  url      => "https://danishbits.org/rss.php?id=0&t=fl"
           cookie   => "auth=<auth>&passkey=<passkey>&authkey=<authkey>"
        }

(Obviously you have to put in the correct cookie values.)

Last edited by KyleK (2013-07-15 21:33:51)

Offline

 

#815 2013-07-15 21:40:24

wolfgang1986
New member
Registered: 2013-07-15
Posts: 3

Re: [REL] Automatic for funplug-0.5

then i get this:

Starting /ffp/bin/automatic -c /ffp/etc/automatic.conf -l /mnt/HD/HD_a2/.transmission-daemon/automatic.log -v 2
../src/output.c, 58: [log_init] Opening '/mnt/HD/HD_a2/.transmission-daemon/automatic.log' for logging failed
../src/automatic.c, 702: Automatic version: 0.8.3 (8da96e7)
../src/config_parser.c, 257: Invalid suboption string: 'cookie       => '
../src/config_parser.c, 257: Invalid suboption string: '"auth=93210ccf732c6c4499c6e656381d050b&passkey=92bzy4ocau58py3qcaxpe2thpsea7m4m&authkey=f3e8dacfc146f2110530ad95ec473b73" '
../src/state.c, 115: [load_state] Error: Unable to open statefile '/mnt/HD/HD_a2/.transmission-daemon/automatic.state' for reading: No such file or directory
../src/automatic.c, 265: Transmission version: 1.3
../src/automatic.c, 266: RPC host: localhost
../src/automatic.c, 267: RPC port: 9091
../src/automatic.c, 268: RPC auth: none
../src/automatic.c, 269: config file: /ffp/etc/automatic.conf
../src/automatic.c, 270: Transmission home: /root/.config/transmission
../src/automatic.c, 271: check interval: 30 min
../src/automatic.c, 272: Upload limit: -1 KB/s
../src/automatic.c, 273: torrent folder: /mnt/HD/HD_a2/.transmission-daemon/autotorrents
../src/automatic.c, 274: start torrents: yes
../src/automatic.c, 275: state file: /mnt/HD/HD_a2/.transmission-daemon/automatic.state
../src/automatic.c, 282: Transmission RPC Version: 14
../src/automatic.c, 290: 1 feed URLs
../src/automatic.c, 291: Read 2 filters from config file

Offline

 

#816 2013-07-15 22:11:28

wolfgang1986
New member
Registered: 2013-07-15
Posts: 3

Re: [REL] Automatic for funplug-0.5

But i can't still not make the state file,

and where i find the cookie values?

Offline

 

#817 2013-07-17 07:28:43

PhynaeusKlaw
New member
Registered: 2013-07-17
Posts: 1

Re: [REL] Automatic for funplug-0.5

Thanks for the great utility. I'm using Automatic to pull down torrents to a watch folder on my Ubuntu 13.04 server. I'm new to the server/non-gui world of linux so my problem is probably be easily fixed by anyone with a decent clue...

I can start automatic by simply running the 'automatic' command from the command line. Everything appears to work properly when I do that.

Here's my question: How do I get automatic to run as a daemon automatically at startup?

Thanks, in advance, for your help!

Edit: I should note that I am NOT using Transmission to download my torrents. I am using qBittorrent running in daemon mode. I mayswitch to Transmission in the future, but this is working right now...

Last edited by PhynaeusKlaw (2013-07-17 07:33:09)

Offline

 

#818 2013-07-19 12:39:50

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

Re: [REL] Automatic for funplug-0.5

I know that Ubuntu, like any other Linux distribution, has a method of running daemons at startup.
But, snce I use Automatic solely on my NAS, together with funplug, I don't know how Ubuntu specifically does that.

I would assume that there's a folder /etc/init.d which contains startup scripts for daemons.
Maybe someone else with more Linux/Ubuntu experience can weigh in?

Offline

 

#819 2013-07-19 12:51:18

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

Re: [REL] Automatic for funplug-0.5

wolfgang1986 wrote:

hallo... im a totally noop to this transmissin and automatic.

i have installed transmission and it works.

now i have try to install automatic 0.8.3 with the slacker command on my NSA325

and i have edited automatic.conf but im stuck when i come to this part:

feed =  {  url          => ""
           cookie       => ""
           id           => 1
           url_pattern  => ""
           url_replace  => ""         
        }

my english is not the best. and i got a rss code from my tracker ther looks like this. (the code is changed for privacy)

https://danishbits.org/rss.php?[...]

And i can't make the directory for Automatic.state

Can someone help me?

Just put the complete link in the "url" field of the "feed" property, and leave out the others:

Code:

feed =  {  url  => "<your complete URL here>" }

Offline

 

#820 2013-08-13 06:23:36

steviethekidd
Member
Registered: 2012-03-17
Posts: 7

Re: [REL] Automatic for funplug-0.5

Kyle,

I've been trying to think of a way of (similar what to flexget does) setting up individual rss feed filters.  Right now, I'm using a list of regex filters but I also have a "bookmark" SSL RSS feed that I'd like to grab whatever I use my regex for.

I'd also like to set up a "smarter" version of storing already downloaded torrents.  there's so many instances where I'll snag the same thing twice but they're just a few characters different in the torrent name.

Thanks for all of your hard work btw, been using this for a long time now.

Offline

 

#821 2013-08-18 09:08:32

Mirgolth
New member
Registered: 2013-08-18
Posts: 1

Re: [REL] Automatic for funplug-0.5

Hi guys,

I'm facing an "invalid" RSS feed. Indeed, it's using a single guid for all its torrents. As Automatic is using the guid for storing its state file, after any torrent from this feed is downloaded, all other torrents are seen as duplicates as their guid is identical and nothing can be downloaded anymore.

Whould you see a way to worlaround this on Automatic side ? (I also raised the issue to the RSS feed devs)

FYI, I'm using Automatic on a Raspberry Pi and It's working great. For anyone interested a XBMC package for RPi is avaivalable here : http://dl.dropboxusercontent.com/u/8224 … -3.1.1.zip . It contains the binaries so you can use in on any RPi ditrib even without XBMC.

Offline

 

#822 2013-08-18 13:07:37

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

Re: [REL] Automatic for funplug-0.5

Well, programatically there is certainly a way to work around the issue, but it would not be the right thing to do. RSS is a standard, and Automatic must assume that all feeds are compliant with this standard.
This is clearly a faulty implementation on the feed side, and the authors should fix it.
(This issue most certainly breaks any other RSS feed manager/downloader out there, not just Automatic).

Offline

 

#823 2013-08-18 13:13:30

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

Re: [REL] Automatic for funplug-0.5

steviethekidd wrote:

Kyle,

I've been trying to think of a way of (similar what to flexget does) setting up individual rss feed filters.  Right now, I'm using a list of regex filters but I also have a "bookmark" SSL RSS feed that I'd like to grab whatever I use my regex for.

I'd also like to set up a "smarter" version of storing already downloaded torrents.  there's so many instances where I'll snag the same thing twice but they're just a few characters different in the torrent name.

Thanks for all of your hard work btw, been using this for a long time now.

Automatic does not use fuzzy heuristics to detect "similar" torrents, I wouldn't know where to start there. So, filtering out these "duplicates" programatically is rather difficult.

Regarding the other issue: What exactly do you have in mind re individual RSS feed filters?
You can currently define an arbitrary number of feeds and assign an ID to each feed, and then define an arbitrary number of filters, and enable certain filters only for a specific feed (using its ID).
You could even use the same RSS URL in feeds with different ID and apply different filters on them.

Is that something you want to do?

Offline

 

#824 2013-08-18 18:43:18

steviethekidd
Member
Registered: 2012-03-17
Posts: 7

Re: [REL] Automatic for funplug-0.5

So say I'm not on my local network and I want to snag something and have transmission pull something.  I set up a bookmark filter also using RSS and if I throw something in there it may not necessarily match my other filters.  I have it set up now but it will only download if it matches the current regex.

Offline

 

#825 2013-08-18 22:38:26

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

Re: [REL] Automatic for funplug-0.5

What's a bookmark filter?
Anyway, as I previously said, you can assign filters to feeds. And you can use a filter that matches everything from that feed:

Code:

feed = { 
      url => "<your feed URL>"
       id => 1
}

filter = {
      pattern => ".*"
      feedid => 1
}

So if you have some private feed that you administrate yourself, this would enable Automatic to catch anything that you add to the feed.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB