|
88ecf675b6
|
And same for a Playlist.
|
2024-05-22 04:07:33 +04:00 |
|
|
baad7da10d
|
After a research on how mutexes work, a mutex bcame embedded. And locks should be invoke from outside.
|
2024-05-22 04:05:15 +04:00 |
|
|
f265494ea8
|
Send only a response code without any text to Icecast and Ezstream.
|
2024-05-22 03:40:33 +04:00 |
|
|
8d3ec1a327
|
Since ListenersUpdate works with Icecast specifically, let's point it out in its name.
|
2024-05-16 01:59:26 +04:00 |
|
|
a728ea2164
|
Let's try to not add 5 seconds to Song.StartAt.
|
2024-05-16 01:44:45 +04:00 |
|
|
51a0ef167c
|
Do not log songs whose artist and title tags are empty.
|
2024-05-13 01:14:05 +04:00 |
|
|
40d2993b03
|
Remove commented out go func() {}.
|
2024-05-13 01:13:05 +04:00 |
|
|
d2db23be5d
|
Now that only current number of listeners is being shown, send just it instead of a whole ListenerCounter.
|
2024-05-12 03:57:54 +04:00 |
|
|
872e8f4978
|
A MaxListeners field of a Song struct was renamed to a more logically appropriate PeakListeners.
|
2024-05-11 04:52:40 +04:00 |
|
|
cf90bba297
|
Updated logic in DJ handlers. Also let's give a try to not run this updating code in a PlaylistNext() handler in a separate thread. Also funnier handling of audio tag missing.
|
2024-05-11 04:36:23 +04:00 |
|
|
84e23b5b85
|
Remove an http.Error() func call from an anonym func that is spawned in a separate thread because that w (http.ResponseWriter) could be not available.
|
2024-05-10 04:39:56 +04:00 |
|
|
71844a106d
|
Updated internal/http.
|
2024-05-10 00:07:07 +04:00 |
|
|
0244f6afd5
|
A unified ServeAsset() func was introduced. AssetsGetFile() now will panic if a file doesn't exists, because it must not be the case.
|
2024-04-20 18:54:05 +04:00 |
|
|
7d4de3f6a6
|
Add 5 seconds to time.Now() to more accurately represent the time when a song actually starts to play.
|
2023-10-09 01:15:05 +04:00 |
|
|
f960d8516a
|
Since SongList.Current() now return a copy then this code is no longer needed.
|
2023-10-08 23:55:55 +04:00 |
|
|
04e09dd800
|
Removed debug fmt.Println from ListenersUpdate.
|
2023-10-08 23:07:04 +04:00 |
|
|
27affc5e73
|
Let's actually remove unused handlers.
|
2023-10-08 22:50:36 +04:00 |
|
|
dbf71f3f64
|
Fixed listeners number update, well, on-dis/connect in mount is for a SOURCE. To get listeners you need to use <authentication type="url">.
Also, disabled all listener handler, added POST /api/listener/icecast handler.
|
2023-10-08 22:17:56 +04:00 |
|
|
83955866c9
|
Alter an artist tag to tell that there is nothing left to play, so a fallback song is used to fill a silence.
|
2023-10-08 02:56:19 +04:00 |
|
|
f0aa00b932
|
Added a fallback song option. Altered a PlaylistNext() header to use it.
|
2023-10-08 02:52:37 +04:00 |
|
|
0d8032da46
|
MostListenedSong was rewritten.
|
2023-10-08 00:52:40 +04:00 |
|
|
b8afed6e1b
|
In PlaylistNext() CheckAndUpdateMostListenedSong() call was moved after songList.Add to avoid nil pointer dereferencing.
|
2023-10-07 05:34:50 +04:00 |
|
|
020676f113
|
While I want thread safety I also want a not set current song to not appear in a status JSON object.
|
2023-10-07 05:23:45 +04:00 |
|
|
07b0199193
|
In a PlaylistNext() handler pass a current song as a copy.
|
2023-10-07 05:20:27 +04:00 |
|
|
2f96976f19
|
In DJHandlers.Status in an anonymous struct removed a pointer to Song.
|
2023-10-05 18:54:44 +04:00 |
|
|
f1eaba016f
|
In DJHandlers.ListenersInc() a code for updating max listeners was replaced by a function call to UpdateCurrentMaxListeners().
|
2023-10-05 18:05:27 +04:00 |
|
|
6ae8a40493
|
In oggtag.go a struct named OggFIle was created, ReadFile turned into a constructor NewOggFile. And GetTag and GetDuration turned into methods.
|
2023-10-05 17:26:13 +04:00 |
|
|
98ed4035a7
|
In ListenersDec() handler added a missing return.
|
2023-10-02 18:09:25 +04:00 |
|
|
64c2868fcf
|
Updated CheckAndUpdateMostListenedSong() func.
|
2023-10-02 15:04:51 +04:00 |
|
|
1990f1c7f0
|
In a PlaylistNext handler return a \n character as well.
|
2023-10-02 15:03:47 +04:00 |
|
|
0519bc979c
|
Status() and LastSong() handlers was removed from main handlers.
|
2023-10-02 03:20:48 +04:00 |
|
|
58b3d18288
|
Pass a SongList instead of instantiating.
|
2023-10-02 03:18:54 +04:00 |
|
|
f9d85d45f5
|
Song_ was renamed to Song. Also added Len() method to a SongList.
|
2023-10-02 03:18:30 +04:00 |
|
|
f0438ff822
|
In ListenersGet() text/plain was replaced by application/json.
|
2023-10-02 02:35:01 +04:00 |
|
|
d2851c6fb8
|
Added http.Error() to a PlaylistNext() handler.
|
2023-10-02 02:29:18 +04:00 |
|
|
f709ac4b02
|
Added a MostListenedSong() handler.
|
2023-10-02 02:28:46 +04:00 |
|
|
8322d2a7a8
|
In Status handler: added missing Content-Type; Added most listened song; Removed with-list query, just return everything; Added http.Error().
|
2023-10-02 02:22:14 +04:00 |
|
|
7cc228968d
|
In handlers made use of oggtag.ReadFile() func. Also updated func names.
|
2023-10-02 01:27:14 +04:00 |
|
|
aaf14e0c83
|
A /status endpoint was added that returns all data available. At this time cur song, listeners cur and peak, and a list of prev songs.
|
2023-10-01 22:07:04 +04:00 |
|
|
96baa42fe0
|
/song endpoint was broken into two, the second one is /songs that returns a list of prev played songs, and /song just a current one.
|
2023-10-01 22:05:39 +04:00 |
|
|
dea283df27
|
Listeners struct was renamed to ListenerCounter.
|
2023-10-01 20:32:07 +04:00 |
|
|
a4f7366213
|
In handlers made use of a SongList.
|
2023-10-01 05:43:52 +04:00 |
|
|
07d11ce3ff
|
A dummy Song handler was added.
|
2023-10-01 03:35:33 +04:00 |
|
|
88b5f21343
|
Added playlist handler.
|
2023-10-01 01:32:57 +04:00 |
|
|
3d2b172deb
|
Replaced unused r arg with _ in handlers.
|
2023-10-01 01:32:17 +04:00 |
|
|
978a2602d8
|
Added handlers used in a radiodj service. Currently just for listeners.
|
2023-09-30 23:59:48 +04:00 |
|
|
978b4c6454
|
Removed unused error returning (error is always nil).
|
2023-09-14 17:59:14 +04:00 |
|
|
a6f92b56da
|
Reorganised Handlers struct fields.
|
2023-09-14 17:58:35 +04:00 |
|
|
eccf0ff4e9
|
Removed unused const FormatISO8601.
|
2023-09-14 17:51:15 +04:00 |
|
|
9ac60e9f28
|
Don't show server start date and time on a page.
|
2023-08-21 18:30:21 +04:00 |
|