1
0
Commit Graph

82 Commits

Author SHA1 Message Date
b8f6163cb8
Need to use RUnlock for RLock. 2024-06-18 19:50:56 +04:00
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
8d3ec1a327
Since ListenersUpdate works with Icecast specifically, let's point it out in its name. 2024-05-16 01:59:26 +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
454df3bb74
Write listeners statistics for a current song in case of an interrupting signal. 2024-05-11 04:22:06 +04:00
665a8e8c75
Current state of main.go. 2024-05-10 00:11:51 +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
c795c2b87b
Updated a year in a Copyright. 2024-03-06 04:48:32 +04:00
dbba53c0fa
Fixed a typo on a description for -fallback-song arg. 2024-03-06 04:44:55 +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
f0aa00b932
Added a fallback song option. Altered a PlaylistNext() header to use it. 2023-10-08 02:52:37 +04:00
1599d502c1
Decided to keep handlers for /api/{song,songs,mostlistenedsong} but disable them. Everything can be fetched at an /api/status endpoint. 2023-10-08 02:03:06 +04:00
0d8032da46
MostListenedSong was rewritten. 2023-10-08 00:52:40 +04:00
62f6e3b976
Updated SIG* handling code in main(). 2023-10-06 04:58:58 +04:00
8079058b5c
Added a handler for SIGHUP signal that is used for playlist reloading. 2023-10-05 17:37:13 +04:00
8587225dfc
Added SIGABRT to doneSignal. 2023-10-05 17:26:48 +04:00
d0722131df
Added handlers and flags and instantiated all need stuff. Removed flags for icecast. 2023-10-02 03:16:17 +04:00
698d7787e6
A separate executable dwelling-radiodj was removed. 2023-10-02 03:13:39 +04:00
1b38c5d86c
Added a /mostlistenedsong endpoint. 2023-10-02 02:08:38 +04:00
7e4ca6990b
Removed Sub for a /playlist endpoint. 2023-10-02 02:08:16 +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
9f361be6c4
On SIGHUP reload a playlist file. 2023-10-01 06:38:21 +04:00
ae4b2c9dee
In radiodj main fixed loading of an MLS file. 2023-10-01 06:10:27 +04:00
59d2c1dbf9
Just found a typo in a directory name. 2023-10-01 05:55:01 +04:00
5a058aa706
Added most listened song and song list length. Also removed a year 2022 from a version string. 2023-10-01 04:17:49 +04:00
07d11ce3ff
A dummy Song handler was added. 2023-10-01 03:35:33 +04:00
ca33de09cc
Added a playlist instance and pass a PlaylistNext handler. 2023-10-01 01:33:55 +04:00
8677af243c
Added main for a radiodj service. 2023-10-01 00:00:39 +04:00
fea96118bc
Set a new path to radio files (where playlists, filelist, and music are stored). 2023-09-17 19:15:56 +04:00
c020031127
Do not overwrite mostlistenedsong file if a song wasn't changed. 2023-09-10 18:23:06 +04:00
76b3e2e8ad
For some log messages changed capital letter to lowercase. 2023-08-21 05:45:12 +04:00
007691c534
Defer server Stop and writing of MLS instead of call after doneSignal fired. 2023-08-21 04:39:38 +04:00
6c46d2cf5f
Changed path to a mostlistenedsong file. 2023-08-19 19:48:28 +04:00
5bf80666d6
Removed explicit type for showVersion var. 2023-08-06 03:44:06 +04:00
a1bf9cf30a
Use flags instead of config file. Also replaced HttpServer with a new code. 2023-08-06 03:17:18 +04:00
832387f663
A little refactoring in main.go. 2023-07-22 23:17:45 +04:00
38f04aa9f8
Removed code for liquidsoap. 2023-07-22 22:15:24 +04:00
3ef213ab0d
Changed main a little. 2023-05-27 00:36:23 +04:00
17b5ab48ca
Use httpr instead of httprouter. 2023-05-26 23:56:00 +04:00
47bc1a8e02
Added sitemap.xml. 2023-05-21 22:44:09 +04:00
2987cf4a2a
Moved RobotsTxt handler out of Handlers struct. 2023-05-21 22:42:17 +04:00
ca4391784a
Added /favicon.svg endpoint. 2023-05-21 22:35:37 +04:00
aac6d8e43a
Logically separate handlers with new lines in main.go. 2023-03-13 03:28:01 +04:00
acd0087ddf
Oh, if http server stop fail, then most listened song will not be saved. Fix that. 2023-03-13 02:20:57 +04:00
3207395b67
Load and store most listened song. 2023-03-13 01:41:13 +04:00
1ab82003e6
Catch SIGSEGV as well. 2023-03-13 01:40:56 +04:00