Skip to content

Commit fe2cad0

Browse files
committed
Web PVR: modify cache refresh page for changes in programme indexing
Added warning text re: cache only updated once per week. Also changed Force Refresh button to actually force refresh with new programme indexing scheme.
1 parent cf425f5 commit fe2cad0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

get_iplayer.cgi

+6-3
Original file line numberDiff line numberDiff line change
@@ -2553,8 +2553,11 @@ sub build_option_html {
25532553

25542554
sub refresh {
25552555
my $typelist = join(",", $cgi->param( 'PROGTYPES' )) || 'tv';
2556+
my $refreshforce = $cgi->param( 'REFRESHFORCE' ) || 0;
25562557
my $refreshfuture = $cgi->param( 'REFRESHFUTURE' ) || 0;
2557-
print $fh "<strong><p>The cache will auto-refresh every $opt->{AUTOWEBREFRESH}->{current} hour(s) if you leave this page open</p></strong>" if $opt->{AUTOWEBREFRESH}->{current};
2558+
print $fh "<strong><p>The cache timestamp will be checked every $opt->{AUTOWEBREFRESH}->{current} hour(s) if you leave this page open</p></strong>" if $opt->{AUTOWEBREFRESH}->{current};
2559+
print $fh "<strong><p>However, the cache will actually be updated only once per calendar week, so you may not wish to leave this page open.</p></strong>" if $opt->{AUTOWEBREFRESH}->{current};
2560+
print $fh "<strong><p>Use the Force Refresh button to force a cache update. You will generally never need to force an update, so use with care.</p></strong>" if $opt->{AUTOWEBREFRESH}->{current};
25582561
if ( IS_WIN32 ) {
25592562
print $fh "<strong><p>Windows users: You may encounter errors if you perform other tasks in the Web PVR Manager while this page is reloading</p></strong>" if $opt->{AUTOWEBREFRESH}->{current};
25602563
}
@@ -2565,7 +2568,7 @@ sub refresh {
25652568
'--encoding-console-out=UTF-8',
25662569
'--nocopyright',
25672570
'--webrequest',
2568-
get_iplayer_webrequest_args( 'expiry=30', 'nopurge=1', "type=$typelist", "refreshfuture=$refreshfuture", "search=no search just refresh" ),
2571+
get_iplayer_webrequest_args( 'expiry=30', 'nopurge=1', "type=$typelist", "refresh=$refreshforce", "refreshfuture=$refreshfuture", "search=no search just refresh" ),
25692572
);
25702573
print $fh '<pre>';
25712574
run_cmd_autorefresh( $fh, $se, 1, @cmd );
@@ -2583,7 +2586,7 @@ sub refresh {
25832586
{
25842587
-class=>'action',
25852588
-title => 'Refresh Cache Now',
2586-
-onClick => "RefreshTab( '?NEXTPAGE=refresh&PROGTYPES=$typelist&AUTOWEBREFRESH=$autorefresh', ".(1000*3600*$autorefresh).", 1 );",
2589+
-onClick => "RefreshTab( '?NEXTPAGE=refresh&PROGTYPES=$typelist&REFRESHFORCE=1&AUTOWEBREFRESH=$autorefresh', ".(1000*3600*$autorefresh).", 1 );",
25872590
},
25882591
'Force Refresh'
25892592
),

0 commit comments

Comments
 (0)