Re: Listenbrainz: no permanent storage of items
"Fran Burstall (Gmail)" <[email protected]> Sun, 23 Nov 2025 22:36:07 +0000
| Newsgroups | gmane.emacs.emms.user |
|---|---|
| Message-ID | <CADxS8iifsycNXnky2qYLnpSPi6O6T9knBTSTbT_VXZH5zF-bLQ@mail.gmail.com> |
--000000000000f8c12806444aacdf Content-Type: text/plain; charset="UTF-8" > > (why is this necessary?) The api places these restrictions on the submission (at least, I think it does---cannot find a reference right now). Now we know how things are failing, let us try to understand why. 1. While a track is playing, what is the value of emms-playing-time? 2. What does (emms-track-get (emms-playlist-current-selected-track) 'info-playing-time) return? I am going off the air now but will get back on this tomorrow in about 20 hours. ---Fran On Sun, 23 Nov 2025 at 22:13, Igor Sosa Mayor <[email protected]> wrote: > I think I found the problem (or the source of the problem...). I made a > simplified version of your code: > > (defun emms-listenbrainz-scrobbler-stop-hook () > "Submit the track to listenbrainz if we have listened long enough. > > That is, if it has been played for 240 seconds or half the length of the > track." > (let ((current-track (emms-playlist-current-selected-track))) > (emms-listenbrainz-scrobbler-make-async-submission-call > current-track))) > > Removing the code about the length (why is this necessary?) and now it > is working. But still I do not understand why this is happening. Maybe > because of this? > > (when (and track-length > ;; only submit files > (eq (emms-track-type current-track) 'file)) > > --- Igor > > > On 11/23/25 23:04, Fran Burstall (Gmail) wrote: > > I wonder if there is something else in the finished hook that fails > > ahead the call to the scrobbler? What is the value of emms-player- > > finished-hook? > > > > However, that would not explain the empty failed process buffers: does > > one of these appear after every scrobble attempt? > > > > To see if it is the hook that fails, execute > > > > (emms-listenbrainz-scrobbler-make-async-submission-call (emms-playlist- > > current-selected-track)) > > > > and see if that records a scrobble. For me, it does most of the time > > but, during testing today, it has failed 4 times leaving a failed > > process buffer. > > > > ---Fran > > > > > > > > On Sun, 23 Nov 2025 at 21:37, Igor Sosa Mayor > > <[email protected] <mailto:[email protected]>> wrote: > > > > > > > and let me know what appears in the message buffer when you try > > to scrobble. > > > > Exactly the same. > > > > I have the impression the finished-hook is not called... > > > > In the buffer URl-Debug I get the following (token removed > obviously), > > but only after starting the track. > > > > https://paste.rs/8Vl5n.txt <https://paste.rs/8Vl5n.txt> > > > > After finishing there are no new messages logged. > > > > But why should a hook not be triggered? > > > > Thanks again. > > > > --- Igor > > > > --000000000000f8c12806444aacdf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><blockquote style=3D"margin:0px 0px 0px 0.8ex;border-left:= 1px solid rgb(204,204,204);padding-left:1ex" class=3D"gmail_quote">=C2=A0(w= hy is this necessary?)=C2=A0</blockquote><div><br></div><div class=3D"gmail= _default" style=3D"font-family:arial,helvetica,sans-serif">The api places t= hese restrictions on the submission (at least, I think it does---cannot fin= d a reference right now).</div><div class=3D"gmail_default" style=3D"font-f= amily:arial,helvetica,sans-serif"><br></div><div class=3D"gmail_default" st= yle=3D"font-family:arial,helvetica,sans-serif">Now we know how things are f= ailing, let us try to understand why.</div><div class=3D"gmail_default" sty= le=3D"font-family:arial,helvetica,sans-serif"><br></div><div class=3D"gmail= _default" style=3D"font-family:arial,helvetica,sans-serif">1.=C2=A0 While a= track is playing, what is the value of emms-playing-time?</div><div class= =3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif">2. What= does (emms-track-get (emms-playlist-current-selected-track) 'info-play= ing-time) return?</div><div class=3D"gmail_default" style=3D"font-family:ar= ial,helvetica,sans-serif"><br></div><div class=3D"gmail_default" style=3D"f= ont-family:arial,helvetica,sans-serif">I am going off the air now but will = get back on this tomorrow in about 20 hours.</div><div class=3D"gmail_defau= lt" style=3D"font-family:arial,helvetica,sans-serif"><br></div><div class= =3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif">---Fran= </div><div class=3D"gmail_default" style=3D"font-family:arial,helvetica,san= s-serif"><br></div><div class=3D"gmail_default" style=3D"font-family:arial,= helvetica,sans-serif"><br></div></div><br><div class=3D"gmail_quote gmail_q= uote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, 23 Nov 2025 a= t 22:13, Igor Sosa Mayor <<a href=3D"mailto:[email protected]">= [email protected]</a>> wrote:<br></div><blockquote class=3D"gma= il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2= 04,204);padding-left:1ex">I think I found the problem (or the source of the= problem...). I made a <br> simplified version of your code:<br> <br> (defun emms-listenbrainz-scrobbler-stop-hook ()<br> =C2=A0 =C2=A0"Submit the track to listenbrainz if we have listened lon= g enough.<br> <br> That is, if it has been played for 240 seconds or half the length of the <b= r> track."<br> =C2=A0 =C2=A0(let ((current-track (emms-playlist-current-selected-track)))<= br> =C2=A0 =C2=A0 =C2=A0(emms-listenbrainz-scrobbler-make-async-submission-call= <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0current-track)))<br> <br> Removing the code about the length (why is this necessary?) and now it <br> is working. But still I do not understand why this is happening. Maybe <br> because of this?<br> <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0(when (and track-length<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; only submi= t files<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(eq (emms-tra= ck-type current-track) 'file))<br> <br> --- Igor<br> <br> <br> On 11/23/25 23:04, Fran Burstall (Gmail) wrote:<br> > I wonder if there is something else in the finished hook that fails <b= r> > ahead the call to the scrobbler?=C2=A0 What is the value of=C2=A0emms-= player- <br> > finished-hook?<br> > <br> > However, that would not explain the empty failed process buffers: does= <br> > one of these appear after every scrobble attempt?<br> > <br> > To see if it is the hook that fails, execute<br> > <br> > (emms-listenbrainz-scrobbler-make-async-submission-call=C2=A0(emms-pla= ylist- <br> > current-selected-track))<br> > <br> > and see if that records a scrobble.=C2=A0 For me, it does most of the = time <br> > but, during testing today, it has failed 4 times leaving a failed <br> > process buffer.<br> > <br> > ---Fran<br> > <br> > <br> > <br> > On Sun, 23 Nov 2025 at 21:37, Igor Sosa Mayor <br> > <<a href=3D"mailto:[email protected]" target=3D"_blank">jo= [email protected]</a> <mailto:<a href=3D"mailto:joseleopoldo1792@= gmail.com" target=3D"_blank">[email protected]</a>>> wrote:<= br> > <br> > <br> >=C2=A0 =C2=A0 =C2=A0 > and let me know what appears in the message b= uffer when you try<br> >=C2=A0 =C2=A0 =C2=A0to scrobble.<br> > <br> >=C2=A0 =C2=A0 =C2=A0Exactly the same.<br> > <br> >=C2=A0 =C2=A0 =C2=A0I have the impression the finished-hook is not call= ed...<br> > <br> >=C2=A0 =C2=A0 =C2=A0In the buffer URl-Debug I get the following (token = removed obviously),<br> >=C2=A0 =C2=A0 =C2=A0but only after starting the track.<br> > <br> >=C2=A0 =C2=A0 =C2=A0<a href=3D"https://paste.rs/8Vl5n.txt" rel=3D"noref= errer" target=3D"_blank">https://paste.rs/8Vl5n.txt</a> <<a href=3D"http= s://paste.rs/8Vl5n.txt" rel=3D"noreferrer" target=3D"_blank">https://paste.= rs/8Vl5n.txt</a>><br> > <br> >=C2=A0 =C2=A0 =C2=A0After finishing there are no new messages logged.<b= r> > <br> >=C2=A0 =C2=A0 =C2=A0But why should a hook not be triggered?<br> > <br> >=C2=A0 =C2=A0 =C2=A0Thanks again.<br> > <br> >=C2=A0 =C2=A0 =C2=A0--- Igor<br> > <br> <br> </blockquote></div> --000000000000f8c12806444aacdf--