Re: Listenbrainz: no permanent storage of items
"Fran Burstall (Gmail)" <[email protected]> Sat, 29 Nov 2025 19:50:52 +0000
| Newsgroups | gmane.emacs.emms.user |
|---|---|
| Message-ID | <CADxS8ijwhmmeom=TTOP0s3Ht0+cb3MmA1r8acGQ2P_MbAR4ghA@mail.gmail.com> |
--000000000000f3df270644c110a5 Content-Type: text/plain; charset="UTF-8" I have updated emms-listenbrainz-scrobbler.el to include a check on activation that emms-playing-mode is active. Probably the same change should be made to emms-librefm-scrobbler.el. ---Fran On Mon, 24 Nov 2025 at 10:04, Fran Burstall <[email protected]> wrote: > I am sure that this is the solution. > > I will update the library to explicitly require and activate > emms-playing-time-mode. > > ---Fran > > -- > > > ------------------------------ > *From:* Igor Sosa Mayor <[email protected]> > *Sent:* Monday, November 24, 2025 8:11:51 AM > *To:* [email protected] <[email protected]> > *Cc:* emms-help mailing list <[email protected]> > *Subject:* Re: Listenbrainz: no permanent storage of items > > Hi Fran, > > I think I found the problem. > > I am not using emms-all, but I load the modules myself. If I look at the > definition of emms-all I see there is > > (emms-playing-time-mode 1) > > which I had commented out in my own setup. > > This sould be the solution (but now listenbrainz.org is down and I can > not test it...). > > Many thanks for your help. > > Best, > > --- Igor > > On 11/23/25 23:36, Fran Burstall (Gmail) wrote: > > (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] <mailto:[email protected] > <[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] > <[email protected]>> > > <mailto:[email protected] > > <mailto:[email protected] <[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> > <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 > > > > > > > > On 11/23/25 23:36, Fran Burstall (Gmail) wrote: > > (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] <mailto:[email protected] > <[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] > <[email protected]>> > > <mailto:[email protected] > > <mailto:[email protected] <[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> <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 > > > > > > > --000000000000f3df270644c110a5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:arial,he= lvetica,sans-serif">I have updated emms-listenbrainz-scrobbler.el to includ= e a check on activation that emms-playing-mode is active.</div><div class= =3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif"><br></d= iv><div class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-s= erif">Probably the same change should be made to emms-librefm-scrobbler.el.= =C2=A0</div><div class=3D"gmail_default" style=3D"font-family:arial,helveti= ca,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,sans-serif"><br></div><div class=3D"gmail_d= efault" style=3D"font-family:arial,helvetica,sans-serif"><br></div></div><b= r><div class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class= =3D"gmail_attr">On Mon, 24 Nov 2025 at 10:04, Fran Burstall <<a href=3D"= mailto:[email protected]">[email protected]</a>> wrote:<br><= /div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bo= rder-left:1px solid rgb(204,204,204);padding-left:1ex"> <div> <div style=3D"font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Ar= ial,Helvetica,sans-serif;font-size:12pt;color:rgb(33,33,33)" dir=3D"auto"> I am sure that this is the solution.=C2=A0</div> <div style=3D"font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Ar= ial,Helvetica,sans-serif;font-size:12pt;color:rgb(33,33,33)" dir=3D"auto"> <br> </div> <div style=3D"font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Ar= ial,Helvetica,sans-serif;font-size:12pt;color:rgb(33,33,33)" dir=3D"auto"> I will update the library to explicitly require and activate emms-playing-t= ime-mode.=C2=A0</div> <div style=3D"font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Ar= ial,Helvetica,sans-serif;font-size:12pt;color:rgb(33,33,33)" dir=3D"auto"> <br> </div> <div style=3D"font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Ar= ial,Helvetica,sans-serif;font-size:12pt;color:rgb(33,33,33)" dir=3D"auto"> ---Fran</div> <div style=3D"font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Ar= ial,Helvetica,sans-serif;font-size:12pt;color:rgb(33,33,33)" dir=3D"auto"> <br> </div> <div style=3D"font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Ar= ial,Helvetica,sans-serif;font-size:12pt;color:rgb(33,33,33)" dir=3D"auto"> --</div> <div id=3D"m_7054346209908533642ms-outlook-mobile-body-separator-line" dir= =3D"auto" style=3D"font-family:Aptos,Aptos_MSFontService,-apple-system,Robo= to,Arial,Helvetica,sans-serif;font-size:12pt"> <div style=3D"font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Ar= ial,Helvetica,sans-serif;font-size:12pt"> <br> </div> </div> <div id=3D"m_7054346209908533642ms-outlook-mobile-signature" dir=3D"auto" s= tyle=3D"font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,He= lvetica,sans-serif;font-size:12pt"> <br style=3D"font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Ari= al,Helvetica,sans-serif;font-size:12pt"> </div> <hr style=3D"display:inline-block;width:98%"> <div id=3D"m_7054346209908533642divRplyFwdMsg" dir=3D"ltr"><font face=3D"Ca= libri, sans-serif" style=3D"font-size:11pt" color=3D"#000000"><b>From:</b> = Igor Sosa Mayor <<a href=3D"mailto:[email protected]" target=3D= "_blank">[email protected]</a>><br> <b>Sent:</b> Monday, November 24, 2025 8:11:51 AM<br> <b>To:</b> <a href=3D"mailto:[email protected]" target=3D"_blank">fra= [email protected]</a> <<a href=3D"mailto:[email protected]" tar= get=3D"_blank">[email protected]</a>><br> <b>Cc:</b> emms-help mailing list <<a href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a>><br> <b>Subject:</b> Re: Listenbrainz: no permanent storage of items</font> <div>=C2=A0</div> </div> <div><font size=3D"2"><span style=3D"font-size:11pt"> <div>Hi Fran,<br> <br> I think I found the problem.<br> <br> I am not using emms-all, but I load the modules myself. If I look at the <b= r> definition of emms-all I see there is<br> <br> (emms-playing-time-mode 1)<br> <br> which I had commented out in my own setup.<br> <br> This sould be the solution (but now <a href=3D"http://listenbrainz.org" tar= get=3D"_blank">listenbrainz.org</a> is down and I can <br> not test it...).<br> <br> Many thanks for your help.<br> <br> Best,<br> <br> --- Igor<br> <br> On 11/23/25 23:36, Fran Burstall (Gmail) wrote:<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (why is this necessary?)<br> =C2=A0><br> =C2=A0><br> =C2=A0> The api places these restrictions on the submission (at least, I= think<br> =C2=A0> it does---cannot find a reference right now).<br> =C2=A0><br> =C2=A0> Now we know how things are failing, let us try to understand why= .<br> =C2=A0><br> =C2=A0> 1.=C2=A0 While a track is playing, what is the value of emms-pla= ying-time?<br> =C2=A0> 2. What does (emms-track-get (emms-playlist-current-selected-tra= ck)<br> =C2=A0> 'info-playing-time) return?<br> =C2=A0><br> =C2=A0> I am going off the air now but will get back on this tomorrow in= about<br> =C2=A0> 20 hours.<br> =C2=A0><br> =C2=A0> ---Fran<br> =C2=A0><br> =C2=A0><br> =C2=A0><br> =C2=A0> On Sun, 23 Nov 2025 at 22:13, Igor Sosa Mayor<br> =C2=A0> <<a href=3D"mailto:[email protected]" target=3D"_bla= nk">[email protected]</a> <<a href=3D"mailto:joseleopoldo1792@g= mail.com" target=3D"_blank">mailto:[email protected]</a>>> w= rote:<br> =C2=A0><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 I think I found the problem (or the sour= ce of the problem...). I <br> made a<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 simplified version of your code:<br> =C2=A0><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 (defun emms-listenbrainz-scrobbler-stop-= hook ()<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "Submit the= track to listenbrainz if we have listened long <br> enough.<br> =C2=A0><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 That is, if it has been played for 240 s= econds or half the length of<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 the<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 track."<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (let ((current-t= rack (emms-playlist-current-selected-track)))<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (emm= s-listenbrainz-scrobbler-make-async-submission-call<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 current-track)))<br> =C2=A0><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 Removing the code about the length (why = is this necessary?) and <br> now it<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 is working. But still I do not understan= d why this is happening. <br> Maybe<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 because of this?<br> =C2=A0><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=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=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; on= ly submit files<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (eq (= emms-track-type current-track) 'file))<br> =C2=A0><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 --- Igor<br> =C2=A0><br> =C2=A0><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 On 11/23/25 23:04, Fran Burstall (Gmail)= wrote:<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > I wonder if there is somethin= g else in the finished hook that <br> fails<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > ahead the call to the scrobbl= er?=C2=A0 What is the value of <br> emms-player-<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > finished-hook?<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > However, that would not expla= in the empty failed process buffers:<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 does<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > one of these appear after eve= ry scrobble attempt?<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > To see if it is the hook that= fails, execute<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > (emms-listenbrainz-scrobbler-= make-async-submission-call (emms-<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 playlist-<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > current-selected-track))<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > and see if that records a scr= obble.=C2=A0 For me, it does most of the<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 time<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > but, during testing today, it= has failed 4 times leaving a failed<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > process buffer.<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > ---Fran<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > On Sun, 23 Nov 2025 at 21:37,= Igor Sosa Mayor<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > <<a href=3D"mailto:joseleo= [email protected]" target=3D"_blank">[email protected]</a> <<= a href=3D"mailto:[email protected]" target=3D"_blank">mailto:josel= [email protected]</a>><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 <<a></a>mailto:<a href=3D"mailto:jose= [email protected]" target=3D"_blank">[email protected]</a><br= > =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 <<a href=3D"mailto:joseleopoldo1792@g= mail.com" target=3D"_blank">mailto:[email protected]</a>>>&g= t; wrote:<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= > and let me know what appears in the message buffer when<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 you try<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0=C2=A0=C2=A0=C2=A0 to sc= robble.<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0=C2=A0=C2=A0=C2=A0 Exact= ly the same.<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0=C2=A0=C2=A0=C2=A0 I hav= e the impression the finished-hook is not called...<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0=C2=A0=C2=A0=C2=A0 In th= e buffer URl-Debug I get the following (token removed<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 obviously),<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0=C2=A0=C2=A0=C2=A0 but o= nly after starting the track.<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > <a href=3D"https://paste.rs/8= Vl5n.txt" target=3D"_blank">https://paste.rs/8Vl5n.txt</a> <<a href=3D"h= ttps://paste.rs/8Vl5n.txt" target=3D"_blank">https://paste.rs/8Vl5n.txt</a>= > <https://<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0 <a href=3D"http://paste.rs/8Vl5n.txt" ta= rget=3D"_blank">paste.rs/8Vl5n.txt</a> <<a href=3D"https://paste.rs/8Vl5= n.txt" target=3D"_blank">https://paste.rs/8Vl5n.txt</a>>><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0=C2=A0=C2=A0=C2=A0 After= finishing there are no new messages logged.<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0=C2=A0=C2=A0=C2=A0 But w= hy should a hook not be triggered?<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0=C2=A0=C2=A0=C2=A0 Thank= s again.<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0=C2=A0=C2=A0=C2=A0 --- I= gor<br> =C2=A0>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> =C2=A0><br> <br> <br> On 11/23/25 23:36, Fran Burstall (Gmail) wrote:<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0(why is this necessary?) <br> > <br> > <br> > The api places these restrictions on the submission (at least, I think= <br> > it does---cannot find a reference right now).<br> > <br> > Now we know how things are failing, let us try to understand why.<br> > <br> > 1.=C2=A0 While a track is playing, what is the value of emms-playing-t= ime?<br> > 2. What does (emms-track-get (emms-playlist-current-selected-track) <b= r> > 'info-playing-time) return?<br> > <br> > I am going off the air now but will get back on this tomorrow in about= <br> > 20 hours.<br> > <br> > ---Fran<br> > <br> > <br> > <br> > On Sun, 23 Nov 2025 at 22:13, Igor Sosa Mayor <br> > <<a href=3D"mailto:[email protected]" target=3D"_blank">jo= [email protected]</a> <<a href=3D"mailto:[email protected]= om" target=3D"_blank">mailto:[email protected]</a>>> wrote:<= br> > <br> >=C2=A0=C2=A0=C2=A0=C2=A0 I think I found the problem (or the source of = the problem...). I made a<br> >=C2=A0=C2=A0=C2=A0=C2=A0 simplified version of your code:<br> > <br> >=C2=A0=C2=A0=C2=A0=C2=A0 (defun emms-listenbrainz-scrobbler-stop-hook (= )<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0"Submit the track to l= istenbrainz if we have listened long enough.<br> > <br> >=C2=A0=C2=A0=C2=A0=C2=A0 That is, if it has been played for 240 seconds= or half the length of<br> >=C2=A0=C2=A0=C2=A0=C2=A0 the<br> >=C2=A0=C2=A0=C2=A0=C2=A0 track."<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0(let ((current-track (emms-= playlist-current-selected-track)))<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0(emms-listenbrainz-s= crobbler-make-async-submission-call<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0current-track)))<br> > <br> >=C2=A0=C2=A0=C2=A0=C2=A0 Removing the code about the length (why is thi= s necessary?) and now it<br> >=C2=A0=C2=A0=C2=A0=C2=A0 is working. But still I do not understand why = this is happening. Maybe<br> >=C2=A0=C2=A0=C2=A0=C2=A0 because of this?<br> > <br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when (and tr= ack-length<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0;; only submit files<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(eq (emms-track-type current-track) 'file))<br> > <br> >=C2=A0=C2=A0=C2=A0=C2=A0 --- Igor<br> > <br> > <br> >=C2=A0=C2=A0=C2=A0=C2=A0 On 11/23/25 23:04, Fran Burstall (Gmail) wrote= :<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > I wonder if there is something else= in the finished hook that fails<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > ahead the call to the scrobbler?=C2= =A0 What is the value of=C2=A0emms-player-<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > finished-hook?<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > However, that would not explain the= empty failed process buffers:<br> >=C2=A0=C2=A0=C2=A0=C2=A0 does<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > one of these appear after every scr= obble attempt?<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > To see if it is the hook that fails= , execute<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > (emms-listenbrainz-scrobbler-make-a= sync-submission-call=C2=A0(emms-<br> >=C2=A0=C2=A0=C2=A0=C2=A0 playlist-<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > current-selected-track))<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > and see if that records a scrobble.= =C2=A0 For me, it does most of the<br> >=C2=A0=C2=A0=C2=A0=C2=A0 time<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > but, during testing today, it has f= ailed 4 times leaving a failed<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > process buffer.<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > ---Fran<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > On Sun, 23 Nov 2025 at 21:37, Igor = Sosa Mayor<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > <<a href=3D"mailto:joseleopoldo1= [email protected]" target=3D"_blank">[email protected]</a> <<a href= =3D"mailto:[email protected]" target=3D"_blank">mailto:joseleopold= [email protected]</a>><br> >=C2=A0=C2=A0=C2=A0=C2=A0 <<a></a>mailto:<a href=3D"mailto:joseleopol= [email protected]" target=3D"_blank">[email protected]</a><br> >=C2=A0=C2=A0=C2=A0=C2=A0 <<a href=3D"mailto:[email protected]= om" target=3D"_blank">mailto:[email protected]</a>>>> wro= te:<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > and let me= know what appears in the message buffer when<br> >=C2=A0=C2=A0=C2=A0=C2=A0 you try<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0to scrobble.<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0Exactly the same= .<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0I have the impre= ssion the finished-hook is not called...<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0In the buffer UR= l-Debug I get the following (token removed<br> >=C2=A0=C2=A0=C2=A0=C2=A0 obviously),<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0but only after s= tarting the track.<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > <a href=3D"https://paste.rs/8Vl5n.t= xt" target=3D"_blank">https://paste.rs/8Vl5n.txt</a> <<a href=3D"https:/= /paste.rs/8Vl5n.txt" target=3D"_blank">https://paste.rs/8Vl5n.txt</a>> &= lt;https://<br> >=C2=A0=C2=A0=C2=A0=C2=A0 <a href=3D"http://paste.rs/8Vl5n.txt" target= =3D"_blank">paste.rs/8Vl5n.txt</a> <<a href=3D"https://paste.rs/8Vl5n.tx= t" target=3D"_blank">https://paste.rs/8Vl5n.txt</a>>><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0After finishing = there are no new messages logged.<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0But why should a= hook not be triggered?<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0Thanks again.<br= > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=C2=A0 =C2=A0 =C2=A0--- Igor<br> >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ><br> > <br> <br> </div> </span></font></div> </div> </blockquote></div> --000000000000f3df270644c110a5--