webui: durationfilter code cosmetics (remove rogue whitespace)
This commit is contained in:
parent
d61fc95e68
commit
7ad0f70ed3
8 changed files with 35 additions and 35 deletions
|
@ -13,7 +13,7 @@ The DVR log is split into a series of paged grids:
|
|||
<img src="docresources/dvrlog2.png">
|
||||
|
||||
<p>
|
||||
Once the recording is completed there will be a clickable link to a playlist
|
||||
Once the recording is completed there will be a clickable link to a playlist
|
||||
for the recorded file (XSPF or M3U as per your startup options) so you can watch
|
||||
it.</p>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="hts-doc-text">
|
||||
<p>Tvheadend has a built in Electronic Program Guide. The EPG is an in-memory
|
||||
<p>Tvheadend has a built-in Electronic Program Guide. The EPG is an in-memory
|
||||
database populated with all the information about events received from
|
||||
the DVB networks over-the-air or from external grabbers such as XMLTV.</p>
|
||||
<p></p>
|
||||
|
@ -32,7 +32,7 @@ sorted based on start time.</p>
|
|||
configured by the administrator. You can start typing a tag name to filter the list.</dd>
|
||||
<dt>[Filter content type...]</dt>
|
||||
<dd>
|
||||
Only display events that match the given content type tag. Most DVB networks
|
||||
Only display events that match the given content type tag. Most DVB networks
|
||||
classify their events into content groups. This field allows you to filter based
|
||||
on content type (e.g. "Sports" or "Game Show"). Supported tags are determined by
|
||||
your broadcaster. Again, simply start typing to filter the entries if you have a
|
||||
|
@ -45,7 +45,7 @@ sorted based on start time.</p>
|
|||
rolling broadcasts.</dd>
|
||||
<dd> </dd>
|
||||
<dd>Options are:</dd>
|
||||
|
||||
|
||||
<table class="hts-doc-text" border="0">
|
||||
<tr><td>00:00:01 to 00:15:00 - for very short news bulletins, children's programmes, etc.</td></tr>
|
||||
<tr><td>00:15:01 to 00:30:00 - for short programmes, e.g. daily soap operas</td></tr>
|
||||
|
@ -55,7 +55,7 @@ sorted based on start time.</p>
|
|||
</table>
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
<p>So, if you only want to see Movies from your available HD channels, you
|
||||
would select 'HDTV' in the <i>[Filter tag...]</i> field, and select
|
||||
'Movie / Drama' in the <i>[Filter content type...]</i> field. If you wish, you
|
||||
|
|
|
@ -132,7 +132,7 @@ api_epg_grid
|
|||
htsmsg_t *l = NULL, *e;
|
||||
int min_duration;
|
||||
int max_duration;
|
||||
|
||||
|
||||
*resp = htsmsg_create_map();
|
||||
|
||||
/* Query params */
|
||||
|
@ -145,7 +145,7 @@ api_epg_grid
|
|||
|
||||
min_duration = htsmsg_get_u32_or_default(args, "minduration", 0);
|
||||
max_duration = htsmsg_get_u32_or_default(args, "maxduration", INT_MAX);
|
||||
|
||||
|
||||
/* Pagination settings */
|
||||
start = htsmsg_get_u32_or_default(args, "start", 0);
|
||||
limit = htsmsg_get_u32_or_default(args, "limit", 50);
|
||||
|
|
|
@ -139,17 +139,17 @@ autorec_cmp(dvr_autorec_entry_t *dae, epg_broadcast_t *e)
|
|||
if(abs(mktime(&a_time) - mktime(&ev_time)) > 900)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
duration = difftime(e->stop,e->start);
|
||||
|
||||
|
||||
if(dae->dae_minduration) {
|
||||
if(duration < dae->dae_minduration) return 0;
|
||||
}
|
||||
|
||||
|
||||
if(dae->dae_maxduration) {
|
||||
if(duration > dae->dae_maxduration) return 0;
|
||||
}
|
||||
|
||||
|
||||
if(dae->dae_weekdays != 0x7f) {
|
||||
struct tm tm;
|
||||
localtime_r(&e->start, &tm);
|
||||
|
@ -574,7 +574,7 @@ _dvr_autorec_add(const char *config_name,
|
|||
|
||||
if (max_duration)
|
||||
dae->dae_maxduration = max_duration;
|
||||
|
||||
|
||||
if(serieslink) {
|
||||
serieslink->getref(serieslink);
|
||||
dae->dae_serieslink = serieslink;
|
||||
|
|
|
@ -2216,10 +2216,10 @@ static void _eqr_add
|
|||
if ( !(title = epg_episode_get_title(e->episode, lang)) ) return;
|
||||
if ( genre && !epg_genre_list_contains(&e->episode->genre, genre, 1) ) return;
|
||||
if ( preg && regexec(preg, title, 0, NULL, 0)) return;
|
||||
|
||||
|
||||
duration = difftime(e->stop,e->start);
|
||||
if ( duration < min_duration || duration > max_duration ) return;
|
||||
|
||||
|
||||
/* More space */
|
||||
if ( eqr->eqr_entries == eqr->eqr_alloced ) {
|
||||
eqr->eqr_alloced = MAX(100, eqr->eqr_alloced * 2);
|
||||
|
|
|
@ -758,7 +758,7 @@ extjs_epg(http_connection_t *hc, const char *remain, void *opaque)
|
|||
const char *tag = http_arg_get(&hc->hc_req_args, "tag");
|
||||
const char *title = http_arg_get(&hc->hc_req_args, "title");
|
||||
const char *lang = http_arg_get(&hc->hc_args, "Accept-Language");
|
||||
|
||||
|
||||
int min_duration;
|
||||
int max_duration;
|
||||
|
||||
|
@ -768,7 +768,7 @@ extjs_epg(http_connection_t *hc, const char *remain, void *opaque)
|
|||
if((s = http_arg_get(&hc->hc_req_args, "minduration")) != NULL)
|
||||
min_duration = atoi(s);
|
||||
else
|
||||
min_duration = 0;
|
||||
min_duration = 0;
|
||||
|
||||
if((s = http_arg_get(&hc->hc_req_args, "maxduration")) != NULL)
|
||||
max_duration = atoi(s);
|
||||
|
@ -1133,7 +1133,7 @@ extjs_dvr(http_connection_t *hc, const char *remain, void *opaque)
|
|||
int min_duration;
|
||||
int max_duration;
|
||||
epg_genre_t genre, *eg = NULL;
|
||||
|
||||
|
||||
if ((s = http_arg_get(&hc->hc_req_args, "contenttype"))) {
|
||||
genre.code = atoi(s);
|
||||
eg = &genre;
|
||||
|
@ -1142,7 +1142,7 @@ extjs_dvr(http_connection_t *hc, const char *remain, void *opaque)
|
|||
if((s = http_arg_get(&hc->hc_req_args, "minduration")) != NULL)
|
||||
min_duration = atoi(s);
|
||||
else
|
||||
min_duration = 0;
|
||||
min_duration = 0;
|
||||
|
||||
if((s = http_arg_get(&hc->hc_req_args, "maxduration")) != NULL)
|
||||
max_duration = atoi(s);
|
||||
|
|
|
@ -717,15 +717,15 @@ tvheadend.autoreceditor = function() {
|
|||
|
||||
if (record.isModified('channel') && record.data.channel == -1)
|
||||
record.set('channel',"");
|
||||
|
||||
|
||||
if (record.isModified('tag') && record.data.tag == '(Clear filter)')
|
||||
record.set('tag',"");
|
||||
|
||||
|
||||
if (record.isModified('contenttype') && record.data.contenttype == -1)
|
||||
record.set('contenttype',"");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return new tvheadend.tableEditor('Automatic Recorder', 'autorec', cm,
|
||||
tvheadend.autorecRecord, [], tvheadend.autorecStore,
|
||||
'autorec.html', 'wand');
|
||||
|
|
|
@ -40,14 +40,14 @@ tvheadend.ContentGroupStore.setDefaultSort('code', 'ASC');
|
|||
|
||||
tvheadend.channelLookupName = function(key) {
|
||||
channelString = "";
|
||||
|
||||
|
||||
var index = tvheadend.channels.find('key', key);
|
||||
|
||||
|
||||
if (index !== -1)
|
||||
var channelString = tvheadend.channels.getAt(index).get('val');
|
||||
|
||||
|
||||
return channelString;
|
||||
};
|
||||
};
|
||||
|
||||
// Store for duration filters - EPG, autorec dialog and autorec rules in the DVR grid
|
||||
// NB: 'no max' is defined as 9999999s, or about 3 months...
|
||||
|
@ -65,17 +65,17 @@ tvheadend.DurationStore = new Ext.data.SimpleStore({
|
|||
});
|
||||
|
||||
// Function to convert numeric duration to corresponding label string
|
||||
// Note: triggered by minimum duration only. This would fail if ranges
|
||||
// Note: triggered by minimum duration only. This would fail if ranges
|
||||
// had the same minimum (e.g. 15-30 mins and 15-60 minutes) (which we don't have).
|
||||
|
||||
tvheadend.durationLookupRange = function(value) {
|
||||
durationString = "";
|
||||
var index = tvheadend.DurationStore.find('minvalue', value);
|
||||
var index = tvheadend.DurationStore.find('minvalue', value);
|
||||
if (index !== -1)
|
||||
var durationString = tvheadend.DurationStore.getAt(index).data.label;
|
||||
|
||||
|
||||
return durationString;
|
||||
};
|
||||
};
|
||||
|
||||
tvheadend.epgDetails = function(event) {
|
||||
|
||||
|
@ -506,7 +506,7 @@ tvheadend.epg = function() {
|
|||
|
||||
});
|
||||
|
||||
/*
|
||||
/*
|
||||
* Clear filter functions
|
||||
*/
|
||||
|
||||
|
@ -535,7 +535,7 @@ tvheadend.epg = function() {
|
|||
delete epgStore.baseParams.maxduration;
|
||||
epgFilterDuration.setValue("");
|
||||
};
|
||||
|
||||
|
||||
function epgQueryClear() {
|
||||
clearTitleFilter();
|
||||
clearChannelFilter();
|
||||
|
@ -548,9 +548,9 @@ tvheadend.epg = function() {
|
|||
/*
|
||||
* Filter selection event handlers
|
||||
*/
|
||||
|
||||
|
||||
epgFilterChannels.on('select', function(c, r) {
|
||||
if (r.data.key == -1)
|
||||
if (r.data.key == -1)
|
||||
clearChannelFilter();
|
||||
else if (epgStore.baseParams.channel !== r.data.key)
|
||||
epgStore.baseParams.channel = r.data.key;
|
||||
|
@ -564,7 +564,7 @@ tvheadend.epg = function() {
|
|||
epgStore.baseParams.tag = r.data.name;
|
||||
epgStore.reload();
|
||||
});
|
||||
|
||||
|
||||
epgFilterContentGroup.on('select', function(c, r) {
|
||||
if (r.data.code == -1)
|
||||
clearContentGroupFilter();
|
||||
|
@ -582,7 +582,7 @@ tvheadend.epg = function() {
|
|||
}
|
||||
epgStore.reload();
|
||||
});
|
||||
|
||||
|
||||
epgFilterTitle.on('valid', function(c) {
|
||||
var value = c.getValue();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue