Version 6.0.6

This commit is contained in:
Chrystian Huot 2021-12-13 13:35:44 -05:00
parent 07ca33f2a4
commit 6fa2b484ad
12 changed files with 129 additions and 114 deletions

View file

@ -50,6 +50,12 @@ _v6.0.5_
- New `-base_dir` option to specify the directory where all data will be written.
- New Docker container with disabled dirwatch.
_v6.0.6_
- Fix an issue with not closing the database when restarting the host platform (issue #71).
- Fixed SDRTunk parser when artist tag contains CTCSS tones.
- Platforms linux/amd64, linux/arm and linux/arm64 are now available for the Docker container.
## Version 5.2
- Change to how the server reports version.

View file

@ -24,13 +24,13 @@ Clone the official repository on your computer and start the build process.
When finished, you will find the precompiled versions for various platforms in the `dist` folder.
rdio-scanner-darwin-amd64-v6.0.5.zip
rdio-scanner-darwin-arm64-v6.0.5.zip
rdio-scanner-freebsd-amd64-v6.0.5.zip
rdio-scanner-linux-386-v6.0.5.zip
rdio-scanner-linux-amd64-v6.0.5.zip
rdio-scanner-linux-arm64-v6.0.5.zip
rdio-scanner-linux-arm-v6.0.5.zip
rdio-scanner-windows-amd64-v6.0.5.zip
rdio-scanner-darwin-amd64-v6.0.6.zip
rdio-scanner-darwin-arm64-v6.0.6.zip
rdio-scanner-freebsd-amd64-v6.0.6.zip
rdio-scanner-linux-386-v6.0.6.zip
rdio-scanner-linux-amd64-v6.0.6.zip
rdio-scanner-linux-arm64-v6.0.6.zip
rdio-scanner-linux-arm-v6.0.6.zip
rdio-scanner-windows-amd64-v6.0.6.zip
**Happy Rdio scanning !**

View file

@ -16,8 +16,8 @@
################################################################################
app := rdio-scanner
date := 2021/12/09
ver := 6.0.5
date := 2021/12/13
ver := 6.0.6
client := $(wildcard client/*.json client/*.ts)
server := $(wildcard server/*.go)
@ -38,7 +38,7 @@ clean:
@rm -fr client/node_modules dist server/webapp
container: webapp linux-amd64
@podman build --platform linux/amd64 --tag rdio-scanner:latest-beta .
@podman build --format docker --platform linux/amd64,linux/arm,linux/arm64 --manifest rdio-scanner:latest-beta .
dist: darwin freebsd linux windows

View file

@ -39,5 +39,5 @@
"build": "ng build --base-href ./ --configuration production",
"start": "ng serve"
},
"version": "6.0.5"
"version": "6.0.6"
}

View file

@ -41,8 +41,8 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
rdio@macos ~ % mkdir rdio-scanner
rdio@macos ~ % cd rdio-scanner
rdio@macos rdio-scanner % unzip \
> ~/Downloads/rdio-scanner-darwin-arm64-v6.0.5.zip
Archive: /Users/rdio/Downloads/rdio-scanner-darwin-arm64-v6.0.5.zip
> ~/Downloads/rdio-scanner-darwin-arm64-v6.0.6.zip
Archive: /Users/rdio/Downloads/rdio-scanner-darwin-arm64-v6.0.6.zip
inflating: rdio-scanner
inflating: rdio-scanner.pdf
@ -50,11 +50,11 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
rdio@macos rdio-scanner % ./rdio-scanner
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 08:38:06 server started
2021/12/08 08:38:06 main interface at http://macos.local:3000
2021/12/08 08:38:06 admin interface at http://macos.local:3000/admin
2021/12/13 08:38:06 server started
2021/12/13 08:38:06 main interface at http://macos.local:3000
2021/12/13 08:38:06 admin interface at http://macos.local:3000/admin
4. Access the administrative dashboard to finalize the configuration.
@ -76,11 +76,11 @@ Here we want our [Rdio Scanner](https://guthub.com/chuot/rdio-scanner) instance
rdio@macos rdio-scanner % ./rdio-scanner --listen :80
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 08:48:03 server started
2021/12/08 08:48:03 main interface at http://macos.local
2021/12/08 08:48:03 admin interface at http://macos.local/admin
2021/12/13 08:48:03 server started
2021/12/13 08:48:03 main interface at http://macos.local
2021/12/13 08:48:03 admin interface at http://macos.local/admin
## Listening with SSL with self-signed certificates
@ -89,8 +89,8 @@ It is advised to share your [Rdio Scanner](https://github.com/chuot/rdio-scanner
We can create such self-signed certificates by running [Rdio Scanner](https://github.com/chuot/rdio-scanner) with the **-ssl_create** argument.
rdio@macos rdio-scanner % ./rdio-scanner -ssl_create
2021/12/08 08:49:16 generating ssl certificate files
2021/12/08 08:49:17 ssl files created
2021/12/13 08:49:16 generating ssl certificate files
2021/12/13 08:49:17 ssl files created
This has generated these files in the same folder as your [Rdio Scanner](https://github.com/chuot/rdio-scanner) executable.
@ -107,12 +107,12 @@ Now we use the self-signed server certificate to run our instance.
> -ssl_key_file server.key \
> -ssl_listen :443
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 08:50:58 server started
2021/12/08 08:50:58 main interface at http://macos.local
2021/12/08 08:50:58 main interface at https://macos.local
2021/12/08 08:50:58 admin interface at https://macos.local/admin
2021/12/13 08:50:58 server started
2021/12/13 08:50:58 main interface at http://macos.local
2021/12/13 08:50:58 main interface at https://macos.local
2021/12/13 08:50:58 admin interface at https://macos.local/admin
## Save your advanced configuration to a config file
@ -124,7 +124,7 @@ You don't want to have to type everytime a long list of arguments. No problem, y
> -ssl_key_file server.key \
> -ssl_listen :443 \
> -config_save
2021/12/08 08:52:24 rdio-scanner.ini file created
2021/12/13 08:52:24 rdio-scanner.ini file created
All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list.
@ -139,12 +139,12 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
rdio@macos rdio-scanner % ./rdio-scanner
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 08:54:08 server started
2021/12/08 08:54:08 main interface at http://macos.local
2021/12/08 08:54:08 main interface at https://macos.local
2021/12/08 08:54:08 admin interface at https://macos.local/admin
2021/12/13 08:54:08 server started
2021/12/13 08:54:08 main interface at http://macos.local
2021/12/13 08:54:08 main interface at https://macos.local
2021/12/13 08:54:08 admin interface at https://macos.local/admin
## Install Rdio Scanner as a service

View file

@ -41,8 +41,8 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
rdio@pc-freebsd:~ $ mkdir rdio-scanner
rdio@pc-freebsd:~ $ cd rdio-scanner
rdio@pc-freebsd:~/rdio-scanner $ unzip \
> ~/rdio-scanner-freebsd-amd64-v6.0.5.zip
Archive: ../rdio-scanner-freebsd-amd64-v6.0.5.zip
> ~/rdio-scanner-freebsd-amd64-v6.0.6.zip
Archive: ../rdio-scanner-freebsd-amd64-v6.0.6.zip
extracting: rdio-scanner
extracting: rdio-scanner.pdf
@ -50,11 +50,11 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
rdio@pc-freebsd:~/rdio-scanner $ ./rdio-scanner
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 08:16:36 server started
2021/12/08 08:16:36 main interface at http://pc-freebsd:3000
2021/12/08 08:16:36 admin interface at http://pc-freebsd:3000/admin
2021/12/13 08:16:36 server started
2021/12/13 08:16:36 main interface at http://pc-freebsd:3000
2021/12/13 08:16:36 admin interface at http://pc-freebsd:3000/admin
4. Access the administrative dashboard to finalize the configuration.
@ -80,11 +80,11 @@ Here we want our [Rdio Scanner](https://guthub.com/chuot/rdio-scanner) instance
Password:
root@pc-freebsd:/home/rdio/rdio-scanner # ./rdio-scanner -listen :80
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 08:19:38 server started
2021/12/08 08:19:38 main interface at http://pc-freebsd
2021/12/08 08:19:38 admin interface at http://pc-freebsd/admin
2021/12/13 08:19:38 server started
2021/12/13 08:19:38 main interface at http://pc-freebsd
2021/12/13 08:19:38 admin interface at http://pc-freebsd/admin
## Listening with SSL with self-signed certificates
@ -93,8 +93,8 @@ It is advised to share your [Rdio Scanner](https://github.com/chuot/rdio-scanner
We can create such self-signed certificates by running [Rdio Scanner](https://github.com/chuot/rdio-scanner) with the **-ssl_create** argument.
rdio@pc-freebsd:~/rdio-scanner $ ./rdio-scanner -ssl_create
2021/12/08 10:32:17 generating ssl certificate files
2021/12/08 10:32:19 ssl files created
2021/12/13 10:32:17 generating ssl certificate files
2021/12/13 10:32:19 ssl files created
This has generated these files in the same folder as your [Rdio Scanner](https://github.com/chuot/rdio-scanner) executable.
@ -113,12 +113,12 @@ Now we use the self-signed server certificate to run our instance.
> -ssl_key_file server.key \
> -ssl_listen :443
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 10:34:29 server started
2021/12/08 10:34:29 main interface at http://pc-freebsd
2021/12/08 10:34:29 main interface at https://pc-freebsd
2021/12/08 10:34:29 admin interface at https://pc-freebsd/admin
2021/12/13 10:34:29 server started
2021/12/13 10:34:29 main interface at http://pc-freebsd
2021/12/13 10:34:29 main interface at https://pc-freebsd
2021/12/13 10:34:29 admin interface at https://pc-freebsd/admin
## Save your advanced configuration to a config file
@ -130,7 +130,7 @@ You don't want to have to type everytime a long list of arguments. No problem, y
> -ssl_key_file server.key \
> -ssl_listen :443 \
> -config_save
2021/12/08 10:37:00 rdio-scanner.ini file created
2021/12/13 10:37:00 rdio-scanner.ini file created
All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list.
@ -147,12 +147,12 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
Password:
root@pc-freebsd:/home/rdio/rdio-scanner # ./rdio-scanner
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 10:38:28 server started
2021/12/08 10:38:29 main interface at http://pc-freebsd
2021/12/08 10:38:29 main interface at https://pc-freebsd
2021/12/08 10:38:29 admin interface at https://pc-freebsd/admin
2021/12/13 10:38:28 server started
2021/12/13 10:38:29 main interface at http://pc-freebsd
2021/12/13 10:38:29 main interface at https://pc-freebsd
2021/12/13 10:38:29 admin interface at https://pc-freebsd/admin
## Install Rdio Scanner as a service

View file

@ -41,8 +41,8 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
[rdio@pc-linux ~]$ mkdir rdio-scanner
[rdio@pc-linux ~]$ cd rdio-scanner
[rdio@pc-linux rdio-scanner]$ unzip \
> ~/Downloads/rdio-scanner-linux-amd64-v6.0.5.zip
Archive: /home/rdio/Downloads/rdio-scanner-linux-amd64-v6.0.5.zip
> ~/Downloads/rdio-scanner-linux-amd64-v6.0.6.zip
Archive: /home/rdio/Downloads/rdio-scanner-linux-amd64-v6.0.6.zip
inflating: rdio-scanner
inflating: rdio-scanner.pdf
@ -50,11 +50,11 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
[rdio@pc-linux rdio-scanner]$ ./rdio-scanner
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 09:11:48 server started
2021/12/08 09:11:48 main interface at http://pc-linux:3000
2021/12/08 09:11:48 admin interface at http://pc-linux:3000/admin
2021/12/13 09:11:48 server started
2021/12/13 09:11:48 main interface at http://pc-linux:3000
2021/12/13 09:11:48 admin interface at http://pc-linux:3000/admin
4. Access the administrative dashboard to finalize the configuration.
@ -77,11 +77,11 @@ Here we want our [Rdio Scanner](https://guthub.com/chuot/rdio-scanner) instance
[rdio@pc-linux rdio-scanner]$ sudo ./rdio-scanner -listen :80
[sudo] password for rdio:
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 09:14:00 server started
2021/12/08 09:14:00 main interface at http://pc-linux
2021/12/08 09:14:00 admin interface at http://pc-linux/admin
2021/12/13 09:14:00 server started
2021/12/13 09:14:00 main interface at http://pc-linux
2021/12/13 09:14:00 admin interface at http://pc-linux/admin
## Listening with SSL with self-signed certificates
@ -90,8 +90,8 @@ It is advised to share your [Rdio Scanner](https://github.com/chuot/rdio-scanner
We can create such self-signed certificates by running [Rdio Scanner](https://github.com/chuot/rdio-scanner) with the **-ssl_create** argument.
[rdio@pc-linux rdio-scanner]$ ./rdio-scanner -ssl_create
2021/12/08 09:15:03 generating ssl certificate files
2021/12/08 09:15:05 ssl files created
2021/12/13 09:15:03 generating ssl certificate files
2021/12/13 09:15:05 ssl files created
This has generated these files in the same folder as your [Rdio Scanner](https://github.com/chuot/rdio-scanner) executable.
@ -109,12 +109,12 @@ Now we use the self-signed server certificate to run our instance.
> -ssl_listen :443
[sudo] password for rdio:
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 09:16:47 server started
2021/12/08 09:16:47 main interface at http://pc-linux
2021/12/08 09:16:47 main interface at https://pc-linux
2021/12/08 09:16:47 admin interface at https://pc-linux/admin
2021/12/13 09:16:47 server started
2021/12/13 09:16:47 main interface at http://pc-linux
2021/12/13 09:16:47 main interface at https://pc-linux
2021/12/13 09:16:47 admin interface at https://pc-linux/admin
## Save your advanced configuration to a config file
@ -126,7 +126,7 @@ You don't want to have to type everytime a long list of arguments. No problem, y
> -ssl_key_file server.key \
> -ssl_listen :443 \
> -config_save
2021/12/08 09:19:29 rdio-scanner.ini file created
2021/12/13 09:19:29 rdio-scanner.ini file created
All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list.
@ -142,12 +142,12 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
[rdio@pc-linux rdio-scanner]$ sudo ./rdio-scanner
[sudo] Mot de passe de rdio :
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 09:20:40 server started
2021/12/08 09:20:40 main interface at http://pc-linux
2021/12/08 09:20:40 main interface at https://pc-linux
2021/12/08 09:20:40 admin interface at https://pc-linux/admin
2021/12/13 09:20:40 server started
2021/12/13 09:20:40 main interface at http://pc-linux
2021/12/13 09:20:40 main interface at https://pc-linux
2021/12/13 09:20:40 admin interface at https://pc-linux/admin
## Install Rdio Scanner as a service

View file

@ -43,7 +43,7 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
C:\Users\rdio> cd rdio-scanner
C:\Users\rdio\rdio-scanner> tar -xvf ^
..\downloads\rdio-scanner-windows-amd64-v6.0.5.zip
..\downloads\rdio-scanner-windows-amd64-v6.0.6.zip
x rdio-scanner.exe
x rdio-scanner.pdf
@ -51,11 +51,11 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
C:\Users\rdio\rdio-scanner>rdio-scanner
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 13:48:48 server started
2021/12/08 13:48:48 main interface at http://pc-windows:3000
2021/12/08 13:48:48 admin interface at http://pc-windows:3000/admin
2021/12/13 13:48:48 server started
2021/12/13 13:48:48 main interface at http://pc-windows:3000
2021/12/13 13:48:48 admin interface at http://pc-windows:3000/admin
4. Access the administrative dashboard to finalize the configuration.
@ -77,11 +77,11 @@ Here we want our [Rdio Scanner](https://guthub.com/chuot/rdio-scanner) instance
C:\Users\rdio\rdio-scanner>rdio-scanner -listen :80
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 10:53:31 server started
2021/12/08 10:53:31 main interface at http://pc-windows
2021/12/08 10:53:31 admin interface at http://pc-windows/admin
2021/12/13 10:53:31 server started
2021/12/13 10:53:31 main interface at http://pc-windows
2021/12/13 10:53:31 admin interface at http://pc-windows/admin
## Listening with SSL with self-signed certificates
@ -90,8 +90,8 @@ It is advised to share your [Rdio Scanner](https://github.com/chuot/rdio-scanner
We can create such self-signed certificates by running [Rdio Scanner](https://github.com/chuot/rdio-scanner) with the **-ssl_create** argument.
C:\Users\rdio\rdio-scanner>rdio-scanner -ssl_create
2021/12/08 10:58:51 generating ssl certificate files
2021/12/08 10:58:54 ssl files created
2021/12/13 10:58:51 generating ssl certificate files
2021/12/13 10:58:54 ssl files created
This has generated these files in the same folder as your [Rdio Scanner](https://github.com/chuot/rdio-scanner) executable.
@ -108,12 +108,12 @@ Now we use the self-signed server certificate to run our instance.
-ssl_key_file server.key ^
-ssl_listen :443
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 11:05:43 server started
2021/12/08 11:05:43 main interface at http://pc-windows
2021/12/08 11:05:43 main interface at https://pc-windows
2021/12/08 11:05:43 admin interface at https://pc-windows/admin
2021/12/13 11:05:43 server started
2021/12/13 11:05:43 main interface at http://pc-windows
2021/12/13 11:05:43 main interface at https://pc-windows
2021/12/13 11:05:43 admin interface at https://pc-windows/admin
## Save your advanced configuration to a config file
@ -125,7 +125,7 @@ You don't want to have to type everytime a long list of arguments. No problem, y
-ssl_key_file server.key ^
-ssl_listen :443 ^
-config_save
2021/12/08 11:08:28 rdio-scanner.ini file created
2021/12/13 11:08:28 rdio-scanner.ini file created
All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list.
@ -140,12 +140,12 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
C:\Users\rdio\rdio-scanner>rdio-scanner
Rdio Scanner v6.0.5
Rdio Scanner v6.0.6
----------------------------------
2021/12/08 11:11:28 server started
2021/12/08 11:11:28 main interface at http://pc-windows
2021/12/08 11:11:28 main interface at https://pc-windows
2021/12/08 11:11:28 admin interface at https://pc-windows/admin
2021/12/13 11:11:28 server started
2021/12/13 11:11:28 main interface at http://pc-windows
2021/12/13 11:11:28 main interface at https://pc-windows
2021/12/13 11:11:28 admin interface at https://pc-windows/admin
\pagebreak{}

View file

@ -637,16 +637,16 @@ func (controller *Controller) Start() error {
}
func (controller *Controller) Terminate() {
if err := controller.Database.Sql.Close(); err != nil {
log.Println(err)
}
controller.Dirwatches.Stop()
for c := range controller.Clients {
c.Conn.Close()
}
if err := controller.Database.Sql.Close(); err != nil {
log.Println(err)
}
log.Println("terminated")
os.Exit(0)

View file

@ -43,9 +43,11 @@ func NewDaemon() *Daemon {
name = "rdio-scanner"
}
p, _ := os.FindProcess(os.Getpid())
d := Daemon{
Errors: make(chan error, 5),
Interface: &DaemonInterface{},
Interface: &DaemonInterface{Process: p},
}
d.Config = service.Config{
@ -62,7 +64,7 @@ func NewDaemon() *Daemon {
return &d
}
func (d *Daemon) Control(action string) {
func (d *Daemon) Control(action string) *Daemon {
if action == "run" {
go d.Service.Run()
@ -72,15 +74,21 @@ func (d *Daemon) Control(action string) {
} else {
os.Exit(-1)
}
return d
}
type DaemonInterface struct{}
type DaemonInterface struct {
Process *os.Process
}
func (d *DaemonInterface) Start(s service.Service) error {
return nil
}
func (d *DaemonInterface) Stop(s service.Service) error {
os.Exit(0)
if d.Process != nil {
d.Process.Signal(os.Interrupt)
}
return nil
}

View file

@ -39,8 +39,9 @@ func ParseSdrTrunkMeta(call *Call, controller *Controller) error {
return err
}
if len(m.Artist()) > 0 {
if i, err = strconv.Atoi(m.Artist()); err != nil {
s = regexp.MustCompile(`^([0-9]+)$`).FindStringSubmatch(m.Artist())
if len(s) == 2 {
if i, err = strconv.Atoi(s[1]); err != nil {
return err
}
call.Source = uint(i)

View file

@ -15,4 +15,4 @@
package main
const Version = "6.0.5"
const Version = "6.0.6"