summaryrefslogtreecommitdiff
path: root/lib/RHRD
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-09-14 16:43:37 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-09-14 16:43:37 (GMT)
commit043bcc2f9a395458c18f369f06ac876d26a9b814 (patch)
tree1c1d84f7eca1e9cd59f6a88e2f808c312b65060b /lib/RHRD
parent0966b894742c543b0a6a8ecb854dcaaea6813e15 (diff)
multi shows listing works now
Diffstat (limited to 'lib/RHRD')
-rwxr-xr-xlib/RHRD/rddb.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/RHRD/rddb.pm b/lib/RHRD/rddb.pm
index 38abb1d..d4ff7a5 100755
--- a/lib/RHRD/rddb.pm
+++ b/lib/RHRD/rddb.pm
@@ -1985,12 +1985,18 @@ sub list_multi_shows
my @mshows;
while(my ($id, $title, $shows) = $sth->fetchrow_array()) {
- my @showlist = split(';', $shows); # TODO split this further...
my $entry = {};
$entry->{'ID'} = $id;
$entry->{'TITLE'} = $title;
- $entry->{'SHOWS'} = \@showlist;
+ $entry->{'SHOWS'} = {};
+
+ my @showlist = split(';', $shows);
+ foreach my $show (@showlist) {
+ my ($week, $showid) = split(':', $show, 2);
+ next unless(defined($week) && defined($showid));
+ $entry->{'SHOWS'}{int($week)} = int($showid);
+ }
push @mshows, $entry;
}