From: Anders Holst Date: Tue, 3 Feb 2009 10:00:48 +0000 (+0000) Subject: Add location and tags to the timer dialog in the web interface X-Git-Url: http://code.vuplus.com/gitweb/?a=commitdiff_plain;h=b98a13b32e486719cc2eb41fd747c0d7e7417cef;p=vuplus_dvbapp-plugin Add location and tags to the timer dialog in the web interface --- diff --git a/webinterface/src/WebComponents/Sources/LocationsAndTags.py b/webinterface/src/WebComponents/Sources/LocationsAndTags.py new file mode 100644 index 0000000..58d17bd --- /dev/null +++ b/webinterface/src/WebComponents/Sources/LocationsAndTags.py @@ -0,0 +1,49 @@ +from Components.Sources.Source import Source +from Components.config import config + +class LocationsAndTags(Source): + LOCATIONS = 0 + TAGS = 1 + + def __init__(self, session, func): + self.func = func + Source.__init__(self) + self.session = session + self.result = False,"one two three four unknown command" + + def handleCommand(self, cmd): + if self.func is self.LOCATIONS: + self.result = True,self.getLocations() + elif self.func is self.TAGS: + self.result = True,self.getTags() + else: + self.result = False,"unknown command" + + def getLocations(self): + return " ".join(config.movielist.videodirs.value) + + def getTags(self): + try: + file = open("/etc/enigma2/movietags") + tags = [x.rstrip() for x in file.readlines()] + while "" in tags: + tags.remove("") + file.close() + except IOError, ioe: + tags = [] + return " ".join(tags) + + def getText(self): + self.handleCommand("") + print self.result + (result,text) = self.result + xml = "\n" + if result: + xml += "True\n" + else: + xml += "False\n" + xml += "%s\n" % text + xml += "\n" + return xml + + text = property(getText) diff --git a/webinterface/src/WebComponents/Sources/Timer.py b/webinterface/src/WebComponents/Sources/Timer.py index 1c67232..52fe3a9 100644 --- a/webinterface/src/WebComponents/Sources/Timer.py +++ b/webinterface/src/WebComponents/Sources/Timer.py @@ -92,24 +92,25 @@ class Timer( Source): http://dreambox/web/tvbrowser? + To add something: - &command=add&&syear={start_year}&smonth={start_month}&sday={start_day}&shour={start_hour}&smin={start_minute}&eyear={end_year}&emonth={end_month}&eday={end_day}&ehour={end_hour}&emin={end_minute}&sRef={urlencode(channel_name_external, "utf8")}&name={urlencode(title, "utf8")}&description={urlencode(title, "utf8")}&afterevent=0&eit=&disabled=0&justplay=0&repeated=0 + &command=add&&year={year}&month={month}&day={day}&shour={start_hour}&smin={start_minute}&ehour={end_hour}&emin={end_minute}&sRef={urlencode(channel_name_external, "utf8")}&name={urlencode(title, "utf8")}&description={urlencode(descr, "utf8")}&dirname={dirname}&tags={urlencode("tag1 tag2...", "utf8")}&afterevent=0&eit=&disabled=0&justplay=0&repeated=0 to zap for some time: - &command=add&&syear={start_year}&smonth={start_month}&sday={start_day}&shour={start_hour}&smin={start_minute}&eyear={end_year}&emonth={end_month}&eday={end_day}&ehour={end_hour}&emin={end_minute}&sRef={urlencode(channel_name_external, "utf8")}&name={urlencode(title, "utf8")}&description={urlencode(title, afterevent=0&eit=&disabled=0&justplay=1&repeated=0 + &command=add&&year={year}&month={month}&day={day}&shour={start_hour}&smin={start_minute}&ehour={end_hour}&emin={end_minute}&sRef={urlencode(channel_name_external, "utf8")}&name={urlencode(title, "utf8")}&description={urlencode(descr, "utf8")}&dirname={dirname}&tags={urlencode("tag1 tag2...", "utf8")}&afterevent=0&eit=&disabled=0&justplay=1&repeated=0 to delete something: - &command=del&&syear={start_year}&smonth={start_month}&sday={start_day}&shour={start_hour}&smin={start_minute}&eyear={end_year}&emonth={end_month}&eday={end_day}&ehour={end_hour}&emin={end_minute}&sRef={urlencode(channel_name_external, "utf8")}&name={urlencode(title, "utf8")}&description={urlencode(title, "utf8")}&afterevent=0&eit=&disabled=0&justplay=0&repeated=0 + &command=del&&year={year}&month={month}&day={day}&shour={start_hour}&smin={start_minute}&ehour={end_hour}&emin={end_minute}&sRef={urlencode(channel_name_external, "utf8")} """ - listDate = ['syear','smonth','sday','shour','smin','eyear','emonth','eday','ehour','emin'] + listDate = ['year','month','day','shour','smin','ehour','emin'] for element in listDate: if param[element] is None: return False,"%s missing"%element else: param[element] = int(param[element]) - param['begin'] = int( strftime("%s", localtime(mktime( (param['syear'], param['smonth'], param['sday'], param['shour'], param['smin'], 0, 0, 0, -1) ) ) ) ) - param['end'] = int( strftime("%s", localtime(mktime( (param['eyear'], param['emonth'], param['eday'], param['ehour'], param['emin'], 0, 0, 0, -1) ) ) ) ) - + param['begin'] = int(mktime( (param['year'], param['month'], param['day'], param['shour'], param['smin'], 0, 0, 0, -1) ) ) + param['end'] = int(mktime( (param['year'], param['month'], param['day'], param['ehour'], param['emin'], 0, 0, 0, -1) ) ) + if param['end'] < param['begin']: + param['end'] += 86400 for element in listDate: del param[element] @@ -185,7 +186,8 @@ class Timer( Source): if limitEvent: return False, "No event found, started infinite recording" - timer = RecordTimerEntry(serviceref, begin, end, name, description, eventid, False, False, 0) + location = config.movielist.last_videodir.value + timer = RecordTimerEntry(serviceref, begin, end, name, description, eventid, False, False, 0, dirname = location) timer.dontSave = True self.recordtimer.record(timer) @@ -262,6 +264,14 @@ class Timer( Source): if ( param['afterevent'] == "0") or (param['afterevent'] == "1") or (param['afterevent'] == "2"): afterEvent = int(param['afterevent']) + dirname = None + if param.has_key('dirname'): + dirname = param['dirname'] + + tags = None + if param.has_key('tags'): + tags = unescape(param['tags']).split(' ') + #Try to edit an existing Timer if param.has_key('channelOld'): print "ChannelOld: %s" %param['channelOld'] @@ -298,6 +308,8 @@ class Timer( Source): timer.justplay = justplay timer.afterEvent = afterEvent timer.repeated = repeated + timer.dirname = dirname + timer.tags = tags #send the changed timer back to enigma2 and hope it's good self.session.nav.RecordTimer.timeChanged(timer) @@ -313,7 +325,7 @@ class Timer( Source): try: #Create a new instance of recordtimerentry - timer = RecordTimerEntry(service_ref, begin, end, name, description, 0, disabled, justplay, afterEvent) + timer = RecordTimerEntry(service_ref, begin, end, name, description, 0, disabled, justplay, afterEvent, dirname = dirname, tags = tags) timer.repeated = repeated #add the new timer self.recordtimer.record(timer) @@ -384,7 +396,6 @@ class Timer( Source): timer.append(item.eit) timer.append(item.name) timer.append(item.description) - timer.append(item.dirname) if item.disabled is True: timer.append("1") @@ -403,6 +414,9 @@ class Timer( Source): timer.append(item.afterEvent) + timer.append(item.dirname) + timer.append(" ".join(item.tags)) + timer.append(item.log_entries) try: @@ -456,24 +470,25 @@ class Timer( Source): "EIT":2, "Name":3, "Description":4, - "Directory":5, - "Disabled":6, - "TimeBegin":7, - "TimeEnd":8, - "Duration":9, - "startPrepare":10, - "justPlay":11, - "afterEvent":12, - "LogEntries":13, - "Filename":14, - "Backoff":15, - "nextActivation":16, - "firstTryPrepare":17, - "State":18, - "Repeated":19, - "dontSave":20, - "Cancled":21, - "DescriptionExtended":22, - "toggleDisabled":23, - "toggleDisabledIMG":24, - } \ No newline at end of file + "Disabled":5, + "TimeBegin":6, + "TimeEnd":7, + "Duration":8, + "startPrepare":9, + "justPlay":10, + "afterEvent":11, + "Location":12, + "Tags":13, + "LogEntries":14, + "Filename":15, + "Backoff":16, + "nextActivation":17, + "firstTryPrepare":18, + "State":19, + "Repeated":20, + "dontSave":21, + "Cancled":22, + "DescriptionExtended":23, + "toggleDisabled":24, + "toggleDisabledIMG":25, + } diff --git a/webinterface/src/web-data/config.js b/webinterface/src/web-data/config.js index a8b0ac8..45947f0 100644 --- a/webinterface/src/web-data/config.js +++ b/webinterface/src/web-data/config.js @@ -42,12 +42,15 @@ var url_filelist = "/web/mediaplayerlist?path="; // plus full qualified path var url_timerlist= "/web/timerlist"; var url_recordnow= "/web/recordnow"; -var url_timeradd= "/web/timeradd"; // plus serviceref,begin,end,name,description,eit,disabled,justplay,afterevent -var url_timerchange= "/web/timerchange"; // plus serviceref,begin,end,name,description,eit,disabled,justplay,afterevent +var url_timeradd= "/web/timeradd"; // plus serviceref,begin,end,name,description,dirname,tags,eit,disabled,justplay,afterevent +var url_timerchange= "/web/timerchange"; // plus serviceref,begin,end,name,description,dirname,tags,eit,disabled,justplay,afterevent var url_timeraddbyeventid= "/web/timeraddbyeventid"; // plus serviceref,eventid -var url_timerdelete= "/web/timerdelete"; // plus serviceref,bedin,end +var url_timerdelete= "/web/timerdelete"; // plus serviceref,begin,end var url_timerlistwrite="/web/timerlistwrite?write=saveWriteNow"; +var url_getLocations="/web/getlocations"; +var url_getTags="/web/gettags"; + var url_message = "/web/message"; // plus text,type,timeout var url_messageanswer = "/web/messageanswer?getanswer=now"; diff --git a/webinterface/src/web-data/objects.js b/webinterface/src/web-data/objects.js index 23ff91f..470e7a1 100644 --- a/webinterface/src/web-data/objects.js +++ b/webinterface/src/web-data/objects.js @@ -409,6 +409,16 @@ function Timer(xml){ this.afterevent = "0"; } try{ + this.dirname = xml.getElementsByTagName('e2dirname').item(0).firstChild.data; + } catch (e) { + this.dirname = "/hdd/movie/"; + } + try{ + this.tags = xml.getElementsByTagName('e2tags').item(0).firstChild.data; + } catch (e) { + this.tags = ""; + } + try{ this.logentries = xml.getElementsByTagName('e2logentries').item(0).firstChild.data; } catch (e) { this.logentries = "N/A"; @@ -538,6 +548,14 @@ function Timer(xml){ return this.afterevent; }; + this.getDirname = function(){ + return this.dirname; + }; + + this.getTags = function(){ + return this.tags; + }; + this.getLogentries = function(){ return this.logentries; }; diff --git a/webinterface/src/web-data/timer.js b/webinterface/src/web-data/timer.js index d6e5d1b..5d365c6 100644 --- a/webinterface/src/web-data/timer.js +++ b/webinterface/src/web-data/timer.js @@ -6,29 +6,12 @@ addTimerEditFormArray.TVListFilled = 0; addTimerEditFormArray.RadioListFilled = 0; addTimerEditFormArray.deleteOldOnSave = 0; addTimerEditFormArray.eventID = 0; +addTimerEditFormArray.locationsList = []; +addTimerEditFormArray.tagsList = []; days = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']; -function addTimerFormChangeTime(which) { - var start = new Date( $('syear').value, ($('smonth').value -1), $('sday').value, $('shour').value, $('smin').value, 0); - var end = new Date($('eyear').value, ($('emonth').value -1), $('eday').value, $('ehour').value, $('emin').value, 0); -// debug("("+start+")(" + end+")"); - - if(start.getTime() > end.getTime()) { - opponent = (which.substr(0,1) == 's') ? 'e' + which.substr(1, which.length -1) : 's' + which.substr(1, which.length -1) ; - $(opponent).value = $(which).value; - } - var all = ['year','month','day','hour','min']; - for(i=0; i < all.length; i++) { - if(which.substr(1, which.length -1) == all[i]) { - addTimerFormChangeTime(which.substr(0,1) + all[i+1] ); - break; - } - } -} - - function addTimerFormChangeType() { selected = ($('tvradio').checked === true) ? addTimerEditFormArray.TVList: addTimerEditFormArray.RadioList; @@ -46,6 +29,70 @@ function addTimerFormChangeType() { } } +function addTimerFormChangeLocation(newloc) { + +} + +function addTimerFormPrepareTagsMenu(currtags) { + result = {}; + resultsuff = {}; + taglist = addTimerEditFormArray.tagsList; + + if (currtags == "") { + i = 0; + result[""] = ""; + for (i = 0; i < taglist.length; i++) { + result[taglist[i]] = taglist[i]; + } + } else { + result[currtags] = currtags; + tags = currtags.split(" "); + for (i = 0; i < taglist.length; i++) { + var res = ""; + var found = false; + for (j=0; j 0) { + res = res.substring(1,res.length); + } + if (found) { + resultsuff[res] = "- "+taglist[i]; + } else { + result[res] = "+ "+taglist[i]; + } + } + if (tags.length > 1) { + for (ele in resultsuff) { + result[ele] = resultsuff[ele]; + } + } + result[""] = ""; + } + return result; +} + +function addTimerFormChangeTags(newtags) { + lst = addTimerFormPrepareTagsMenu(newtags); + + for (i = $('tags').options.length; i !== 0; i--) { + $('tags').options[i - 1] = null; + } + + for(element in lst) { + $('tags').options[i] = new Option(lst[element]); + $('tags').options[i].value = element; + i++; + } +} + // Timer function addTimerByID(sRef,eventID,justplay){ @@ -114,6 +161,8 @@ function incomingTimerList(request){ 'justplayReadable': justplayReadable[Number(timer.getJustplay())], 'afterevent': timer.getAfterevent(), 'aftereventReadable': aftereventReadable[Number(timer.getAfterevent())], + 'dirname' : timer.getDirname(), + 'tags' : timer.getTags(), 'disabled': timer.getDisabled(), 'onOff': timer.getToggleDisabledIMG(), 'enDis': timer.getToggleDisabledText(), @@ -194,16 +243,13 @@ function incomingTimerDelResult(request){ function loadTimerFormNow() { var now = new Date(); - addTimerEditFormArray.syear = now.getFullYear(); - addTimerEditFormArray.smonth = now.getMonth() + 1; - addTimerEditFormArray.sday = now.getDate(); + addTimerEditFormArray.year = now.getFullYear(); + addTimerEditFormArray.month = now.getMonth() + 1; + addTimerEditFormArray.day = now.getDate(); addTimerEditFormArray.shour = now.getHours(); addTimerEditFormArray.smin = now.getMinutes(); var plusTwoHours = new Date(now.getTime() + ((120 *60)*1000) ); - addTimerEditFormArray.eyear = plusTwoHours.getFullYear(); - addTimerEditFormArray.emonth = plusTwoHours.getMonth() + 1; - addTimerEditFormArray.eday = plusTwoHours.getDate(); addTimerEditFormArray.ehour = plusTwoHours.getHours(); addTimerEditFormArray.emin = plusTwoHours.getMinutes(); @@ -213,6 +259,8 @@ function loadTimerFormNow() { addTimerEditFormArray.channelSort = "tv"; addTimerEditFormArray.name = ""; addTimerEditFormArray.description = ""; + addTimerEditFormArray.dirname = "/hdd/movie"; + addTimerEditFormArray.tags = ""; addTimerEditFormArray.repeated = 0; addTimerEditFormArray.afterEvent = "3"; addTimerEditFormArray.deleteOldOnSave = 0; @@ -222,23 +270,20 @@ function loadTimerFormNow() { debug("[loadTimerFormNow] done"); - loadTimerFormChannels(); + loadTimerFormTags(); } -function loadTimerEditForm(justplay, begin, end, repeated, channel, channelName, name, description, afterEvent, deleteOldOnSave, eit) { - debug('[loadTimerEditForm] justplay: ' + justplay + ',begin: ' + begin + ',end: ' + end + ',repeated: ' + repeated + ',channel: ' + channel + ',name: ' + name +',description: ' + description + ',afterEvent: ' + afterEvent + ',deleteOldOnSave: ' + deleteOldOnSave); +function loadTimerEditForm(justplay, begin, end, repeated, channel, channelName, name, description, dirname, tags, afterEvent, deleteOldOnSave, eit) { + debug('[loadTimerEditForm] justplay: ' + justplay + ',begin: ' + begin + ',end: ' + end + ',repeated: ' + repeated + ',channel: ' + channel + ',name: ' + name +',description: ' + description +',dirname: ' + dirname +',tags: ' + tags + ',afterEvent: ' + afterEvent + ',deleteOldOnSave: ' + deleteOldOnSave); var start = new Date(Number(begin)*1000); - addTimerEditFormArray.syear = start.getFullYear(); - addTimerEditFormArray.smonth = start.getMonth() + 1; - addTimerEditFormArray.sday = start.getDate(); + addTimerEditFormArray.year = start.getFullYear(); + addTimerEditFormArray.month = start.getMonth() + 1; + addTimerEditFormArray.day = start.getDate(); addTimerEditFormArray.shour = start.getHours(); addTimerEditFormArray.smin = start.getMinutes(); var stopp = new Date(Number(end)*1000); - addTimerEditFormArray.eyear = stopp.getFullYear(); - addTimerEditFormArray.emonth = stopp.getMonth() + 1; - addTimerEditFormArray.eday = stopp.getDate(); addTimerEditFormArray.ehour = stopp.getHours(); addTimerEditFormArray.emin = stopp.getMinutes(); @@ -248,10 +293,12 @@ function loadTimerEditForm(justplay, begin, end, repeated, channel, channelName, addTimerEditFormArray.channelSort = ""; addTimerEditFormArray.name = String(name); addTimerEditFormArray.description = String(description); + addTimerEditFormArray.dirname = String(dirname); + addTimerEditFormArray.tags = String(tags); addTimerEditFormArray.repeated = Number(repeated); addTimerEditFormArray.afterEvent = Number(afterEvent); - debug("[loadTimerEditForm]" + justplay + "|" + begin + "|" + end + "|" + repeated + "|"+channel+"|"+name+"|"+description+"|"+afterEvent); + debug("[loadTimerEditForm]" + justplay + "|" + begin + "|" + end + "|" + repeated + "|"+channel+"|"+name+"|"+description+"|"+dirname+"|"+tags+"|"+afterEvent); addTimerEditFormArray.deleteOldOnSave = Number(deleteOldOnSave); addTimerEditFormArray.beginOld = Number(begin); @@ -259,7 +306,33 @@ function loadTimerEditForm(justplay, begin, end, repeated, channel, channelName, addTimerEditFormArray.eventID = Number(eit); - loadTimerFormChannels(); + loadTimerFormTags(); +} + +function loadTimerFormTags() { + doRequest(url_getTags, incomingTimerFormTags, false); +} + +function incomingTimerFormTags(request){ + debug("[incomingTimerFormTags] called"); + if(request.readyState == 4){ + var result = new SimpleXMLResult(getXML(request)); + addTimerEditFormArray.tagsList = result.getStateText().split(" "); + loadTimerFormLocations(); + } +} + +function loadTimerFormLocations() { + doRequest(url_getLocations, incomingTimerFormLocations, false); +} + +function incomingTimerFormLocations(request){ + debug("[incomingTimerFormLocations] called"); + if(request.readyState == 4){ + var result = new SimpleXMLResult(getXML(request)); + addTimerEditFormArray.locationsList = result.getStateText().split(" "); + loadTimerFormChannels(); + } } @@ -384,21 +457,28 @@ function loadTimerForm(){ channelObject[element.getServiceReference()] = element.getServiceName(); } + var locationsObject = {}; + for (i = 0; i < addTimerEditFormArray.locationsList.length; i++) { + str = addTimerEditFormArray.locationsList[i]; + locationsObject[str] = str; + } + + var tagsObject = addTimerFormPrepareTagsMenu(addTimerEditFormArray.tags); + var namespace = { - syear: createOptions(2008,2015,addTimerEditFormArray.syear), - smonth: createOptions(1,12,addTimerEditFormArray.smonth), - sday: createOptions(1,31,addTimerEditFormArray.sday), + year: createOptions(2008,2015,addTimerEditFormArray.year), + month: createOptions(1,12,addTimerEditFormArray.month), + day: createOptions(1,31,addTimerEditFormArray.day), shour: createOptions(0,23,addTimerEditFormArray.shour), smin: createOptions(0,59,addTimerEditFormArray.smin), - eyear: createOptions(2008,2015,addTimerEditFormArray.eyear), - emonth: createOptions(1,12,addTimerEditFormArray.emonth), - eday: createOptions(1,31,addTimerEditFormArray.eday), ehour: createOptions(0,23,addTimerEditFormArray.ehour), emin: createOptions(0,59,addTimerEditFormArray.emin), action: createOptionList(Action, addTimerEditFormArray.justplay), channel: createOptionList(channelObject, addTimerEditFormArray.channel), afterEvent: createOptionList(AfterEvent, addTimerEditFormArray.afterEvent), repeated: createOptionListRepeated(Repeated, addTimerEditFormArray.repeated), + dirname: createOptionList(locationsObject, addTimerEditFormArray.dirname), + tags: createOptionList(tagsObject, addTimerEditFormArray.tags), timer: { name: addTimerEditFormArray.name, @@ -420,10 +500,14 @@ function loadTimerForm(){ // Empty some stuff, but keep others to have the performance var tmp1 = addTimerEditFormArray.RadioList; var tmp2 = addTimerEditFormArray.TVList; + var tmp3 = addTimerEditFormArray.locationsList; + var tmp4 = addTimerEditFormArray.tagsList; addTimerEditFormArray = []; addTimerEditFormArray.deleteOldOnSave = 0; addTimerEditFormArray.RadioList = tmp1; addTimerEditFormArray.TVList = tmp2; + addTimerEditFormArray.locationsList = tmp3; + addTimerEditFormArray.tagsList = tmp4; addTimerEditFormArray.TVListFilled = 1; addTimerEditFormArray.RadioListFilled = 1; } @@ -485,16 +569,14 @@ function createOptionListRepeated(Repeated, repeated) { txt = txt.substr(0,1).toUpperCase() + txt.substr(1,1); } checked = " "; - if(num >= list[i]) { - num -= list[i]; + if (!(~num & list[i])) { checked = "checked"; } - namespace[i] = { 'id': Repeated[String(list[i])], 'name': Repeated[String(list[i])], 'value': list[i], 'txt': txt, - 'checked': checked + 'checked': checked }; } return namespace; @@ -505,11 +587,14 @@ function sendAddTimer() { debug("[sendAddTimer]" + "parentChannel:" +$('channel').value); if(parentPin($('channel').value)) { - beginD = new Date(ownLazyNumber($('syear').value), (ownLazyNumber($('smonth').value) - 1), ownLazyNumber($('sday').value), ownLazyNumber($('shour').value), ownLazyNumber($('smin').value)); + beginD = new Date(ownLazyNumber($('year').value), (ownLazyNumber($('month').value) - 1), ownLazyNumber($('day').value), ownLazyNumber($('shour').value), ownLazyNumber($('smin').value)); begin = beginD.getTime()/1000; - endD = new Date(ownLazyNumber($('eyear').value), (ownLazyNumber($('emonth').value) - 1), ownLazyNumber($('eday').value), ownLazyNumber($('ehour').value), ownLazyNumber($('emin').value)); + endD = new Date(ownLazyNumber($('year').value), (ownLazyNumber($('month').value) - 1), ownLazyNumber($('day').value), ownLazyNumber($('ehour').value), ownLazyNumber($('emin').value)); end = endD.getTime()/1000; + if(end   - Note: For recurring events start/end day/month are not required. + Note: For recurring events date is not required. - Start: + Date: - + {for y in year} + {/for} . - + {for m in month} + {/for} . - + {for d in day} + {/for} -  -  - {for hour in shour} {/for} : - {for min in smin} {/for} @@ -54,31 +58,13 @@ End: - - . - - . - -  -  - {for hour in ehour} {/for} : - {for min in emin} {/for} @@ -104,7 +90,7 @@

