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.&nbsp;</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.&nbsp;</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 &lt;j=
[email protected]&gt;<br>
<b>Sent:</b> Monday, November 24, 2025 8:11:51 AM<br>
<b>To:</b> [email protected] &lt;[email protected]&gt;<br>
<b>Cc:</b> emms-help mailing list &lt;[email protected]&gt;<br>
<b>Subject:</b> Re: Listenbrainz: no permanent storage of items</font>
<div>&nbsp;</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>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (why is this necessary?)<br>
&nbsp;&gt;<br>
&nbsp;&gt;<br>
&nbsp;&gt; The api places these restrictions on the submission (at least, I=
 think<br>
&nbsp;&gt; it does---cannot find a reference right now).<br>
&nbsp;&gt;<br>
&nbsp;&gt; Now we know how things are failing, let us try to understand why=
.<br>
&nbsp;&gt;<br>
&nbsp;&gt; 1.&nbsp; While a track is playing, what is the value of emms-pla=
ying-time?<br>
&nbsp;&gt; 2. What does (emms-track-get (emms-playlist-current-selected-tra=
ck)<br>
&nbsp;&gt; 'info-playing-time) return?<br>
&nbsp;&gt;<br>
&nbsp;&gt; I am going off the air now but will get back on this tomorrow in=
 about<br>
&nbsp;&gt; 20 hours.<br>
&nbsp;&gt;<br>
&nbsp;&gt; ---Fran<br>
&nbsp;&gt;<br>
&nbsp;&gt;<br>
&nbsp;&gt;<br>
&nbsp;&gt; On Sun, 23 Nov 2025 at 22:13, Igor Sosa Mayor<br>
&nbsp;&gt; &lt;[email protected] &lt;<a href=3D"mailto:joseleopold=
[email protected]">mailto:[email protected]</a>&gt;&gt; wrote:<br>
&nbsp;&gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; I think I found the problem (or the sour=
ce of the problem...). I <br>
made a<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; simplified version of your code:<br>
&nbsp;&gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; (defun emms-listenbrainz-scrobbler-stop-=
hook ()<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Submit the=
 track to listenbrainz if we have listened long <br>
enough.<br>
&nbsp;&gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; That is, if it has been played for 240 s=
econds or half the length of<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; the<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; track.&quot;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (let ((current-t=
rack (emms-playlist-current-selected-track)))<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (emm=
s-listenbrainz-scrobbler-make-async-submission-call<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; current-track)))<br>
&nbsp;&gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; Removing the code about the length (why =
is this necessary?) and <br>
now it<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; is working. But still I do not understan=
d why this is happening. <br>
Maybe<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; because of this?<br>
&nbsp;&gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; (when (and track-length<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;; only=
 submit files<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (eq (em=
ms-track-type current-track) 'file))<br>
&nbsp;&gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; --- Igor<br>
&nbsp;&gt;<br>
&nbsp;&gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; On 11/23/25 23:04, Fran Burstall (Gmail)=
 wrote:<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; I wonder if there is somethin=
g else in the finished hook that <br>
fails<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; ahead the call to the scrobbl=
er?&nbsp; What is the value of <br>
emms-player-<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; finished-hook?<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; However, that would not expla=
in the empty failed process buffers:<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; does<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; one of these appear after eve=
ry scrobble attempt?<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; To see if it is the hook that=
 fails, execute<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; (emms-listenbrainz-scrobbler-=
make-async-submission-call (emms-<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; playlist-<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; current-selected-track))<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; and see if that records a scr=
obble.&nbsp; For me, it does most of the<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; time<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; but, during testing today, it=
 has failed 4 times leaving a failed<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; process buffer.<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; ---Fran<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; On Sun, 23 Nov 2025 at 21:37,=
 Igor Sosa Mayor<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; &lt;[email protected]=
m &lt;<a href=3D"mailto:[email protected]">mailto:joseleopoldo1792=
@gmail.com</a>&gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a href=3D""></a>mailto:joseleopoldo=
[email protected]<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a href=3D"mailto:joseleopoldo1792@g=
mail.com">mailto:[email protected]</a>&gt;&gt;&gt; wrote:<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 &gt; and let me know what appears in the message buffer when<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; you try<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; to sc=
robble.<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Exact=
ly the same.<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; I hav=
e the impression the finished-hook is not called...<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; In th=
e buffer URl-Debug I get the following (token removed<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; obviously),<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; but o=
nly after starting the track.<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; <a href=3D"https://paste.rs/8=
Vl5n.txt">https://paste.rs/8Vl5n.txt</a> &lt;<a href=3D"https://paste.rs/8V=
l5n.txt">https://paste.rs/8Vl5n.txt</a>&gt; &lt;https://<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; paste.rs/8Vl5n.txt &lt;<a href=3D"https:=
//paste.rs/8Vl5n.txt">https://paste.rs/8Vl5n.txt</a>&gt;&gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; After=
 finishing there are no new messages logged.<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; But w=
hy should a hook not be triggered?<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Thank=
s again.<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; --- I=
gor<br>
&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&nbsp;&gt;<br>
<br>
<br>
On 11/23/25 23:36, Fran Burstall (Gmail) wrote:<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;(why is this necessary?) <br>
&gt; <br>
&gt; <br>
&gt; The api places these restrictions on the submission (at least, I think=
 <br>
&gt; it does---cannot find a reference right now).<br>
&gt; <br>
&gt; Now we know how things are failing, let us try to understand why.<br>
&gt; <br>
&gt; 1.&nbsp; While a track is playing, what is the value of emms-playing-t=
ime?<br>
&gt; 2. What does (emms-track-get (emms-playlist-current-selected-track) <b=
r>
&gt; 'info-playing-time) return?<br>
&gt; <br>
&gt; I am going off the air now but will get back on this tomorrow in about=
 <br>
&gt; 20 hours.<br>
&gt; <br>
&gt; ---Fran<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; On Sun, 23 Nov 2025 at 22:13, Igor Sosa Mayor <br>
&gt; &lt;[email protected] &lt;<a href=3D"mailto:joseleopoldo1792@=
gmail.com">mailto:[email protected]</a>&gt;&gt; wrote:<br>
&gt; <br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; I think I found the problem (or the source of =
the problem...). I made a<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; simplified version of your code:<br>
&gt; <br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; (defun emms-listenbrainz-scrobbler-stop-hook (=
)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&quot;Submit the track to l=
istenbrainz if we have listened long enough.<br>
&gt; <br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; That is, if it has been played for 240 seconds=
 or half the length of<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; the<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; track.&quot;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;(let ((current-track (emms-=
playlist-current-selected-track)))<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;(emms-listenbrainz-s=
crobbler-make-async-submission-call<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp=
;current-track)))<br>
&gt; <br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; Removing the code about the length (why is thi=
s necessary?) and now it<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; is working. But still I do not understand why =
this is happening. Maybe<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; because of this?<br>
&gt; <br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(when (and tr=
ack-length<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp=
; &nbsp; &nbsp; &nbsp;;; only submit files<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp=
; &nbsp; &nbsp; &nbsp;(eq (emms-track-type current-track) 'file))<br>
&gt; <br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; --- Igor<br>
&gt; <br>
&gt; <br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; On 11/23/25 23:04, Fran Burstall (Gmail) wrote=
:<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; I wonder if there is something else=
 in the finished hook that fails<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; ahead the call to the scrobbler?&nb=
sp; What is the value of&nbsp;emms-player-<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; finished-hook?<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; However, that would not explain the=
 empty failed process buffers:<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; does<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; one of these appear after every scr=
obble attempt?<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; To see if it is the hook that fails=
, execute<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; (emms-listenbrainz-scrobbler-make-a=
sync-submission-call&nbsp;(emms-<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; playlist-<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; current-selected-track))<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; and see if that records a scrobble.=
&nbsp; For me, it does most of the<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; time<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; but, during testing today, it has f=
ailed 4 times leaving a failed<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; process buffer.<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; ---Fran<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; On Sun, 23 Nov 2025 at 21:37, Igor =
Sosa Mayor<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; &lt;[email protected] &lt;=
<a href=3D"mailto:[email protected]">mailto:joseleopoldo1792@gmail=
.com</a>&gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a href=3D""></a>mailto:joseleopoldo1792@g=
mail.com<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a href=3D"mailto:[email protected]=
om">mailto:[email protected]</a>&gt;&gt;&gt; wrote:<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp; &nbsp; &nbsp; &gt; and let me=
 know what appears in the message buffer when<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; you try<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp; &nbsp; &nbsp;to scrobble.<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp; &nbsp; &nbsp;Exactly the same=
.<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp; &nbsp; &nbsp;I have the impre=
ssion the finished-hook is not called...<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp; &nbsp; &nbsp;In the buffer UR=
l-Debug I get the following (token removed<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; obviously),<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp; &nbsp; &nbsp;but only after s=
tarting the track.<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; <a href=3D"https://paste.rs/8Vl5n.t=
xt">https://paste.rs/8Vl5n.txt</a> &lt;<a href=3D"https://paste.rs/8Vl5n.tx=
t">https://paste.rs/8Vl5n.txt</a>&gt; &lt;https://<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; paste.rs/8Vl5n.txt &lt;<a href=3D"https://past=
e.rs/8Vl5n.txt">https://paste.rs/8Vl5n.txt</a>&gt;&gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp; &nbsp; &nbsp;After finishing =
there are no new messages logged.<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp; &nbsp; &nbsp;But why should a=
 hook not be triggered?<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp; &nbsp; &nbsp;Thanks again.<br=
>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp; &nbsp; &nbsp;--- Igor<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>
&gt; <br>
<br>
</div>
</span></font></div>
</body>
</html>

--_000_MI0P293MB00433154D7B0739DEAADE279FFD0AMI0P293MB0043ITAP_--