[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emms-help] [bug?] libre.fm scrobbing when offline
From: |
Rasmus |
Subject: |
Re: [emms-help] [bug?] libre.fm scrobbing when offline |
Date: |
Sun, 15 Mar 2015 12:36:52 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Yoni Rabkin <address@hidden> writes:
>> I was working at a cafe today. EMMS doesn't behave nicely when there's no
>> internet. In particular I got the message
>>
>> open-network-stream: turtle.libre.fm/80 Name or service not known
>>
>> and I had to call emms-smart-browse twice to open the browser.
>
> To be fair, the issue is emms-librefm and not Emms in general. I use
> Emms with the playlist mode and don't scrob (is that a word), so I
> haven't seen this issue come up.
The error is conditional on using the libre.fm part, I guess.
>> At the very least EMMS should catch the error and write out a message or
>> something, but otherwise ignore the error.
>
> That's a good starting point.
>
>> Even better would be start the EMMS scrobber in offline-mode, where
>> played songs and times are stored and uploaded on next connection.
>
> That would entail figuring out if there is a connection or not.
I don't know much about networking. You could catch the error, or if you
want it more explicitly do something like.
(condition-case nil
(url-retrieve-synchronously "http://www.gnu.org")
(error nil))
(condition-case nil
(url-retrieve-synchronously
"www.nonexisting.domain.somewhere.out.there123")
(error nil))
You'd probably need to clean up the buffer as well.
http://www.gnu.org/software/emacs/manual/html_node/elisp/Handling-Errors.html
Cheers,
Rasmus
--
Sådan en god dansk lagereddike kan man slet ikke bruge mere