Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to FHD and do not sort channellist #9

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions template/default/tv.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
tmpImage.src = "<?% url %?>&size=" + size + "&interval=" + interval + "&rand=" + Before.getTime();
//TODO: wait until (tmpImage.complete == true)?
document.Bild.src = tmpImage.src;
document.getElementById('sect_tv').style.width = (size == 'full' ? 780 : (size == 'half' ? 400 : 210)) + "px";
document.getElementById('sect_tv').style.width = (size == 'full' ? 1920 : (size == 'half' ? 960 : 480)) + "px";
if(interval > 0) {
After = new Date();
wait_sec = (interval * 1000) - (After - Before);
Expand All @@ -68,8 +68,8 @@
}

function tv_open() {
width = (size == 'full' ? 780 : (size == 'half' ? 400 : 210)) + 350;
height = (size == 'full' ? 576 : 525) + 60;
width = (size == 'full' ? 1920 : (size == 'half' ? 960 : 480)) + 350;
height = (size == 'full' ? 1080 : 520) + 60;
window.open("./vdradmin.pl?aktion=tv_show&new_win=1&full_tv=1", "vdradminTV", "width=" + width + ", height=" + height + ", resizable=yes, scrollbars=no, status=no, toolbar=no, menubar=no, location=no");
}
//-->
Expand Down
27 changes: 14 additions & 13 deletions vdradmind.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1100,10 +1100,11 @@ sub ChanTree {
$CHAN{$CHAN_RADIO}->{channels} = \@CHANNELS_RADIO;
}

# Sort channel lists by channel name
foreach my $idx (keys(%CHAN)) {
@{$CHAN{$idx}->{channels}} = sort {$a->{name} cmp $b->{name}} @{$CHAN{$idx}->{channels}}
}
# Temporarly disabled, because channellist also gets sorted by names. This causes duplicate channels appear side-by-side
# Sort channel lists by channel name
#foreach my $idx (keys(%CHAN)) {
# @{$CHAN{$idx}->{channels}} = sort {$a->{name} cmp $b->{name}} @{$CHAN{$idx}->{channels}}
#}
}

sub getChannelGroups {
Expand Down Expand Up @@ -1164,7 +1165,7 @@ sub get_name_from_uniqid {
# return $_->{name} if ($_->{uniq_id} eq $uniq_id);
# }

# Es darf nach Spec nur eine �bereinstimmung geben
# Es darf nach Spec nur eine Übereinstimmung geben
if (scalar(@C) == 1) {
return $C[0]->{name};
}
Expand All @@ -1178,7 +1179,7 @@ sub get_name_from_vdrid {
# Kanalliste nach identischer vdr_id durchsuchen
my @C = grep($_->{vdr_id} == $vdr_id, @{$CHAN{$CHAN_FULL}->{channels}});

# Es darf nach Spec nur eine �bereinstimmung geben
# Es darf nach Spec nur eine Übereinstimmung geben
if (scalar(@C) == 1) {
return $C[0]->{name};
}
Expand All @@ -1192,7 +1193,7 @@ sub get_channel_from_vdrid {
# Kanalliste nach identischer vdr_id durchsuchen
my @C = grep($_->{vdr_id} == $vdr_id, @{$CHAN{$CHAN_FULL}->{channels}});

# Es darf nach Spec nur eine �bereinstimmung geben
# Es darf nach Spec nur eine Übereinstimmung geben
if (scalar(@C) == 1) {
return $C[0];
}
Expand All @@ -1206,7 +1207,7 @@ sub get_transponder_from_vdrid {
# Kanalliste nach identischer vdr_id durchsuchen
my @C = grep($_->{vdr_id} == $vdr_id, @{$CHAN{$CHAN_FULL}->{channels}});

# Es darf nach Spec nur eine �bereinstimmung geben
# Es darf nach Spec nur eine Übereinstimmung geben
if (scalar(@C) == 1) {
return ("$C[0]->{source}-$C[0]->{frequency}-$C[0]->{polarization}");
}
Expand All @@ -1220,7 +1221,7 @@ sub get_ca_from_vdrid {
# Kanalliste nach identischer vdr_id durchsuchen
my @C = grep($_->{vdr_id} == $vdr_id, @{$CHAN{$CHAN_FULL}->{channels}});

# Es darf nach Spec nur eine �bereinstimmung geben
# Es darf nach Spec nur eine Übereinstimmung geben
if (scalar(@C) == 1) {
return ($C[0]->{ca});
}
Expand Down Expand Up @@ -3031,7 +3032,7 @@ sub epgsearch_Param2Line {
$directory =~ s/:/\|/g;
}

#TODO: $searchtimer_from & $searchtimer_until auf korrektes Format pr�fen
#TODO: $searchtimer_from & $searchtimer_until auf korrektes Format prüfen
my $searchtimer_from = $q->param("searchtimer_from");
if ($searchtimer_from) {
$searchtimer_from = my_mktime("0", "0", substr($searchtimer_from, 8, 2), substr($searchtimer_from, 5, 2) - 1, substr($searchtimer_from, 0, 4));
Expand Down Expand Up @@ -5342,7 +5343,7 @@ sub encode_RecTitle {
# VFAT on
for ($i = 0 ; $i < length($title) ; $i++) {
$c = substr($title, $i, 1);
unless ($c =~ /[�������A-Za-z0123456789_!@\$%&()+,.\-;=~ ]/) {
unless ($c =~ /[öäüßÖÄÜA-Za-z0123456789_!@\$%&()+,.\-;=~ ]/) {
$newtitle .= sprintf("#%02X", ord($c));
} else {
$newtitle .= $c;
Expand Down Expand Up @@ -7106,8 +7107,8 @@ sub grab_picture {
$CONFIG{TV_SIZE} = $q->param("size") if($q->param("size"));
$CONFIG{TV_SIZE} = "half" unless($CONFIG{TV_SIZE});

my $maxwidth = 960;
my $maxheight = 540;
my $maxwidth = 1920; # FullHD
my $maxheight = 1080;
my ($width, $height);
if ($CONFIG{TV_SIZE} eq "full") {
($width, $height) = ($maxwidth, $maxheight);
Expand Down