def set_runtime_filter(self, control_id):
     ret = confirmdialog.open(header=addon.LANG(32151),
                              text=addon.LANG(32106),
                              nolabel=addon.LANG(32150),
                              yeslabel=addon.LANG(32149))
     if ret == -1:
         return None
     result = xbmcgui.Dialog().input(heading=xbmc.getLocalizedString(2050),
                                     type=xbmcgui.INPUT_NUMERIC)
     if not result:
         return None
     self.add_filter(key="with_runtime.%s" % ("lte" if ret == 1 else "gte"),
                     value=result,
                     label="{} min".format(result))
 def set_vote_count_filter(self, control_id):
     ret = True
     if not self.type == "tv":
         ret = confirmdialog.open(header=addon.LANG(32151),
                                  text=addon.LANG(32106),
                                  nolabel=addon.LANG(32150),
                                  yeslabel=addon.LANG(32149))
     if ret == -1:
         return None
     result = xbmcgui.Dialog().input(heading=addon.LANG(32111),
                                     type=xbmcgui.INPUT_NUMERIC)
     if result:
         self.add_filter(key="vote_count.lte" if ret == 1 else "vote_count.gte",
                         value=result,
                         label=result)
Beispiel #3
0
 def set_runtime_filter(self, control_id):
     ret = confirmdialog.open(header=addon.LANG(32151),
                              text=addon.LANG(32106),
                              nolabel=addon.LANG(32150),
                              yeslabel=addon.LANG(32149))
     if ret == -1:
         return None
     result = xbmcgui.Dialog().input(
         heading=xbmc.getLocalizedString(2050),
         type=xbmcgui.INPUT_NUMERIC)
     if not result:
         return None
     self.add_filter(key="with_runtime.%s" %
                     ("lte" if ret == 1 else "gte"),
                     value=result,
                     label="{} min".format(result))
Beispiel #4
0
 def set_year_filter(self, control_id):
     ret = confirmdialog.open(header=addon.LANG(32151),
                              text=addon.LANG(32106),
                              nolabel=addon.LANG(32150),
                              yeslabel=addon.LANG(32149))
     if ret == -1:
         return None
     result = xbmcgui.Dialog().input(heading=addon.LANG(345),
                                     type=xbmcgui.INPUT_NUMERIC)
     if not result:
         return None
     value = "{}-12-31" if ret == 1 else "{}-01-01"
     key = "first_air_date" if self.type == "tv" else "primary_release_date"
     self.add_filter(key="%s.%s" % (key, "lte" if ret == 1 else "gte"),
                     value=value.format(result),
                     label=result)
 def set_year_filter(self, control_id):
     ret = confirmdialog.open(header=addon.LANG(32151),
                              text=addon.LANG(32106),
                              nolabel=addon.LANG(32150),
                              yeslabel=addon.LANG(32149))
     if ret == -1:
         return None
     result = xbmcgui.Dialog().input(heading=addon.LANG(345),
                                     type=xbmcgui.INPUT_NUMERIC)
     if not result:
         return None
     value = "{}-12-31" if ret == 1 else "{}-01-01"
     key = "first_air_date" if self.type == "tv" else "primary_release_date"
     self.add_filter(key="%s.%s" % (key, "lte" if ret == 1 else "gte"),
                     value=value.format(result),
                     label=result)