sdaqo / anipy-cli

Little tool in python to watch and download anime from the terminal (the better way to watch anime). Also applicable as an API
https://sdaqo.github.io/anipy-cli
GNU General Public License v3.0
261 stars 39 forks source link

quiting binge mode results in error #22

Closed Quicksilver151 closed 2 years ago

Quicksilver151 commented 2 years ago
Videos being queued in the background, quitting here will terminate all players and queues                                                                                         
[q] Quit
Enter option: q

error message after entering q:

Traceback (most recent call last):                                                                                                                                                 
  File "./main.py", line 11, in <module>                                                                                                                                           
    from src import query, play, history, menu, download, url, binge, seasonal                                                                                                     
  File "/media/renderinguser/PC Disk EXT/anipy-cli/./src/menu.py", line 3, in <module>                                                                                             
    import main                                                                                                                                                                    
  File "/media/renderinguser/PC Disk EXT/anipy-cli/./main.py", line 77, in <module>                                                                                                
    seasonal.main_activity()                                                                                                                                                       
  File "/media/renderinguser/PC Disk EXT/anipy-cli/./src/seasonal.py", line 302, in main_activity                                                                                  
    menu()                                                                                                                                                                         
  File "/media/renderinguser/PC Disk EXT/anipy-cli/./src/seasonal.py", line 285, in menu
    start_action(True)
  File "/media/renderinguser/PC Disk EXT/anipy-cli/./src/seasonal.py", line 236, in start_action
    binge.start_watching(episode_urls)
  File "/media/renderinguser/PC Disk EXT/anipy-cli/./src/binge.py", line 89, in start_watching
    prompt_quit()
  File "/media/renderinguser/PC Disk EXT/anipy-cli/./src/binge.py", line 144, in prompt_quit
    kill_subprocess_with_player()
  File "/media/renderinguser/PC Disk EXT/anipy-cli/./src/binge.py", line 160, in kill_subprocess_with_player
    os.killpg(os.getpgid(play.sub_proc.pid), signal.SIGTERM)
AttributeError: module 'src.play' has no attribute 'sub_proc'
Dankni95 commented 2 years ago

This happens when there is no mpv players playing right? If the link fetching is not done and you quit, i guess.

Will look into it

Quicksilver151 commented 2 years ago

yea i didnt have mpv open when that happened

its because ive gone throught all the episodes in the binge list so theres none left for mpv to open but it still showed press q to exit so i did and that happened

Dankni95 commented 2 years ago

Yeapp, that make sense, thank you!

Should be pretty easy fix