fix: remove useless import
This commit is contained in:
parent
619427b81a
commit
36533495e7
@ -1,5 +1,5 @@
|
|||||||
from simple_term_menu import TerminalMenu
|
|
||||||
from database import Database
|
from database import Database
|
||||||
|
import menu
|
||||||
from time import sleep
|
from time import sleep
|
||||||
import os, subprocess
|
import os, subprocess
|
||||||
|
|
||||||
@ -7,8 +7,7 @@ def _play(url: str, database: Database):
|
|||||||
start_pos = 0
|
start_pos = 0
|
||||||
viewing_data = database.get_viewing_data(url)
|
viewing_data = database.get_viewing_data(url)
|
||||||
if (viewing_data != None):
|
if (viewing_data != None):
|
||||||
menu = TerminalMenu([f"go back to {str(viewing_data.get('last_pos'))}", "restart from 0:00"])
|
response = menu.start_pos([f"go back to {str(viewing_data.get('last_pos'))}", "restart from 0:00"])
|
||||||
response = menu.show()
|
|
||||||
if (response == None):
|
if (response == None):
|
||||||
return (1);
|
return (1);
|
||||||
elif (response == 0):
|
elif (response == 0):
|
||||||
|
Loading…
Reference in New Issue
Block a user