Radio

Channel:

- {for c in channel} {/for} @@ -114,13 +100,33 @@ Name: - + Description: - + + + + + Location: + + + + + + Tags: + + diff --git a/webinterface/src/web-data/tpl/default/tplTimerList.htm b/webinterface/src/web-data/tpl/default/tplTimerList.htm index f0d2285..ef986cf 100644 --- a/webinterface/src/web-data/tpl/default/tplTimerList.htm +++ b/webinterface/src/web-data/tpl/default/tplTimerList.htm @@ -16,10 +16,10 @@ - + - + diff --git a/webinterface/src/web/getlocations.xml b/webinterface/src/web/getlocations.xml new file mode 100644 index 0000000..2402d13 --- /dev/null +++ b/webinterface/src/web/getlocations.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> + + + + \ No newline at end of file diff --git a/webinterface/src/web/gettags.xml b/webinterface/src/web/gettags.xml new file mode 100644 index 0000000..6762923 --- /dev/null +++ b/webinterface/src/web/gettags.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> + + + + \ No newline at end of file diff --git a/webinterface/src/web/timeradd.xml b/webinterface/src/web/timeradd.xml index 332cd94..c3761e7 100644 --- a/webinterface/src/web/timeradd.xml +++ b/webinterface/src/web/timeradd.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> - + \ No newline at end of file diff --git a/webinterface/src/web/timerchange.xml b/webinterface/src/web/timerchange.xml index fdd07cf..5f61f42 100644 --- a/webinterface/src/web/timerchange.xml +++ b/webinterface/src/web/timerchange.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> - + \ No newline at end of file diff --git a/webinterface/src/web/timerlist.xml b/webinterface/src/web/timerlist.xml index 0a85e3c..2a89d21 100644 --- a/webinterface/src/web/timerlist.xml +++ b/webinterface/src/web/timerlist.xml @@ -7,7 +7,6 @@ <e2name></e2name> <e2description></e2description> <e2descriptionextended></e2descriptionextended> - <e2directory></e2directory> <e2disabled></e2disabled> <e2timebegin></e2timebegin> <e2timeend></e2timeend> @@ -15,7 +14,9 @@ <e2startprepare></e2startprepare> <e2justplay></e2justplay> <e2afterevent></e2afterevent> - <e2logentries></e2logentries> + <e2dirname></e2dirname> + <e2tags></e2tags> + <e2logentries></e2logentries> <e2filename></e2filename> <e2backoff></e2backoff> <e2nextactivation></e2nextactivation> diff --git a/webinterface/src/web/tvbrowser.xml b/webinterface/src/web/tvbrowser.xml index 27457b2..67fc457 100644 --- a/webinterface/src/web/tvbrowser.xml +++ b/webinterface/src/web/tvbrowser.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> - + \ No newline at end of file diff --git a/webinterface/src/webif.py b/webinterface/src/webif.py index 7604ad6..6e7677e 100644 --- a/webinterface/src/webif.py +++ b/webinterface/src/webif.py @@ -39,6 +39,7 @@ from WebComponents.Sources.MP import MP from WebComponents.Sources.ServiceListReload import ServiceListReload from WebComponents.Sources.AT import AT from WebComponents.Sources.CurrentService import CurrentService +from WebComponents.Sources.LocationsAndTags import LocationsAndTags from Components.Sources.FrontendStatus import FrontendStatus @@ -135,6 +136,12 @@ class ServiceWebScreen(WebScreen): ugly, but necessary :( """ +class LocationsAndTagsWebScreen(WebScreen): + def __init__(self, session, request): + WebScreen.__init__(self, session, request) + self["Locations"] = LocationsAndTags(session,LocationsAndTags.LOCATIONS) + self["Tags"] = LocationsAndTags(session,LocationsAndTags.TAGS) + class EPGWebScreen(WebScreen): def __init__(self, session, request): WebScreen.__init__(self, session, request) @@ -203,15 +210,11 @@ class ParentControlWebScreen(WebScreen): class WAPWebScreen(WebScreen): def __init__(self, session, request): WebScreen.__init__(self, session, request) - self["WAPFillOptionListSyear"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) - self["WAPFillOptionListSday"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) - self["WAPFillOptionListSmonth"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) + self["WAPFillOptionListYear"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) + self["WAPFillOptionListDay"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) + self["WAPFillOptionListMonth"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) self["WAPFillOptionListShour"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) self["WAPFillOptionListSmin"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) - - self["WAPFillOptionListEyear"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) - self["WAPFillOptionListEday"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) - self["WAPFillOptionListEmonth"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) self["WAPFillOptionListEhour"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) self["WAPFillOptionListEmin"] = WAPfunctions(session,func = WAPfunctions.LISTTIME) @@ -220,6 +223,8 @@ class WAPWebScreen(WebScreen): self["WAPFillValueName"] = WAPfunctions(session,func = WAPfunctions.FILLVALUE) self["WAPFillValueDescr"] = WAPfunctions(session,func = WAPfunctions.FILLVALUE) + self["WAPFillLocation"] = WAPfunctions(session,func = WAPfunctions.LOCATIONLIST) + self["WAPFillTags"] = WAPfunctions(session,func = WAPfunctions.TAGLIST) self["WAPFillOptionListRepeated"] = WAPfunctions(session,func = WAPfunctions.REPEATED) self["WAPServiceList"] = WAPfunctions(session, func = WAPfunctions.SERVICELIST)