Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Songs repeat endlessly. youtube music provider on pi 4b #2259

Closed
1 task done
moswald14 opened this issue May 12, 2024 · 13 comments
Closed
1 task done

Songs repeat endlessly. youtube music provider on pi 4b #2259

moswald14 opened this issue May 12, 2024 · 13 comments

Comments

@moswald14
Copy link

What version of Music Assistant has the issue?

2.0.2

What version of the Home Assistant Integration have you got installed?

2024.5.3

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

  • Yes

The problem

youtube music songs repeat themselves endlessly. can't add any other providers to see if its just youtube. I searched the reports and it said this was fixed in beta, but its happening to me on 2.0.2. thought it was my le potato at first so I switched to the officially supported pi 4 image and its still happening.

How to reproduce

add youtube music account
play music
repeat is off
music repeats
toggle repeat on and off
music repeats

Music Providers

youtube music

Player Providers

vlc via telnet (HAOS addon)

Full log output

No response

Additional information

No response

What version of Home Assistant Core are your running

2024.5.3

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Raspberry Pi

@OzGav
Copy link
Contributor

OzGav commented May 12, 2024

Do you have a NON HA player to try?

@moswald14
Copy link
Author

How do I enable the system level SSH on the HS OS pi4 image to try this? I enabled ssh with the ctrl+shift+x extra options in the pi imager, but it isn't working. blank SSH file in boot dir didn't work. afaik the ssh in the addon section doesn't give me full access.

@moswald14
Copy link
Author

It doesn't repeat when I use the ytube_music_player from HACS

@OzGav
Copy link
Contributor

OzGav commented May 12, 2024

I mean use a native MA player. You haven’t attached the full log so I can’t help further at the moment.

@moswald14
Copy link
Author

how can I install a different player if I can't ssh into my pi? they did a good job on making the HAOS secure. I have an hdmi adapter coming tomorrow so I will solve that at least by then.

I reinstalled the vlc addon and MA and tried it again. same thing. I enabled logging at the debug level. only error just says my binding config is wrong (because I moved from another sbc), so it defaults to all interfaces. A funny behavior is that when I skip to a part in the song, it repeats from the part I skipped to. here is the log anyway

im linux-challenged so let me know if this is a me problem

