Browse Source

* replace 'use' option with 'linktype'

master
Alex 'AdUser' Z 9 years ago
parent
commit
df26ea44e0
  1. 12
      twatch-lite

12
twatch-lite

@ -69,7 +69,7 @@ sub load_config {
_log(fatal => "Empty 'matches' section in feed")
unless (scalar @{ $feed->{matches} });
$feed->{use} //= 'link';
$feed->{linktype} //= 'direct';
$feed->{lookup} //= 'title';
# TODO: more
($feed->{hostname}) = ($feed->{url} =~ m{://([a-z0-9\.-]+)}oi);
@ -142,7 +142,6 @@ sub process_feed {
# gotcha!
my $msg = sprintf "Got it! URL: %s (%s)", $entry->link, $entry->title;
_log(info => $msg);
# TODO: handle 'use' feed option
$urls->{$entry->link} = $entry->title;
}
$feedconf->{lastseen} = $time;
@ -253,7 +252,7 @@ File format is simple: YAML. Real config example:
proxy: http://192.168.1.1:3128
feeds:
- url: http://torrent-tracker.org/rss.php
use: link
linktype: direct
lookup: title
matches:
- 'match substring'
@ -295,9 +294,12 @@ Matches list must contain at least one keyword. If you want all torrents from th
Lookup this field in RSS/ATOM entry for wanted keywords. Acceptable values: 'body', 'title' (default).
=head3 C<use>
=head3 C<linktype>
Use this field in RSS/ATOM entry as link to torrent file. For now, only acceptable value is 'link'.
Type of link in RSS/ATOM entry. Possible values:
* direct -- link points directly to torrent file (default)
* page -- link points to page with link to torrent file
=head1 SEE ALSO

Loading…
Cancel
Save