Open ghj7211 opened 3 months ago
Ok, so i found the fix. The issue was due to recent change in youtube music. (link) I found out that @KoljaWindeler already released a temporary fix for this in 20240810.01, but somehow it did not work out on my side. My workaround here was to use 'pytubefix' library. Though not reliable, the original pytube library itself seems to be a dead repo, so the change should not sound drastic. I'll leave a fork for the patched version: https://github.com/KoljaWindeler/ytube_music_player/compare/main...ghj7211:ytube_music_player:main
Ok, so i found the fix. The issue was due to recent change in youtube music. (link) I found out that @KoljaWindeler already released a temporary fix for this in 20240810.01, but somehow it did not work out on my side. My workaround here was to use 'pytubefix' library. Though not reliable, the original pytube library itself seems to be a dead repo, so the change should not sound drastic. I'll leave a fork for the patched version: main...ghj7211:ytube_music_player:main
I'm using the code by modifying it like your commit. Thank you. I hope this commit gets merged soon.
Describe the bug When I try to play a track with ytube_media_player, it connects to my google home mini (i hear it being connected), awaits for about 10 seconds, and then fails to play it. When I try playing a playlist, each titles fail to play and immediately move to the next track until the end of the list.
How to reproduce This is what i get when I directly execute service from developer tools: (edit: i put in a wrong media_content_id so corrected it. now i got the id directly from {{state_attr('sensor.ytube_music_player_extra', 'search')[0].id }} )
I also tried playing a random track from dashboard by selecting a track from ytube_media_player media source with the default card. This is the log message:
Version ytube_media_player 20240810.01 (I also tried 20240709.01 and 20240704.01, which did not work as well)
Core 2024.8.1 Supervisor 2024.08.0
Additional Info I tried removing it from hacs, integrations, and json auth from config/.storage, and then reboot with reinstall. It used to work until a month ago. It had worked flawlessly. Since then I haven’t been using the feature so i cannot tell from when or why it had stopped working. I strongly suspect that this is recent pytube issue, but i'd like to know if any others have this same problem. Maybe It could just be a problem on my side. FYI, I currently have the extra sensor enabled in advanced settings.
Thanks in advance.