Re: Listenbrainz: no permanent storage of items
Fran Burstall <[email protected]> Mon, 24 Nov 2025 10:04:03 +0000
| Newsgroups | gmane.emacs.emms.user |
|---|---|
| Message-ID | <MI0P293MB00433154D7B0739DEAADE279FFD0A@MI0P293MB0043.ITAP293.PROD.OUTLOOK.COM> |
--_000_MI0P293MB00433154D7B0739DEAADE279FFD0AMI0P293MB0043ITAP_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I am sure that this is the solution. I will update the library to explicitly require and activate emms-playing-t= ime-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]>> 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]> > <mailto:[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> <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]>> 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 i= t > is working. But still I do not understand why this is happening. Mayb= e > 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 fail= s > > 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]> > <mailto:[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> <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 > > > --_000_MI0P293MB00433154D7B0739DEAADE279FFD0AMI0P293MB0043ITAP_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"= > </head> <body> <div style=3D"font-family: Aptos, Aptos_MSFontService, -apple-system, Robot= o, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(33, 33, 33);" = dir=3D"auto"> I am sure that this is the solution. </div> <div style=3D"font-family: Aptos, Aptos_MSFontService, -apple-system, Robot= o, Arial, 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, Robot= o, Arial, 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. </div> <div style=3D"font-family: Aptos, Aptos_MSFontService, -apple-system, Robot= o, Arial, 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, Robot= o, Arial, 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, Robot= o, Arial, 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, Robot= o, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(33, 33, 33);" = dir=3D"auto"> --</div> <div id=3D"ms-outlook-mobile-body-separator-line" data-applydefaultfontstyl= es=3D"true" dir=3D"auto" style=3D"font-family: Aptos, Aptos_MSFontService, = -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;"> <div style=3D"font-family: Aptos, Aptos_MSFontService, -apple-system, Robot= o, Arial, Helvetica, sans-serif; font-size: 12pt;"> <br> </div> </div> <div id=3D"ms-outlook-mobile-signature" dir=3D"auto" style=3D"font-family: = Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-s= erif; font-size: 12pt;"> <br style=3D"font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto= , Arial, Helvetica, sans-serif; font-size: 12pt;"> </div> <hr style=3D"display:inline-block;width:98%" tabindex=3D"-1"> <div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st= yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> Igor Sosa Mayor <j= [email protected]><br> <b>Sent:</b> Monday, November 24, 2025 8:11:51 AM<br> <b>To:</b> [email protected] <[email protected]><br> <b>Cc:</b> emms-help mailing list <[email protected]><br> <b>Subject:</b> Re: Listenbrainz: no permanent storage of items</font> <div> </div> </div> <div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt;= "> <div class=3D"PlainText">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 listenbrainz.org 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> > (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. While a track is playing, what is the value of emms-pla= ying-time?<br> > 2. What does (emms-track-get (emms-playlist-current-selected-tra= ck)<br> > '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> > <[email protected] <<a href=3D"mailto:joseleopold= [email protected]">mailto:[email protected]</a>>> wrote:<br> ><br> > I think I found the problem (or the sour= ce of the problem...). I <br> made a<br> > simplified version of your code:<br> ><br> > (defun emms-listenbrainz-scrobbler-stop-= hook ()<br> > "Submit the= track to listenbrainz if we have listened long <br> enough.<br> ><br> > That is, if it has been played for 240 s= econds or half the length of<br> > the<br> > track."<br> > (let ((current-t= rack (emms-playlist-current-selected-track)))<br> > (emm= s-listenbrainz-scrobbler-make-async-submission-call<br> >  = ; current-track)))<br> ><br> > Removing the code about the length (why = is this necessary?) and <br> now it<br> > is working. But still I do not understan= d why this is happening. <br> Maybe<br> > because of this?<br> ><br> >  = ; (when (and track-length<br> >  = ; ;; only= submit files<br> >  = ; (eq (em= ms-track-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 somethin= g else in the finished hook that <br> fails<br> > > ahead the call to the scrobbl= er? What is the value of <br> emms-player-<br> > > finished-hook?<br> > ><br> > > However, that would not expla= in the empty failed process buffers:<br> > does<br> > > one of these appear after eve= ry scrobble attempt?<br> > ><br> > > To see if it is the hook that= fails, execute<br> > ><br> > > (emms-listenbrainz-scrobbler-= make-async-submission-call (emms-<br> > playlist-<br> > > current-selected-track))<br> > ><br> > > and see if that records a scr= obble. For me, it does most of the<br> > 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> > > <[email protected]= m <<a href=3D"mailto:[email protected]">mailto:joseleopoldo1792= @gmail.com</a>><br> > <<a href=3D""></a>mailto:joseleopoldo= [email protected]<br> > <<a href=3D"mailto:joseleopoldo1792@g= mail.com">mailto:[email protected]</a>>>> wrote:<br> > ><br> > ><br> > > = > and let me know what appears in the message buffer when<br> > you try<br> > > to sc= robble.<br> > ><br> > > Exact= ly the same.<br> > ><br> > > I hav= e the impression the finished-hook is not called...<br> > ><br> > > In th= e buffer URl-Debug I get the following (token removed<br> > obviously),<br> > > but o= nly after starting the track.<br> > ><br> > > <a href=3D"https://paste.rs/8= Vl5n.txt">https://paste.rs/8Vl5n.txt</a> <<a href=3D"https://paste.rs/8V= l5n.txt">https://paste.rs/8Vl5n.txt</a>> <https://<br> > paste.rs/8Vl5n.txt <<a href=3D"https:= //paste.rs/8Vl5n.txt">https://paste.rs/8Vl5n.txt</a>>><br> > ><br> > > After= finishing there are no new messages logged.<br> > ><br> > > But w= hy should a hook not be triggered?<br> > ><br> > > Thank= s again.<br> > ><br> > > --- I= gor<br> > ><br> ><br> <br> <br> On 11/23/25 23:36, Fran Burstall (Gmail) wrote:<br> > (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. 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> > <[email protected] <<a href=3D"mailto:joseleopoldo1792@= gmail.com">mailto:[email protected]</a>>> wrote:<br> > <br> > 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> > "Submit the track to l= istenbrainz if we have listened long enough.<br> > <br> > That is, if it has been played for 240 seconds= or half the length of<br> > the<br> > track."<br> > (let ((current-track (emms-= playlist-current-selected-track)))<br> > (emms-listenbrainz-s= crobbler-make-async-submission-call<br> >  = ;current-track)))<br> > <br> > Removing the code about the length (why is thi= s necessary?) and now it<br> > is working. But still I do not understand why = this is happening. Maybe<br> > because of this?<br> > <br> > (when (and tr= ack-length<br> >  = ; ;; only submit files<br> >  = ; (eq (emms-track-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<br> > > ahead the call to the scrobbler?&nb= sp; What is the value of emms-player-<br> > > finished-hook?<br> > ><br> > > However, that would not explain the= empty failed process buffers:<br> > does<br> > > one of these appear after every scr= obble attempt?<br> > ><br> > > To see if it is the hook that fails= , execute<br> > ><br> > > (emms-listenbrainz-scrobbler-make-a= sync-submission-call (emms-<br> > playlist-<br> > > current-selected-track))<br> > ><br> > > and see if that records a scrobble.= For me, it does most of the<br> > time<br> > > but, during testing today, it has f= ailed 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> > > <[email protected] <= <a href=3D"mailto:[email protected]">mailto:joseleopoldo1792@gmail= .com</a>><br> > <<a href=3D""></a>mailto:joseleopoldo1792@g= mail.com<br> > <<a href=3D"mailto:[email protected]= om">mailto:[email protected]</a>>>> wrote:<br> > ><br> > ><br> > > > and let me= know what appears in the message buffer when<br> > you try<br> > > to scrobble.<br> > ><br> > > Exactly the same= .<br> > ><br> > > I have the impre= ssion the finished-hook is not called...<br> > ><br> > > In the buffer UR= l-Debug I get the following (token removed<br> > obviously),<br> > > but only after s= tarting the track.<br> > ><br> > > <a href=3D"https://paste.rs/8Vl5n.t= xt">https://paste.rs/8Vl5n.txt</a> <<a href=3D"https://paste.rs/8Vl5n.tx= t">https://paste.rs/8Vl5n.txt</a>> <https://<br> > paste.rs/8Vl5n.txt <<a href=3D"https://past= e.rs/8Vl5n.txt">https://paste.rs/8Vl5n.txt</a>>><br> > ><br> > > After finishing = there are no new messages logged.<br> > ><br> > > But why should a= hook not be triggered?<br> > ><br> > > Thanks again.<br= > > ><br> > > --- Igor<br> > ><br> > <br> <br> </div> </span></font></div> </body> </html> --_000_MI0P293MB00433154D7B0739DEAADE279FFD0AMI0P293MB0043ITAP_--