th-ch / youtube-music

YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)
https://th-ch.github.io/youtube-music/
MIT License
8.99k stars 512 forks source link

[Bug]: Discord RPC fails if a song's title is only one character long #1314

Closed fee1-dead closed 1 year ago

fee1-dead commented 1 year ago

Preflight Checklist

YouTube Music (Application) Version

2.1.0

What operating system are you using?

Other Linux

Operating System Version

NixOS 23.11.20231011.5e4c2ad (Tapir)

What arch are you using?

x64

Last Known Working YouTube Music (Application) version

No response

Expected Behavior

Discord RPC to work

Actual Behavior

Doesn't work. Error logs:

RPC_INVALID_PAYLOAD: child "activity" fails because [child "details" fails because ["details" length must be at least 2 characters long]]
    at NR.setActivity (/nix/store/h1if47hbqi41cz2ni6yq4rm75hnhn7d8-youtube-music-2.1.0/share/lib/youtube-music/resources/app.asar/dist/index.js:37:110939)
    at ux (/nix/store/h1if47hbqi41cz2ni6yq4rm75hnhn7d8-youtube-music-2.1.0/share/lib/youtube-music/resources/app.asar/dist/index.js:320:320048)
    at /nix/store/h1if47hbqi41cz2ni6yq4rm75hnhn7d8-youtube-music-2.1.0/share/lib/youtube-music/resources/app.asar/dist/index.js:320:320132
    at IpcMainImpl.<anonymous> (/nix/store/h1if47hbqi41cz2ni6yq4rm75hnhn7d8-youtube-music-2.1.0/share/lib/youtube-music/resources/app.asar/dist/index.js:37:119226)
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 4000
}

Additional Information

Here's a link to a song with a title that is only one character long: https://music.youtube.com/watch?v=fJbfrgE3zpk

JellyBrick commented 1 year ago

Thanks for the bug report! It should be fixed in 5c49b28 👍

image

fee1-dead commented 1 year ago

Thanks for the quick fix!