2024-05-12 19:20:30.990 INFO (MainThread) [music_assistant] Starting Music Assistant Server (5d1b7f084bf247b589538f8889b8437b) version 2.0.2 - HA add-on: True - Safe mode: False
2024-05-12 19:20:31.012 INFO (MainThread) [music_assistant.cache] Initializing cache controller...
2024-05-12 19:20:31.230 INFO (MainThread) [music_assistant.music] Using a sync interval of 180 minutes.
2024-05-12 19:20:33.034 INFO (MainThread) [music_assistant.streams] Detected ffmpeg version 6.0.1 with libsoxr support
2024-05-12 19:20:33.034 INFO (MainThread) [music_assistant.streams] Starting server on  192.168.1.122:8097 - base url: http://192.168.1.201:8097
2024-05-12 19:20:33.039 ERROR (MainThread) [music_assistant.streams] Could not bind to 192.168.1.122, will start on all interfaces as fallback!
2024-05-12 19:20:33.046 INFO (MainThread) [music_assistant.webserver] Starting server on  0.0.0.0:8095 - base url: http://192.168.1.201:8095
2024-05-12 19:20:33.883 INFO (MainThread) [music_assistant] Loaded metadata provider TheAudioDB Metadata provider
2024-05-12 19:20:33.884 INFO (MainThread) [music_assistant] Loaded metadata provider fanart.tv Metadata provider
2024-05-12 19:20:33.884 INFO (MainThread) [music_assistant] Loaded music provider Music Assistant
2024-05-12 19:20:33.885 INFO (MainThread) [music_assistant] Loaded metadata provider MusicBrainz Metadata provider
2024-05-12 19:20:34.138 INFO (MainThread) [music_assistant] Loaded plugin provider Home Assistant
2024-05-12 19:20:34.279 INFO (MainThread) [music_assistant.music] Sync task for Music Assistant completed
2024-05-12 19:20:34.814 INFO (MainThread) [music_assistant] Loaded music provider Soundcloud
2024-05-12 19:20:34.861 INFO (MainThread) [music_assistant] Loaded music provider RadioBrowser
2024-05-12 19:20:34.881 INFO (MainThread) [music_assistant] Loaded player provider Home Assistant MediaPlayers
2024-05-12 19:20:34.968 INFO (MainThread) [music_assistant.players] Player registered: media_player.vlc_telnet/VLC-TELNET
2024-05-12 19:20:35.172 INFO (MainThread) [music_assistant] Loaded music provider YouTube Music
2024-05-12 19:20:35.349 INFO (MainThread) [music_assistant.music] Sync task for Soundcloud completed
2024-05-12 19:20:35.350 INFO (MainThread) [music_assistant.music] Sync task for RadioBrowser completed
2024-05-12 19:20:38.965 INFO (MainThread) [music_assistant.music] Sync task for YouTube Music completed
2024-05-12 19:34:19.556 DEBUG (ThreadPoolExecutor-0_6) [pytube.extract] finding initial function name
2024-05-12 19:34:19.557 DEBUG (ThreadPoolExecutor-0_6) [pytube.extract] Pattern failed: ytplayer\.config\s*=\s*
2024-05-12 19:34:19.557 DEBUG (ThreadPoolExecutor-0_6) [pytube.extract] No matches for regex ytplayer\.config\s*=\s*
2024-05-12 19:34:19.558 DEBUG (ThreadPoolExecutor-0_6) [pytube.extract] Pattern failed: ytInitialPlayerResponse\s*=\s*
2024-05-12 19:34:19.558 DEBUG (ThreadPoolExecutor-0_6) [pytube.extract] No matches for regex ytInitialPlayerResponse\s*=\s*
2024-05-12 19:34:19.560 DEBUG (ThreadPoolExecutor-0_6) [pytube.extract] finished regex search, matched: (/s/player/[\w\d]+/[\w\d_/.]+/base\.js)
2024-05-12 19:34:19.927 DEBUG (ThreadPoolExecutor-0_6) [pytube.cipher] finding initial function name
2024-05-12 19:34:20.776 DEBUG (ThreadPoolExecutor-0_6) [pytube.cipher] finished regex search, matched: (?P<sig>[a-zA-Z0-9$]+)\s*=\s*function\(\s*a\s*\)\s*{\s*a\s*=\s*a\.split\(\s*""\s*\)
2024-05-12 19:34:20.776 DEBUG (ThreadPoolExecutor-0_6) [pytube.cipher] getting transform plan
2024-05-12 19:34:20.778 DEBUG (ThreadPoolExecutor-0_6) [pytube.helpers] matched regex search: lOa=function\(\w\){[a-z=\.\(\"\)]*;(.*);(?:.+)}
2024-05-12 19:34:20.778 DEBUG (ThreadPoolExecutor-0_6) [pytube.cipher] getting transform object
2024-05-12 19:34:20.783 DEBUG (ThreadPoolExecutor-0_6) [pytube.cipher] Finding throttling function name
2024-05-12 19:34:20.786 DEBUG (ThreadPoolExecutor-0_6) [pytube.cipher] finished regex search, matched: a\.[a-zA-Z]\s*&&\s*\([a-z]\s*=\s*a\.get\("n"\)\)\s*&&\s*\([a-z]\s*=\s*([a-zA-Z0-9$]+)(\[\d+\])?\([a-z]\)
2024-05-12 19:34:20.800 DEBUG (ThreadPoolExecutor-0_6) [pytube.cipher] Finding throttling function name
2024-05-12 19:34:20.802 DEBUG (ThreadPoolExecutor-0_6) [pytube.cipher] finished regex search, matched: a\.[a-zA-Z]\s*&&\s*\([a-z]\s*=\s*a\.get\("n"\)\)\s*&&\s*\([a-z]\s*=\s*([a-zA-Z0-9$]+)(\[\d+\])?\([a-z]\)
2024-05-12 19:34:20.822 DEBUG (MainThread) [pytube.cipher] parsing transform function
2024-05-12 19:34:20.823 DEBUG (MainThread) [pytube.cipher] applied transform function
output: m=grJgA0M-zvz6338=W2kMEjzalmPglJoTdCDVRz6ls7HDQICIKiZ_ik9KIyy_znICR9J1ayo9u_X6gmuN-mi_-WwbOEgIQRwsSdQAJfJf
js_function: Mk
argument: 3
function: <function splice at 0x7f9c6f62a0>
2024-05-12 19:34:20.823 DEBUG (MainThread) [pytube.cipher] parsing transform function
2024-05-12 19:34:20.823 DEBUG (MainThread) [pytube.cipher] applied transform function
output: ==grJgA0M-zvz6338mW2kMEjzalmPglJoTdCDVRz6ls7HDQICIKiZ_ik9KIyy_znICR9J1ayo9u_X6gmuN-mi_-WwbOEgIQRwsSdQAJfJf
js_function: yA
argument: 17
function: <function swap at 0x7f9c6f6340>
2024-05-12 19:34:20.823 DEBUG (MainThread) [pytube.cipher] parsing transform function
2024-05-12 19:34:20.823 DEBUG (MainThread) [pytube.cipher] applied transform function
output: fJfJAQdSswRQIgEObwW-_im-Numg6X_u9oya1J9RCInz_yyIK9ki_ZiKICIQDH7sl6zRVDCdToJlgPmlazjEMk2Wm8336zvz-M0AgJrg==
js_function: h2
argument: 27
function: <function reverse at 0x7f9c6f6200>
2024-05-12 19:34:20.823 DEBUG (MainThread) [pytube.cipher] parsing transform function
2024-05-12 19:34:20.823 DEBUG (MainThread) [pytube.cipher] applied transform function
output: fJAQdSswRQIgEObwW-_im-Numg6X_u9oya1J9RCInz_yyIK9ki_ZiKICIQDH7sl6zRVDCdToJlgPmlazjEMk2Wm8336zvz-M0AgJrg==
js_function: Mk
argument: 2
function: <function splice at 0x7f9c6f62a0>
2024-05-12 19:34:20.823 DEBUG (MainThread) [pytube.cipher] parsing transform function
2024-05-12 19:34:20.823 DEBUG (MainThread) [pytube.cipher] applied transform function
output: AJfQdSswRQIgEObwW-_im-Numg6X_u9oya1J9RCInz_yyIK9ki_ZiKICIQDH7sl6zRVDCdToJlgPmlazjEMk2Wm8336zvz-M0AgJrg==
js_function: yA
argument: 2
function: <function swap at 0x7f9c6f6340>
2024-05-12 19:38:30.693 DEBUG (MainThread) [pytube.cipher] applied transform function
output: 1cGcat8WI58MnAMz6=nwACxNam6ZJPonUFRZTZWNoxa5AEiANZIAUuqTHyIiY3AUSCw6L29ZvKXp1SYtN7yggrunxpOAhIgRwsSdQAJfJf
js_function: Mk
argument: 3
function: <function splice at 0x7f9c6f62a0>
2024-05-12 19:38:30.694 DEBUG (MainThread) [pytube.cipher] applied transform function
output: =cGcat8WI58MnAMz61nwACxNam6ZJPonUFRZTZWNoxa5AEiANZIAUuqTHyIiY3AUSCw6L29ZvKXp1SYtN7yggrunxpOAhIgRwsSdQAJfJf
js_function: yA
argument: 17
function: <function swap at 0x7f9c6f6340>
2024-05-12 19:38:30.694 DEBUG (MainThread) [pytube.cipher] applied transform function
output: fJfJAQdSswRgIhAOpxnurggy7NtYS1pXKvZ92L6wCSUA3YiIyHTquUAIZNAiEA5axoNWZTZRFUnoPJZ6maNxCAwn16zMAnM85IW8tacGc=
js_function: h2
argument: 27
function: <function reverse at 0x7f9c6f6200>
2024-05-12 19:38:30.694 DEBUG (MainThread) [pytube.cipher] applied transform function
output: fJAQdSswRgIhAOpxnurggy7NtYS1pXKvZ92L6wCSUA3YiIyHTquUAIZNAiEA5axoNWZTZRFUnoPJZ6maNxCAwn16zMAnM85IW8tacGc=
js_function: Mk
argument: 2
function: <function splice at 0x7f9c6f62a0>
2024-05-12 19:38:30.694 DEBUG (MainThread) [pytube.cipher] applied transform function
output: AJfQdSswRgIhAOpxnurggy7NtYS1pXKvZ92L6wCSUA3YiIyHTquUAIZNAiEA5axoNWZTZRFUnoPJZ6maNxCAwn16zMAnM85IW8tacGc=
js_function: yA
argument: 2
function: <function swap at 0x7f9c6f6340>
2024-05-12 19:39:39.709 INFO (MainThread) [music_assistant] Loaded player provider Home Assistant MediaPlayers

@OzGav
Copy link
Contributor

OzGav commented May 13, 2024

You don’t SSH into anything. You just add a provider inthe MA settings and that discovers the players you have in your house. Look in the docs for what types are supported.

P.S. please don’t paste logs it makes it too hard to read these threads and turn off debug logging unless asked to turn it on.

@moswald14
Copy link
Author

I'm using the stereo jack on the pi4b. that's basically all I have. same problem with queuing music from soundcloud so I dont think its a problem with youtube

@OzGav
Copy link
Contributor

OzGav commented May 13, 2024

Yes so sounds like you should be installing the squeezelite ADDON in HA and then MA will find that.

@moswald14
Copy link
Author

okay so I got the LMS required for squeezelite. it took a reinstall and reboot or two but I got it working. It kinda glitches out with the current track playing. it skips the first track then it plays the second track and then displays what track it's going to play next but keeps playing the second one. if I just ignore it though, the queue continues like expected and the behavior fixes itself. squeezelite even reduce the lag when starting a song. I would call this the fix for any of these problems for now. doesn't require ssh, just some custom repo's in the add on store.

its either from the vlc-telnet integration itself or its from a combination of restoring from a le potato armbian community HA build to the official pi version and the vlc-telnet integration, I think.

now the list repeats endlessly on the "browse" tab, but that's for another ticket.

@moswald14
Copy link
Author

update: its back. both squeezelite and the add on store vlc player repeat the same song endlessly.
I switched my os to raspberry pi os (desktop and lite version) and and now its giving me this issue regardless of what player I have installed or selected 2 days of reinstalling, trying different os's, to no avail. I might try doing a whole new home assistant not from backup or I might try an earlier backup I have

@moswald14 moswald14 reopened this May 16, 2024
@OzGav
Copy link
Contributor

OzGav commented May 16, 2024

Are you using any native players or only HA players? And confirm if you have tried with QUEUE FLOW MODE enabled in the players settings.

@OzGav
Copy link
Contributor

OzGav commented May 17, 2024

We will close this soon if there is no further followup

@moswald14
Copy link
Author

I installed kodi last night but I just realised I missed the edit on your response "And confirm if you have tried with QUEUE FLOW MODE enabled in the players settings." giving that a try now... it seems to be working. hmm wonder why its not enabled by default? thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants