Example #1
0
	def post(self, **params):
		module = self.get_argument('module', 'missing')
		if module == 'missing':
			self.clear()
			self.set_status(404)
			self.finish("<html><body>Missing function call</body></html>")
			return
		else:
			Log.Debug('Recieved a post call for module: ' + module)
			if module == 'logs':			
				self = logs().reqprocessPost(self)
			elif module == 'settings':			
				self = settings().reqprocessPost(self)
			elif module == 'pms':			
				self = pms().reqprocessPost(self)
			elif module == 'findMedia':		
				self = findMedia().reqprocessPost(self)
			elif module == 'wt':		
				self = wt().reqprocessPost(self)
			elif module == 'scheduler':		
				self = scheduler().reqprocessPost(self)
			elif module == 'jsonExporter':	
				self = jsonExporter().reqprocessPost(self)
			else:
				self.clear()
				self.set_status(412)
				self.finish('Unknown module call')
				return
Example #2
0
	def delete(self, **params):
		module = self.get_argument('module', 'missing')
		if module == 'missing':
			self.clear()
			self.set_status(404)
			self.finish("<html><body>Missing function call</body></html>")
			return
		else:
			Log.Debug('Recieved a delete call for module: ' + module)
			if module == 'pms':			
				self = pms().reqprocessDelete(self)
			else:
				self.clear()
				self.set_status(412)
				self.finish("<html><body>Unknown module call</body></html>")
				return
Example #3
0
	def delete(self, **params):
		module = self.get_argument('module', 'missing')
		if module == 'missing':
			self.clear()
			self.set_status(404)
			self.finish("<html><body>Missing function call</body></html>")
			return
		else:
			Log.Debug('Recieved a delete call for module: ' + module)
			if module == 'pms':			
				self = pms().reqprocessDelete(self)
			else:
				self.clear()
				self.set_status(412)
				self.finish("<html><body>Unknown module call</body></html>")
				return
Example #4
0
	def get(self, **params):
		self.set_header('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')		
		module = self.get_argument('module', 'missing')
		if module == 'missing':
			self.clear()
			self.set_status(404)
			self.finish('Missing function call')
			return
		else:
			Log.Debug('Recieved a get call for module: ' + module)
	
#TODO
			''' Attempt to create a dynamic import, but so far, it sadly breaks access to the PMS API :-(
			import sys
			sys.path.append(os.path.join(Core.app_support_path, 'Plug-ins', NAME + '.bundle', 'Contents', 'Code'))
			mod = import_module(module)
			modClass = getattr(mod, module)()
			print 'GED1', dir(modClass)
			callFunction = getattr(modClass, 'reqprocess')
			self = modClass().reqprocess(self)
			'''

			

			if module == 'git':			
				self = git().reqprocess(self)
			elif module == 'logs':
				self = logs().reqprocess(self)
			elif module == 'pms':
				self = pms().reqprocess(self)
			elif module == 'settings':
				self = settings().reqprocess(self)
			elif module == 'findMedia':
				self = findMedia().reqprocess(self)
			elif module == 'jsonExporter':
#				self = jsonExporter().reqprocess(self)
				try:
					m = getattr(module)

				except Exception, e:
					print 'Ged json Exception: ' + str(e)




			elif module == 'language':
				self = language().reqprocess(self)
Example #5
0
	def delete(self, **params):
		self.set_header('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')		
		module = self.get_argument('module', 'missing')
		if module == 'missing':
			self.clear()
			self.set_status(404)
			self.finish("<html><body>Missing function call</body></html>")
			return
		else:
			Log.Debug('Recieved a delete call for module: ' + module)
			if module == 'pms':			
				self = pms().reqprocessDelete(self)
			else:
				self.clear()
				self.set_status(412)
				self.finish("<html><body>Unknown module call</body></html>")
				return
Example #6
0
	def get(self, **params):		
		module = self.get_argument('module', 'missing')
		if module == 'missing':
			self.clear()
			self.set_status(404)
			self.finish('Missing function call')
			return
		else:
			Log.Debug('Recieved a get call for module: ' + module)
	
#TODO
			''' Attempt to create a dynamic import, but so far, it sadly breaks access to the PMS API :-(
			import sys
			sys.path.append(os.path.join(Core.app_support_path, 'Plug-ins', NAME + '.bundle', 'Contents', 'Code'))
			mod = import_module(module)
			modClass = getattr(mod, module)()
			print 'GED1', dir(modClass)
			callFunction = getattr(modClass, 'reqprocess')
			self = modClass().reqprocess(self)
			'''

			if module == 'git':			
				self = git().reqprocess(self)
			elif module == 'logs':
				self = logs().reqprocess(self)
			elif module == 'pms':
				self = pms().reqprocess(self)
			elif module == 'settings':
				self = settings().reqprocess(self)
			elif module == 'findMedia':
				self = findMedia().reqprocess(self)
			elif module == 'language':
				self = language().reqprocess(self)
			elif module == 'plex2csv':
				self = plex2csv().reqprocess(self)
			elif module == 'wt':
				self = wt().reqprocess(self)
			elif module == 'scheduler':
				print 'Ged WebSrv Scheduler'
				self = scheduler().reqprocess(self)
			else:
				self.clear()
				self.set_status(412)
				self.finish('Unknown module call')
				return
