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

Fatal error when media name is less than 2 characters long #34

Closed
ynot01 opened this issue Jun 9, 2024 · 3 comments
Closed

Fatal error when media name is less than 2 characters long #34

ynot01 opened this issue Jun 9, 2024 · 3 comments

Comments

@ynot01
Copy link

ynot01 commented Jun 9, 2024

Error: child "activity" fails because [child "details" fails because ["details" length must be at least 2 characters long]]

@ynot01 ynot01 changed the title Errors when media name is less than 2 characters long Fatal error when media name is less than 2 characters long Jun 9, 2024
@spix18
Copy link
Collaborator

spix18 commented Jun 9, 2024

can you provide more details of when this error is happening and what did u do exactly?
please don't just copy and paste the error.

@ynot01
Copy link
Author

ynot01 commented Jun 9, 2024

can you provide more details of when this error is happening and what did u do exactly? please don't just copy and paste the error.

As is detailed in the error, this occurs because the details field in Discord RPC does not accept entries unless they are "at least 2 characters long"

The problem arises when media titles are only 1 character long and vlc-discord-rpc tries to relay the title in the details field

Examples of media with single character titles that would trigger this error:

E by Fauna
H by Böhse Onkelz
D by Codeine
V by Constructus Corporation
K by Aidan Baker
K by Cul De Sac
U by Akufen
X by Bailter Space
E by Cloakroom
M by The Cure

This is where the title of media is copied to details

const details = meta.title;

let details = meta.title;

details = meta.title;

One potential fix is to append a character such as _ or - or . if the details field is too short if(details.length < 2)

Below is a line where the details field is checked for its length just before posting to Discord RPC, so it seems most fitting to place such a check nearby

if (details.length > 125) {

@Lauren1066
Copy link
Collaborator

022be73

Should be fixed! Thanks for bringing this up! Let me know if the issue persists.

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

No branches or pull requests

3 participants