Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Not uploading artwork #7

Open
memehammad opened this issue Nov 15, 2022 · 5 comments
Open

Not uploading artwork #7

memehammad opened this issue Nov 15, 2022 · 5 comments

Comments

@memehammad
Copy link

Hey, it seems that the artwork functionality is broken? I am 100% sure that I set up everything correctly since the tidal asset has been successfully uploaded and it's getting used whenever I play something, but none of the album artworks ever get uploaded.

@jonas-kaufmann
Copy link
Owner

Hi,
I am not sure what you mean by "they haven been successfully uploaded and it's getting used whenever I play something but none of the album artworks ever get uploaded". Do you see something like DiscordAPI: Upload of asset <name> was successful when running NowPlaing-for-TIDAL from the command line but it doesn't appear on the Discord application page under Rich Presence -> Art Assets?

@memehammad
Copy link
Author

What I meant is that the default "tidal" icon gets uploaded (so I guess my config file is configured correctly), but whenever I play music it shows that one instead of the album artwork and it doesn't seem to upload anything besides that.
Screenshot_2022-11-15-12-57-38-904-edit_com android chrome
How would I go about running the program from the command line so I can see what the logs are saying?

@jonas-kaufmann
Copy link
Owner

I just checked and I didn't actually implement that the logs are written to the command-line. The only way to see them is by heading into Visual Studio and building and running the application from source.

I quickly did this and I am seeing the following line: NowPlaying-for-TIDAL Error: 0 : TidalApi: Could not get the key from TIDAL desktop for the following Reason: Could not find: '[info] - Session was changed' Basically, the issue lies in SimpleTidalApi. I need it to query the TIDAL API about further information about the song, for example, a URL to its album artwork. For the TIDAL API I need a token, which I parse from TIDAL's logs. This is the part that is currently broken because TIDAL changed their logging output.

I had a quick look, however, I currently have no time to fix this but you can give it a shot if you'd like. I recommend completely throwing out my weird string slicing operations (for some reason you write weird code when you are younger :p) and use a regular expression instead to find the token in TIDAL's log file. You can also find a test there to quickly check whether you can query TIDAL's API using this token.

I will probably fix this at some point in the future but for now I have to work on other stuff. I am also now working under Linux where I can't use this project, hence the low priority. If you decide to fix it yourself, you can create a pull request afterwards. Let me know if you have any questions along the way.

@memehammad
Copy link
Author

I don't think it's logging the token every time you restart the app, this line is the only thing I could find relating to the login and it only appeared after I logged in and out again. Not sure if this is the one you're looking for.
Screenshot_1214

@jonas-kaufmann
Copy link
Owner

I am actually not sure, would need to try it out. Here is the test I mentioned earlier: https://github.com/Kaufi-Jonas/SimpleTidalApi/blob/master/SimpleTidalApi/SimpleTidalApiTests/ClientTests.cs

You can try hardcoding the key in that file with what you found and check whether you get a result back.

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

No branches or pull requests

2 participants