Example #7
0
	def get(self, **params):		
		module = self.get_argument('module', 'missing')
		if module == 'missing':
			self.clear()
			self.set_status(404)
			self.finish('Missing function call')
			return
		else:
			Log.Debug('Recieved a get call for module: ' + module)
	
#TODO
			''' Attempt to create a dynamic import, but so far, it sadly breaks access to the PMS API :-(
			import sys
			sys.path.append(os.path.join(Core.app_support_path, 'Plug-ins', NAME + '.bundle', 'Contents', 'Code'))
			mod = import_module(module)
			modClass = getattr(mod, module)()
			print 'GED1', dir(modClass)
			callFunction = getattr(modClass, 'reqprocess')
			self = modClass().reqprocess(self)
			'''

			if module == 'git':			
				self = git().reqprocess(self)
			elif module == 'logs':
				self = logs().reqprocess(self)
			elif module == 'pms':
				self = pms().reqprocess(self)
			elif module == 'settings':
				self = settings().reqprocess(self)
			elif module == 'findMedia':
				self = findMedia().reqprocess(self)
			elif module == 'language':
				self = language().reqprocess(self)
			elif module == 'plex2csv':
				self = plex2csv().reqprocess(self)
			elif module == 'wt':
				self = wt().reqprocess(self)
			else:
				self.clear()
				self.set_status(412)
				self.finish('Unknown module call')
				return
Example #8
0
	def post(self, **params):
		module = self.get_argument('module', 'missing')
		if module == 'missing':
			self.clear()
			self.set_status(404)
			self.finish("<html><body>Missing function call</body></html>")
			return
		else:
			Log.Debug('Recieved a post call for module: ' + module)
			if module == 'logs':			
				self = logs().reqprocessPost(self)
			elif module == 'settings':			
				self = settings().reqprocessPost(self)
			elif module == 'pms':			
				self = pms().reqprocessPost(self)
			elif module == 'findUnmatched':		
				self = findUnmatched().reqprocessPost(self)
			else:
				self.clear()
				self.set_status(412)
				self.finish("<html><body>Unknown module call</body></html>")
				return
Example #9
0
	def get(self, **params):		
		module = self.get_argument('module', 'missing')
		if module == 'missing':
			self.clear()
			self.set_status(404)
			self.finish("<html><body>Missing function call</body></html>")
			return
		else:
			Log.Debug('Recieved a get call for module: ' + module)
	
#TODO
			'''
			import sys
			sys.path.append(os.path.join(Core.app_support_path, 'Plug-ins', NAME + '.bundle', 'Contents', 'Code'))
			mod = import_module(module)
			modClass = getattr(mod, module)()
			print 'GED1', dir(modClass)
			callFunction = getattr(modClass, 'reqprocess')

			self = modClass().reqprocess(self)

			'''


			if module == 'git':			
				self = git().reqprocess(self)
			elif module == 'logs':
				self = logs().reqprocess(self)
			elif module == 'pms':
				self = pms().reqprocess(self)
			elif module == 'settings':
				self = settings().reqprocess(self)
			elif module == 'findUnmatched':
				self = findUnmatched().reqprocess(self)
			else:
				self.clear()
				self.set_status(412)
				self.finish("<html><body>Unknown module call</body></html>")
				return
Example #10
0
    def get(self, **params):
        module = self.get_argument('module', 'missing')
        if module == 'missing':
            self.clear()
            self.set_status(404)
            self.finish("<html><body>Missing function call</body></html>")
            return
        else:
            Log.Debug('Recieved a get call for module: ' + module)

            #TODO
            '''
			import sys
			sys.path.append(os.path.join(Core.app_support_path, 'Plug-ins', NAME + '.bundle', 'Contents', 'Code'))
			mod = import_module(module)
			modClass = getattr(mod, module)()
			print 'GED1', dir(modClass)
			callFunction = getattr(modClass, 'reqprocess')

			self = modClass().reqprocess(self)

			'''

            if module == 'git':
                self = git().reqprocess(self)
            elif module == 'logs':
                self = logs().reqprocess(self)
            elif module == 'pms':
                self = pms().reqprocess(self)
            elif module == 'settings':
                self = settings().reqprocess(self)
            elif module == 'findUnmatched':
                self = findUnmatched().reqprocess(self)
            else:
                self.clear()
                self.set_status(412)
                self.finish("<html><body>Unknown module call</body></html>")
                return