1
0
Commit Graph

116 Commits

Author SHA1 Message Date
16e849eb65
Rewritten lastPlayedSong() in a sane way. Hope it will work. 2022-08-29 12:47:06 +04:00
d43b2fe897
Removed handling of imposible cases. 2022-08-29 09:19:35 +04:00
1996743470
Cache vars moved to the top of the file. 2022-08-29 09:08:08 +04:00
c935db8ce7
Implemented lastPlayedSong() function that retrieves one song from a playlist.log file that doesn't run external commands for it.
And now we start with an empty list.
2022-08-29 08:58:35 +04:00
0da8077ab7
Implemented a liquidsoap process launcher. 2022-08-29 07:20:36 +04:00
e94973920e
Added configuration fields for a liquidsoap. 2022-08-29 07:17:40 +04:00
b5d8b58b81
Template was replaced with a pre-compiled to a Go source file. 2022-06-13 18:35:36 +04:00
60dcf2c11c
ModMask replaced wuth ModIgnMask. Now IN_IGNORED being watched, it makes watcher to reinstantiate. 2022-05-24 23:20:19 +04:00
f2fcadd0c5
Removed not used NotFoundData structure. 2022-05-24 19:46:33 +04:00
74ae6f4213
Now index template is a variable. 2022-05-24 19:41:04 +04:00
6155b593b2
Robots handler removed. 2022-05-24 18:41:50 +04:00
4d5fb47a15
Template and assets moved off to web directory in root. 2022-05-24 18:30:45 +04:00
a335ae4803
Web dir with a template and assets was moved off to web directory in root. 2022-05-24 18:29:15 +04:00
3ec15fbd2a
Now Index page will be shown even if Icecast status cannot be retrieved. 2022-05-24 18:26:59 +04:00
6f607c830e
Use time format specified in radio package. 2022-04-02 04:29:58 +04:00
88e047d210
Moved time formats to constanst. 2022-04-02 04:29:23 +04:00
1b5dea899e
I found why time was being further altered. The reason is that slices are pointing to original array. Okay. The problem fixed. 2022-04-02 02:00:28 +04:00
db8e8c3ebf
Forgot to change time format in Index handler as well. 2022-04-01 23:35:14 +04:00
c4532fea24
According to tests it is equal performance wise, so why not make a code shorter. 2022-04-01 23:20:04 +04:00
7d447be786
Initialise playlistFired at definition. 2022-04-01 22:35:30 +04:00
1ed81fdd36
Fixed deadlock caused by misunderstanding of how defer works. 2022-04-01 21:12:54 +04:00
21995ea4cd
Added mutex for lastPlayedCache. 2022-04-01 20:44:32 +04:00
4f3993515a
Changed displayed on-air since date to RFC1123. 2022-04-01 20:43:10 +04:00
066208def4
Reduced main.js a little. 2022-04-01 18:42:13 +04:00
b035476fb7
Oh, here must be used html/template functions! Gotcha! Nice. 2022-03-31 23:04:58 +04:00
0360efc147
If there was no listeners on a track, then print nothing. 2022-03-31 22:46:47 +04:00
ee10fc1c9e
Okay, didn't work. Let it be like that for now. 2022-03-31 22:43:39 +04:00
7c67151ee8
Let's try negate it. 2022-03-31 22:42:01 +04:00
75473aff1f
Let's try unless. 2022-03-31 20:12:18 +04:00
8c1fdb0e44
Ah, yes... It doesn't work like that. 2022-03-31 20:09:56 +04:00
88163a6bea
Actually, 2rem would be enough for listeners column. 2022-03-31 20:06:26 +04:00
d243f82c7e
CSS updated for a new last played table. 2022-03-31 20:05:46 +04:00
f51b623b08
Updated main.js for a new last played layout. 2022-03-31 20:03:45 +04:00
52696c026e
New last played table rows: time, listeners and song. If there was no listeners then this col is empty. 2022-03-31 20:02:17 +04:00
0844b917dc
Now last played songs are consist of time, listeners and song name combined with artist. 2022-03-31 20:01:13 +04:00
93f50458ec
Forgot about ReadFile() method of embed.FS. 2022-03-31 18:34:33 +04:00
981bbd8968
In this case it is safer to compare with Time field. What if it is a problem with just this song? 2022-03-31 18:24:41 +04:00
4b5289223d
Remove whitespace in IcecastLastPlayedSongs. 2022-03-31 18:14:20 +04:00
a9b6e5a056
Compute lastPlayedCache length once a call. 2022-03-31 18:13:49 +04:00
d3563abba1
Remove inteermidiate variable and instantiate struct in return statement. 2022-03-31 18:11:04 +04:00
0d113d30a1
Replace Sprintf with way more performant simple concatenation. 2022-03-31 18:05:47 +04:00
b077fa053c
It is better to call here lastPlayedSongs directly. 2022-03-31 18:02:04 +04:00
0983a0f0c5
This conversion to UTC is excessive. 2022-03-31 17:58:42 +04:00
790a507f0d
Comparison by time is enough. 2022-03-31 17:55:36 +04:00
ee96af31ad
Added a robots.txt file and a handler for it. 2022-03-31 17:01:51 +04:00
2b18204a6c
Changed start_time_local field to time in main.js. 2022-03-31 16:27:17 +04:00
1dad2ffa5f
Removed another forgotten debug println. 2022-03-31 15:45:49 +04:00
b591346177
Removed forgotten debug println. 2022-03-31 15:44:17 +04:00
70580298d2
Rewrote LastSong handler using caching IcecastLastSong function. And IcecastLastPlayedSongs is using cache as well. Now it takes between 300 nanoseconds to 2 microseconds to get a list of last songs. 2022-03-31 15:39:51 +04:00
3b51fffa60
Added last played list cache with updating using Inotify watcher. 2022-03-31 15:35:04 +04:00