Skip to content

Commit 03a8421

Browse files
committed
next episode feature and build fix
1 parent 3a7eb0a commit 03a8421

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def search_episode(url_episodes):
3939
episode_links = [a["href"] for a in soup.find_all('a', class_="lEp epT divNumEp smallbox px-2 mx-1 text-left d-flex")]
4040
opts = [str(i) for i in range(1, len(episode_links)+1)]
4141
selected = menu(opts)
42-
url_episode = episode_links[int(selected) - 1]
4342
return int(selected) - 1, episode_links
4443

4544
def find_player_link(url_episode):

menu.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
import curses
22
from sys import exit
33

4+
45
def __menu(stdscr, menu, result) -> str:
56
menu.append("EXIT")
6-
# Clear the screen
77
stdscr.clear()
8-
curses.curs_set(0) # Hide the cursor
8+
curses.curs_set(0)
99

10-
# Initialize colors
1110
curses.start_color()
1211
curses.init_pair(1, curses.COLOR_BLACK, curses.COLOR_YELLOW) # Black text on yellow background
1312

14-
# Define menu
1513
current_option = 0
1614
screen_height, screen_width = stdscr.getmaxyx()
1715
display_height = screen_height - 2 # Leave space for padding at the top and bottom
@@ -29,8 +27,6 @@ def __menu(stdscr, menu, result) -> str:
2927
stdscr.attroff(curses.color_pair(1))
3028
else:
3129
stdscr.addstr(idx + 1, 2, row)
32-
33-
# Get user input
3430
key = stdscr.getch()
3531

3632
# Arrow key navigation
@@ -43,9 +39,6 @@ def __menu(stdscr, menu, result) -> str:
4339
if current_option >= end_index or current_option == 0:
4440
start_index = current_option
4541
elif key == curses.KEY_ENTER or key in [10, 13]:
46-
#stdscr.addstr(len(menu) + 3, 2, f"You selected '{menu[current_option]}'")
47-
#stdscr.refresh()
48-
#stdscr.getch() # Wait for another key press
4942
result.append(menu[current_option])
5043
break
5144

0 commit comments

Comments
 (0)