def start_show(name, url): global active_app if active_app != None: active_app.start_show(name, url) else: print(len(opened_apps)) server.raise_not("There is no opened app at the moment.")
def next_show(self): if self.is_show_on: try: fmk.mouse.move(10, 10) next_show_button = self.driver.find_element_by_css_selector('button.button-nfplayerNextEpisode') next_show_button.click() except exceptions.NoSuchElementException: server.raise_not("This episode does not allow this action") pass else: server.raise_not("Select a show first")
def backwards(self): if self.is_show_on: fmk.keyboard.press(fmk.k_key.left) fmk.keyboard.release(fmk.k_key.left) else: server.raise_not("Select a show first")
def play(self): if self.is_show_on: fmk.keyboard.press(fmk.k_key.space) fmk.keyboard.release(fmk.k_key.space) else: server.raise_not("Select a show first")
def fullscreen(self): if self.is_show_on: fmk.keyboard.press(fmk.k_key.f11) fmk.keyboard.release(fmk.k_key.f11) else: server.raise_not("Select a show first")