Пример #1
0
            tags = request.args["tags"][0].split(' ')

        try:
            eventid = int(request.args["eventid"][0])
        except Exception, e:
            return {
                "result": False,
                "message": "The parameter 'eventid' must be a number"
            }

        always_zap = -1
        if "always_zap" in request.args.keys():
            always_zap = int(request.args["always_zap"][0])

        return addTimerByEventId(self.session, eventid,
                                 request.args["sRef"][0], justplay, dirname,
                                 tags, self.vpsparams(request), always_zap)

    def P_timerchange(self, request):
        res = self.testMandatoryArguments(request, [
            "sRef", "begin", "end", "name", "channelOld", "beginOld", "endOld"
        ])
        if res:
            return res

        disabled = False
        if "disabled" in request.args.keys():
            disabled = request.args["disabled"][0] == "1"

        justplay = False
        if "justplay" in request.args.keys():
Пример #2
0
		if "tags" in request.args.keys():
			tags = request.args["tags"][0].split(' ')
			
		try:
			eventid = int(request.args["eventid"][0])
		except Exception, e:
			return {
				"result": False,
				"message": "The parameter 'eventid' must be a number"
			}
			
		return addTimerByEventId(
			self.session,
			eventid,
			request.args["sRef"][0],
			justplay,
			dirname,
			tags,
			self.vpsparams(request)
		)

	def P_timerchange(self, request):
		res = self.testMandatoryArguments(request, ["sRef", "begin", "end", "name", "channelOld", "beginOld", "endOld"])
		if res:
			return res
			
		disabled = False
		if "disabled" in request.args.keys():
			disabled = request.args["disabled"][0] == "1"
			
		justplay = False
Пример #3
0
        tags = []
        if "tags" in request.args.keys():
            tags = request.args["tags"][0].split(' ')

        try:
            eventid = int(request.args["eventid"][0])
        except Exception, e:
            return {
                "result": False,
                "message": "The parameter 'eventid' must be a number"
            }

        return addTimerByEventId(
            self.session,
            eventid,
            request.args["sRef"][0],
            justplay,
            dirname,
            tags,
        )

    def P_timerchange(self, request):
        res = self.testMandatoryArguments(request, [
            "sRef", "begin", "end", "name", "description", "channelOld",
            "beginOld", "endOld"
        ])
        if res:
            return res

        disabled = False
        if "disabled" in request.args.keys():
            disabled = request.args["disabled"][0] == "1"