# -*- coding: utf-8 -*-
from Components.Sources.Source import Source
from Plugins.Bp.gemininetcastwebif.plugins.__init__ import NetcastPlugins

class External(Source):
	def getList(self):
		l = []
		append = l.append
		for NetcastPlugin in NetcastPlugins:
			Len = len(NetcastPlugin)
			if Len > 5:
				NetcastPlugin = (NetcastPlugin[0], NetcastPlugin[1], NetcastPlugin[2], NetcastPlugin[3], NetcastPlugin[4])
			elif Len == 5:
				NetcastPlugin = (NetcastPlugin[0], NetcastPlugin[1], NetcastPlugin[2], NetcastPlugin[3], NetcastPlugin[4])
			elif Len == 4:
				NetcastPlugin = (NetcastPlugin[0], NetcastPlugin[1], NetcastPlugin[2], NetcastPlugin[3], "")
			elif Len == 3:
				NetcastPlugin = (NetcastPlugin[0], NetcastPlugin[1], NetcastPlugin[2], False, "")
			elif Len == 2:
				NetcastPlugin = (NetcastPlugin[0], NetcastPlugin[1], False, False, "")
			else:
				continue
			append(NetcastPlugin)
		return l

	list = property(getList)
	lut = {
				"Path":0,
				"Name":1,
				"HasGUI":2,
				"Target":3,
				"Title":4
	}
