From e621ef40089953059fe2c6564a53dc9d2829ef67 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 7 Jan 2014 12:59:25 +0000 Subject: fixed index for rebroadcast/regular @ zip-fm diff --git a/rhimport-zf b/rhimport-zf index 963ef7e..24c7ad7 100755 --- a/rhimport-zf +++ b/rhimport-zf @@ -125,9 +125,9 @@ for my $entry ($feed->entries) { if($#ARGV >= 0 && $ARGV[0] eq 'nopv') { print "not adding note to PV for regular entry - only for rebroadcast\n"; } else { - rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @broadcast_day), "1"); + rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @broadcast_day), "1", 1); } - rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @rebroadcast_day), "2") unless $dow == 5; + rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @rebroadcast_day), "2", 0) unless $dow == 5; print "\n"; unlink($NOTE_FILE); diff --git a/rhimport.pm b/rhimport.pm index 669a2b1..b8823ba 100644 --- a/rhimport.pm +++ b/rhimport.pm @@ -342,8 +342,8 @@ sub delete_file sub pv_add_note { - my ( $title, $text, $id, $date, $type ) = @_; - my @script = ('/usr/bin/ssh', 'root@intranet', 'addnote', $id, $date, $type); + my ( $title, $text, $id, $date, $type, $index ) = @_; + my @script = ('/usr/bin/ssh', 'root@intranet', 'addnote', $id, $date, $type, $index ); my ($reader, $writer, $error ) = ( new IO::Handle, new IO::Handle, new IO::Handle ); $writer->autoflush(1); -- cgit v0.10.2