Giter Site home page Giter Site logo

Comments (21)

Minozen avatar Minozen commented on June 11, 2024 1

I'd love to help wherever I can, I really appreciate the work you've done so far, as this is the most comprehensive TIDAL RPC I've seen yet.

from discordtidal.

Minozen avatar Minozen commented on June 11, 2024 1

Thanks, I'll give it a run tomorrow. Will let you know how it goes.

from discordtidal.

unickorn avatar unickorn commented on June 11, 2024

Hmm. Any idea what song this could be?

from discordtidal.

Minozen avatar Minozen commented on June 11, 2024

I think it has something to do with the title length or the fact some tracks I play have accent characters in them. I attached a full log until the crash.

2022-09-04T14:28:45.914+0200 INFO log/log.go:13 initialized logger
2022-09-04T14:28:45.920+0200 INFO discord/endpoints.go:45 config loaded!
2022-09-04T14:28:46.120+0200 INFO rpc/presence.go:36 logged into discord
2022-09-04T14:28:46.146+0200 INFO discord/assets.go:57 opened database
2022-09-04T14:28:46.146+0200 INFO discord/assets.go:64 syncing discord
2022-09-04T14:28:46.249+0200 INFO discord/assets.go:95 loaded 70 assets
2022-09-04T14:28:46.308+0200 INFO tidal/track.go:57 searching Himna Generacije by Dubioza Kolektiv
2022-09-04T14:28:46.526+0200 INFO tidal/track.go:100 result: Himna Generacije by Dubioza Kolektiv
2022-09-04T14:28:46.795+0200 INFO discord/update_info.go:30 200 OK | update name: Himna Generacije
2022-09-04T14:28:46.795+0200 INFO rpc/presence.go:50 reloading presence
2022-09-04T14:28:59.967+0200 INFO tidal/track.go:57 searching Kažu by Dubioza Kolektiv
2022-09-04T14:29:00.102+0200 INFO tidal/track.go:100 result: Kažu by Dubioza Kolektiv
2022-09-04T14:29:00.102+0200 INFO discord/assets.go:190 asset for album Apsurdistan not found, uploading new...
2022-09-04T14:29:00.102+0200 INFO tidal/album.go:24 https://resources.tidal.com/images/892a42c1/1da7/4eec/b4d0/ce98aea96288/640x640.jpg
2022-09-04T14:29:00.738+0200 INFO discord/upload_asset.go:39 201 Created | upload asset (id: 1015961682088046752, name: 94649167)
2022-09-04T14:29:01.025+0200 INFO discord/update_info.go:30 200 OK | update name: Kažu
2022-09-04T14:29:01.025+0200 INFO rpc/presence.go:50 reloading presence
2022-09-04T14:29:17.231+0200 INFO tidal/track.go:57 searching Ti Tusen Tommeltotta by Halvdan Sivertsen
2022-09-04T14:29:17.430+0200 INFO tidal/track.go:100 result: Ti Tusen Tommeltotta by Halvdan Sivertsen
2022-09-04T14:29:17.430+0200 INFO discord/assets.go:190 asset for album Hilsen Halvdan not found, uploading new...
2022-09-04T14:29:17.430+0200 INFO tidal/album.go:24 https://resources.tidal.com/images/da2fa961/3b84/4a0b/99fd/338a99da0233/640x640.jpg
2022-09-04T14:29:18.360+0200 INFO discord/upload_asset.go:39 201 Created | upload asset (id: 1015961755769389166, name: 2402866)
2022-09-04T14:29:18.576+0200 INFO discord/update_info.go:30 200 OK | update name: Ti Tusen Tommeltotta
2022-09-04T14:29:18.577+0200 INFO rpc/presence.go:50 reloading presence
2022-09-04T14:30:07.121+0200 INFO discord/assets.go:64 syncing discord
2022-09-04T14:30:07.148+0200 INFO rpc/presence.go:45 logged out of discord
panic: runtime error: slice bounds out of range [:19] with length 0

goroutine 1 [running]:
discordtidal/discord.unhash(0x12c77b0, 0x0, 0x0, 0x20, 0x0, 0x12c77b0, 0x0)
C:/Dev/go/discord-tidal/discord/assets.go:207 +0x11d
discordtidal/discord.Sync()
C:/Dev/go/discord-tidal/discord/assets.go:86 +0x44a
discordtidal.Start()
C:/Dev/go/discord-tidal/tidal.go:106 +0x4d1
main.main()
C:/Dev/go/discord-tidal/examples/main.go:8 +0x27

