1
0
Commit Graph

649 Commits

Author SHA1 Message Date
141e0f3717
In radio-listener-* vars was removed. 2023-10-07 06:04:49 +04:00
0590eaa1c5
Fixed and simplified radio-fetch. 2023-10-07 06:03:16 +04:00
65ec8c1db2
In index.pug avoid nil pointer dereferencing. 2023-10-07 05:35:16 +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
f0420e9bcd
main.js was rewritten and now it displays estimate and total duration of a current song. 2023-10-07 05:33:57 +04:00
238705b00f
In an index.pug file make a copy of a current song for thread safety. 2023-10-07 05:25:13 +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
f53f30963d
sync.Mutex was replaced by sync.RWMutex for SongList. 2023-10-07 05:16:16 +04:00
1d50bbe790
In MarshalJSON() for Song a string field Duration was removed, just msec left. 2023-10-07 05:11:58 +04:00
62f6e3b976
Updated SIG* handling code in main(). 2023-10-06 04:58:58 +04:00
3251d9e983
In .gitignore added a file mls-test. 2023-10-06 03:17:59 +04:00
2f96976f19
In DJHandlers.Status in an anonymous struct removed a pointer to Song. 2023-10-05 18:54:44 +04:00
c33ff03bd8
Updated using of SongList.Current() in an index.pug file. 2023-10-05 18:53:57 +04:00
9beb179cc0
SongList.Current() now returns a copy of Song instead of a pointer. 2023-10-05 18:52:18 +04:00
9b14d7846b
In CheckAndUpdateMostListenedSong() accept Song by value instead of a pointer. 2023-10-05 18:19:41 +04:00
c7f6b3072d
Embedded a sync.Mutex to a ListenerCounter. 2023-10-05 18:18:48 +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
eeadbc4f96
To a SongList a method UpdateCurrentMaxListeners() was added, it checks and updates max listeners for a current song in a thread safe manner. 2023-10-05 18:04:15 +04:00
b659464118
For Song.ArtistTitle() a comment was updated. 2023-10-05 18:02:33 +04:00
8079058b5c
Added a handler for SIGHUP signal that is used for playlist reloading. 2023-10-05 17:37:13 +04:00
f8fd13f8ed
In playlist load() add an error message. 2023-10-05 17:36:02 +04:00
e0fa65fbd7
Decided to remove inotify watcher from playlist. 2023-10-05 17:31:12 +04:00
8587225dfc
Added SIGABRT to doneSignal. 2023-10-05 17:26:48 +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
10bc3a3785
In Playlist embed a sync.Mutex instead. 2023-10-04 18:37:13 +04:00
6ce4700420
In index.pug: songList.Len() was replaced with songList.MaxLen(). 2023-10-04 18:15:09 +04:00
1c6d288cd7
In song.go: added comments; embed sync.Mutex in SongList instead of having it as a field; changed a json field name duration_milliseconds to duration_msec; listMaxLen field was renamed to maxLen; Len() was renamed to MaxLen(). 2023-10-04 18:10:17 +04:00
20b8b62b73
In an index.pug file added a tbody tag to a table. 2023-10-02 18:20:07 +04:00
98ed4035a7
In ListenersDec() handler added a missing return. 2023-10-02 18:09:25 +04:00
0bf81f93c8
In Song.DurationString() updated format. 2023-10-02 18:08:57 +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
29714b30ca
A file listeners.go was renamed to listener_counter.go. 2023-10-02 04:33:11 +04:00
8c510e6958
Fixed a dwelling-radio intake. Replaced a default playlist with this one. 2023-10-02 04:10:15 +04:00
44d0f6fc3b
Updated args in radio.service. 2023-10-02 04:03:39 +04:00
fe61d71149
Removed an unneeded radiodj.service file. 2023-10-02 04:03:23 +04:00
976ad683ca
Updated tools/radio-*. 2023-10-02 04:00:59 +04:00
c2c8c82212
Updated main.js. Added a new update() function that does everything. Not completed yet. 2023-10-02 03:56:57 +04:00
35429e57d2
In an index.pug added span#radio-duration. 2023-10-02 03:55:51 +04:00
9757f5f748
Oh, time.Duration works a little differently... 2023-10-02 03:55:17 +04:00
f1e2eca876
Added a DurationString() method for a Song that returns time in format 04:05 or 15:04:05 if a song is one hour or more long. 2023-10-02 03:52:26 +04:00
010774d775
Return a formatted string alongside with duration in milliseconds. 2023-10-02 03:48:31 +04:00
437403aa9e
From Makefile dwelling-radiodj was purged completely. 2023-10-02 03:22:06 +04:00
0519bc979c
Status() and LastSong() handlers was removed from main handlers. 2023-10-02 03:20:48 +04:00
3e0a1fe181
Updated index.pug. 2023-10-02 03:19:48 +04:00
bd9b80076a
Updated CheckAndUpdateMostListenedSong() to work with a new Song struct. 2023-10-02 03:19:23 +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
d0722131df
Added handlers and flags and instantiated all need stuff. Removed flags for icecast. 2023-10-02 03:16:17 +04:00