vaibkumr / yTermPlayer

Stream youtube playlists as audio on linux terminal
GNU General Public License v3.0
267 stars 22 forks source link

total_seconds sometimes still crashes program #17

Open VitoMinheere opened 5 years ago

VitoMinheere commented 5 years ago

I see that in #14 total_seconds = 0 was added ti music_api.py line 250

However i still get the error

  File "/usr/lib/python3.7/site-packages/yTermPlayer/ui.py", line 71, in update_name
    temp = self.player_object.get_time_details()
  File "/usr/lib/python3.7/site-packages/yTermPlayer/music_api.py", line 258, in get_time_details
    minutes = int(total_seconds / 60)
UnboundLocalError: local variable 'total_seconds' referenced before assignment

I confirmed that i am on version 1.2.2

$ pip list | grep yTerm
yTermPlayer        1.2.2

I will add in some debug statements so i will know more about the state when it happens