axcore / tartube

A GUI front-end for youtube-dl, partly based on youtube-dl-gui and written in Python 3 / Gtk 3
GNU Lesser General Public License v2.1
2.12k stars 112 forks source link

No alarm sound when livestream starts #529

Closed Lux-Hue closed 1 year ago

Lux-Hue commented 1 year ago

linux fedora 37 tartube version 2.4.283

When a livestream is detected, and I turned on the "When a livestream starts, sound an alarm" checkbox, no audio is produced. When testing with the "test" button manually, the following pops up in the log:

Error in sys.excepthook:
Traceback (most recent call last):
  File "/home/large/.local/bin/tartube", line 158, in handle_uncaught_exception
    raise type(value)
TypeError

Original exception was:
Traceback (most recent call last):
  File "/home/large/.local/lib/python3.11/site-packages/tartube/config.py", line 33802, in on_test_sound_clicked
    self.app_obj.play_sound()
  File "/home/large/.local/lib/python3.11/site-packages/tartube/mainapp.py", line 21581, in play_sound
    os.path.join(self.sound_dir, sound_name),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen posixpath>", line 76, in join
TypeError: expected str, bytes or os.PathLike object, not NoneType
axcore commented 1 year ago

Is the playsound module installed on your system? You can check by clicking Edit > System preferences > General > Modules

playsound

Lux-Hue commented 1 year ago

yeah, it does detect that it is installed Screenshot_20230410_205128

axcore commented 1 year ago

There is a typo in the installation file (setup.py) that moves sound files to the wrong location. Apparently you're the first person in three years to notice it.

This issue affects the DEB and RPM installers, but not the installer for MS Windows, not the PyPI installer, and does not affect Tartube when running directly from source code.

I have fixed the typo, and also added more checks to prevent the python error. The fix will be in the next release, which will be ready in a few days.

Workarounds:

Lux-Hue commented 1 year ago

Yep, the workaround fixed the issue, thanks!