studiowebux / obsidian-spotify-link

Obsidian.md Plugin to include the song or episode you're currently listening to in your note.
https://studiowebux.github.io/obsidian-plugins-docs/docs/category/plugin-spotify-link
MIT License
9 stars 2 forks source link

cannot read properties error #5

Closed notuntoward closed 6 months ago

notuntoward commented 7 months ago

If was able to get it working, this would be great!

I was able to:

Unfortunately, when I run "Append Spotify currently playing track with timestsamp, I get the error popup below:

image

I ran the logstravaganza plugin, and got this log: console-log.DESKTOP-VPFVCTB.md

Any advice?

studiowebux commented 7 months ago

Morning !

Thanks for opening the ticket,

Here are some things you can try:

get logs:

  1. If possible for you, can you open the developer tools (Toggle Developers Tools), it is under the view menu on macos
  2. then retry the Append Spotify currently playing track with timestsamp command
  3. you should see the error there and maybe more details about it (it will be useful for me)

for the template: I have this one setup and it works, if possible can you try it on your setup ?

{{ song_name }};{{ song_link }};{{ artists }};{{ album }};{{ album_release }};{{ album_cover_link_medium }};{{ timestamp }};

Verify Scope: the spotify scope must be set to : user-read-currently-playing (and should not be changed)

My guess is that the song is not returned by spotify or its data is different, did you try multiple songs ?


in the log file attached I dont see relevant information about the spotify plugin.

Let me know if you find the error in logs or if any of the steps above worked. I will try to replicate the issue later on a clean Obsidian Vault.

I will also review the error handling to prevent and document correctly this error.

studiowebux commented 7 months ago

Hello again !

are you listening to an episode (podcast) I received this issue : https://github.com/studiowebux/obsidian-spotify-link/issues/6

and it seems to be similar to what you describe, if so I found the root cause of the issue, I will fix and also provide new variables to create better templates for podcast

studiowebux commented 6 months ago

I published the v1.2.0, you can update the plugin directly in Obsidian.

The documentation is also up-to-date: https://studiowebux.github.io/obsidian-plugins-docs/docs/category/plugin-spotify-link

Let me know if it solves the issue

notuntoward commented 6 months ago

Yes, I was listening to a podcast, and now, after your update, podcast links work perfectly. Thanks for the extremely quick fix!