"Fran Burstall (Gmail)" <[email protected]> writes:

> 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.

got it

> ---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
>> >      >
>> >
>>
>>

-- 
   "Cut your own wood and it will warm you twice"

Reply via email to