Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Commit

Permalink
Fixed play function using wrong path
Browse files Browse the repository at this point in the history
  • Loading branch information
PraneethJain committed Jun 15, 2022
1 parent 61e6636 commit 34c7e33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 5 additions & 2 deletions ardor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from rich.live import Live
from rich import print
from msvcrt import getch
import os

cli = Typer()

Expand Down Expand Up @@ -58,10 +59,12 @@ def shows():
def play():
manager = Manager()
manager.load_unwatched_episodes()
index, _ = selection_menu(
i, _ = selection_menu(
list(map(lambda x: f"{x['show']} {x['ep']}", manager.episodes_unwatched))
)
manager.play(index)
downloader = Downloader()
episode_path = f"{downloader.base_directory}\{manager.episodes_unwatched[i]['show']}\{manager.episodes_unwatched[i]['title']}"
os.system(f'"{episode_path}"')


@cli.command()
Expand Down
4 changes: 0 additions & 4 deletions manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ def create_table(self, L, title):
)
return table

def play(self, i):
episode_path = f"D:\Anime\{self.episodes_unwatched[i]['show']}\{self.episodes_unwatched[i]['title']}"
os.system(f'"{episode_path}"')

def watchlist(self):
if self.episodes_unwatched:
return self.create_table(
Expand Down

0 comments on commit 34c7e33

Please sign in to comment.