File path used for the executable has no spaces or special characters.

from discordtidal.

unickorn avatar unickorn commented on June 11, 2024

Can you test with the safer branch and let me know if the issue persists?

from discordtidal.

Minozen avatar Minozen commented on June 11, 2024

Safer branch doesn't appear to have the issue. I tried the exact same order of songs just now and no errors or crashes have appeared.

from discordtidal.

unickorn avatar unickorn commented on June 11, 2024

I see. Can you try and figure out if the crash consistently happens on a certain song? If you can find the song, can you check your Discord dev panel to see if the album cover has uploaded?

from discordtidal.

Minozen avatar Minozen commented on June 11, 2024

Is it usual to see duplicate assets in the dev panel?

from discordtidal.

unickorn avatar unickorn commented on June 11, 2024

Nope, that shouldn't happen. Does Discord even allow that?

from discordtidal.

Minozen avatar Minozen commented on June 11, 2024

image

from discordtidal.

unickorn avatar unickorn commented on June 11, 2024

That looks quite broken. I couldn't maintain this project for long since TIDAL no longer functions in my country, I'll try to add some debug lines to figure out this issue for you ASAP. Help testing the debug builds would be much appreciated!

from discordtidal.

unickorn avatar unickorn commented on June 11, 2024

Quick status update: I've signed up for a 30 day TIDAL trial and set up a testing environment in a virtual Windows machine on my Mac. My code from last year looks beyond terrible, I'm working on a general cleanup and rewrite which will hopefully fix this issue as well as #3.

from discordtidal.

unickorn avatar unickorn commented on June 11, 2024

Hey @Minozen, could you try the latest release?

from discordtidal.

Minozen avatar Minozen commented on June 11, 2024

Trying now, all I'm getting is a;

panic: json: cannot unmarshal object into Go value of type []discord.Asset

goroutine 1 [running]:
github.com/unickorn/discordtidal/discord.Sync()
/Users/ilhanates/work/go/discordtidal/discord/assets.go:75 +0xc13
github.com/unickorn/discordtidal.Start()
/Users/ilhanates/work/go/discordtidal/tidal.go:35 +0xaa
main.main()
/Users/ilhanates/work/go/discordtidal/cmd/main.go:8 +0x17

I did delete the db folder.

Update: Must've been some sort of issue on my end as it's running fine now. I'll give 'er a run and let you know what happens.

from discordtidal.

unickorn avatar unickorn commented on June 11, 2024

Hey! Any update on this?

from discordtidal.

Minozen avatar Minozen commented on June 11, 2024

from discordtidal.

unickorn avatar unickorn commented on June 11, 2024

Awesome! Thank you for the support, I'd appreciate if you starred the repo as well :)

from discordtidal.

Minozen avatar Minozen commented on June 11, 2024

One last thing; It seems the name of the track is slow to update. Song previously played was "Overkill" and, while the album, artist and art did update, the title did not. The name should be "Krivo Je More 2".

image

2022-09-08T21:28:05.537+0200 INFO log/log.go:16 Initialized logger
2022-09-08T21:28:05.547+0200 INFO discord/config.go:42 Config loaded!
2022-09-08T21:28:05.816+0200 INFO rpc/presence.go:38 Logged into discord
2022-09-08T21:28:05.856+0200 INFO discord/assets.go:58 Opened database
2022-09-08T21:28:05.856+0200 INFO discord/assets.go:65 Syncing Discord cache
2022-09-08T21:28:06.135+0200 INFO discord/assets.go:100 Loaded 88 assets
2022-09-08T21:28:06.590+0200 INFO tidal/track.go:57 searching Krivo Je More 2 by Dubioza Kolektiv
2022-09-08T21:28:06.862+0200 INFO tidal/track.go:100 result: Krivo Je More 2 by Dubioza Kolektiv

Only after playing a different track and then going back to it does the title update.

from discordtidal.

unickorn avatar unickorn commented on June 11, 2024

Hmm, this might be because the rpc reload is faster than the request being processed by Discord. Would you mind testing an exe if I sent one with a potential fix to that?

from discordtidal.

Minozen avatar Minozen commented on June 11, 2024

Sure, send it my way.

from discordtidal.

unickorn avatar unickorn commented on June 11, 2024

discordtidal-rpcdelay.exe.zip
This adds a one second delay to give Discord some breathing room when updating your application name, hopefully that's the case and it fixes it.

from discordtidal.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.