From 7ad0f70ed3327f1c11d1eabc830af844a0437c2a Mon Sep 17 00:00:00 2001 From: Ian Date: Mon, 7 Jul 2014 17:48:38 +0100 Subject: [PATCH] webui: durationfilter code cosmetics (remove rogue whitespace) --- docs/html/dvrlog.html | 2 +- docs/html/epg.html | 8 ++++---- src/api/api_epg.c | 4 ++-- src/dvr/dvr_autorec.c | 10 +++++----- src/epg.c | 4 ++-- src/webui/extjs.c | 8 ++++---- src/webui/static/app/dvr.js | 6 +++--- src/webui/static/app/epg.js | 28 ++++++++++++++-------------- 8 files changed, 35 insertions(+), 35 deletions(-) diff --git a/docs/html/dvrlog.html b/docs/html/dvrlog.html index cabe09f0..612b86dc 100644 --- a/docs/html/dvrlog.html +++ b/docs/html/dvrlog.html @@ -13,7 +13,7 @@ The DVR log is split into a series of paged grids:

-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.

diff --git a/docs/html/epg.html b/docs/html/epg.html index 40a715d8..615d3202 100644 --- a/docs/html/epg.html +++ b/docs/html/epg.html @@ -1,5 +1,5 @@
-

Tvheadend has a built in Electronic Program Guide. The EPG is an in-memory +

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.

@@ -32,7 +32,7 @@ sorted based on start time.

configured by the administrator. You can start typing a tag name to filter the list.
[Filter content type...]
- 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.

rolling broadcasts.
 
Options are:
- + @@ -55,7 +55,7 @@ sorted based on start time.

00:00:01 to 00:15:00 - for very short news bulletins, children's programmes, etc.
00:15:01 to 00:30:00 - for short programmes, e.g. daily soap operas
- +

So, if you only want to see Movies from your available HD channels, you would select 'HDTV' in the [Filter tag...] field, and select 'Movie / Drama' in the [Filter content type...] field. If you wish, you diff --git a/src/api/api_epg.c b/src/api/api_epg.c index 0a9a9122..9bd44903 100644 --- a/src/api/api_epg.c +++ b/src/api/api_epg.c @@ -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); diff --git a/src/dvr/dvr_autorec.c b/src/dvr/dvr_autorec.c index 09db8931..c21c7bda 100644 --- a/src/dvr/dvr_autorec.c +++ b/src/dvr/dvr_autorec.c @@ -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; diff --git a/src/epg.c b/src/epg.c index 450c063f..3ed3da16 100644 --- a/src/epg.c +++ b/src/epg.c @@ -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); diff --git a/src/webui/extjs.c b/src/webui/extjs.c index d5a92232..9b27431f 100755 --- a/src/webui/extjs.c +++ b/src/webui/extjs.c @@ -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); diff --git a/src/webui/static/app/dvr.js b/src/webui/static/app/dvr.js index f2d487df..06ab8a3f 100644 --- a/src/webui/static/app/dvr.js +++ b/src/webui/static/app/dvr.js @@ -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'); diff --git a/src/webui/static/app/epg.js b/src/webui/static/app/epg.js index 7c11315f..588b2ab2 100644 --- a/src/webui/static/app/epg.js +++ b/src/webui/static/app/epg.js @@ -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();