summaryrefslogtreecommitdiff
path: root/lib/Multi/Anime.pm
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-08-14 21:52:54 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-08-14 21:52:54 +0000
commit1c71b23985ace088dd8fa01001521c3844a14c40 (patch)
tree405b8c675cd38f4a299fda20f136d6912d34291e /lib/Multi/Anime.pm
parent2cf1c1848571f11e753dec784c7323e51b00801d (diff)
Fixed bug with an edit being comitted without any changes, renamed anime check command and added small but useful note to multi.pl
git-svn-id: svn://vndb.org/vndb@85 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'lib/Multi/Anime.pm')
-rw-r--r--lib/Multi/Anime.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Multi/Anime.pm b/lib/Multi/Anime.pm
index 6f329bd5..42bd52bf 100644
--- a/lib/Multi/Anime.pm
+++ b/lib/Multi/Anime.pm
@@ -36,7 +36,7 @@ sub spawn {
# This module -only- fetches anime information in daemon mode!
# Calling the anime command with an ID as argument will force
# the information to be refreshed. This is not recommended,
- # just use 'anime check' for normal usage.
+ # just use 'anime' for normal usage.
my $p = shift;
POE::Session->create(
@@ -81,10 +81,10 @@ sub spawn {
sub _start {
$_[KERNEL]->alias_set('anime');
- $_[KERNEL]->call(core => register => qr/^anime ([0-9]+|check)$/, 'cmd_anime');
+ $_[KERNEL]->call(core => register => qr/^anime(?: ([0-9]+))?$/, 'cmd_anime');
# check for anime twice a day
- $_[KERNEL]->post(core => addcron => '0 0,12 * * *', 'anime check');
+ $_[KERNEL]->post(core => addcron => '0 0,12 * * *', 'anime');
$_[KERNEL]->sig('shutdown' => 'shutdown');
if(!$Multi::DAEMONIZE) {
@@ -110,7 +110,7 @@ sub shutdown {
sub cmd_anime { # cmd, arg
my @push;
- if($_[ARG1] eq 'check') {
+ if(!$_[ARG1]) {
# only animes we have never fetched, or haven't been updated for a month
my $q = $Multi::SQL->prepare(q|
SELECT id