IMDb: fix single result
[enigma2-plugins.git] / epgsearch / src / __init__.py
1 # Config
2 from Components.config import config, ConfigSet, ConfigSubsection, ConfigText, ConfigNumber, ConfigYesNo, ConfigSelection
3 from collections import OrderedDict
4
5 class SearchType:
6         ASK = "ask"
7         EXACT_TITLE = "exact_title"
8         TITLE = "title"
9         TITLE_DESCRIPTION = "title_description"
10
11         CHOICES = OrderedDict()
12         CHOICES[ASK] = _("Ask user")
13         CHOICES[EXACT_TITLE] = _("Exact match of title")
14         CHOICES[TITLE] = _("Partial match of title")
15         CHOICES[TITLE_DESCRIPTION] = _("Partial match of title or description")
16         
17         BUTTON_CHOICES = [("none",_("none")),("red",_("Channellist red")),("blue",_("EPG Single/Eventview blue")),("all",_("all"))]
18
19 config.plugins.epgsearch = ConfigSubsection()
20 config.plugins.epgsearch.history = ConfigSet(choices = [])
21 config.plugins.epgsearch.history_length = ConfigNumber(default = 10)
22 config.plugins.epgsearch.add_history_onOpen = ConfigYesNo(default = True)
23 config.plugins.epgsearch.search_type = ConfigSelection(choices=SearchType.CHOICES, default=SearchType.ASK)
24 config.plugins.epgsearch.search_scope = ConfigText(default = "all", fixed_size = False)
25 config.plugins.epgsearch.show_shortdesc = ConfigYesNo(default = False)
26 config.plugins.epgsearch.show_events = ConfigSelection(choices=[("all",_("all")),("current",_("current")),("future",_("future")),("current_future",_("current & future"))], default="all")
27 config.plugins.epgsearch.show_sname_in_title = ConfigYesNo(default = False)
28 config.plugins.epgsearch.show_picon = ConfigYesNo(default = False)
29 config.plugins.epgsearch.blue_function = ConfigSelection(choices=[("combi",_("Text search history with search filters")),("ask",_("Ask user")),("searchlist",_("Search filter list")),("history",_("Text search history"))], default="combi")
30
31 config.plugins.epgsearch.searchEPG_menu = ConfigSelection(choices = SearchType.BUTTON_CHOICES, default = "all")
32 config.plugins.epgsearch.openSearchFilter_menu = ConfigSelection(choices = SearchType.BUTTON_CHOICES, default = "all")
33 config.plugins.epgsearch.addSearchFilter_menu = ConfigSelection(choices = SearchType.BUTTON_CHOICES, default = "all")