mirror of
https://github.com/chuot/rdio-scanner.git
synced 2026-08-14 17:03:02 -06:00
Version 6.0.3
This commit is contained in:
parent
4bca72a202
commit
04fda4558e
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -20,18 +20,23 @@ The backend server has been completely rewritten in GO language. Therefore, all
|
|||
- Due to the polling situation, the Docker version of Rdio Scanner is no longer offered. Since it is now so easy to install v6 on various platforms, that was a no-brainer.
|
||||
- Default database name changed from _database.sqlite_ to _rdio-scanner.db_. You will need to rename your database file with the new name if you want to convert it. Otherwise, a new database will be created.
|
||||
|
||||
_v.6.0.1_
|
||||
_v6.0.1_
|
||||
|
||||
- Fix button sound on select panel for TG (beep state inverted)
|
||||
- Auto populate system units (issue #66)
|
||||
|
||||
_v.6.0.2_
|
||||
_v6.0.2_
|
||||
|
||||
- Try to fix the SQL_BUSY error (issue #67).
|
||||
- Fix `-service stop` timing out before exiting.
|
||||
- Drop the ApiKey uniqueness of the downstreams database table.
|
||||
- Fix auto-populating the database with empty units tag.
|
||||
|
||||
_v6.0.3_
|
||||
|
||||
- Fix strconv.Atoi: invalid syntax for dirwatch type sdrtrunk.
|
||||
- Fix the new version available dialog opening more than once.
|
||||
|
||||
## Version 5.2
|
||||
|
||||
- Change to how the server reports version.
|
||||
|
|
@ -39,7 +44,7 @@ _v.6.0.2_
|
|||
- Fix issue with iframe.
|
||||
- Node modules updated for security fixes.
|
||||
|
||||
_v.5.2.1_
|
||||
_v5.2.1_
|
||||
|
||||
- Fix talkgroup header on the search panel (issue #47).
|
||||
- Update dirwatch meta tags #DATE, #TIME and #ZTIME for SDRSharp compatibility (issue #48).
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -16,7 +16,7 @@
|
|||
################################################################################
|
||||
|
||||
app := rdio-scanner
|
||||
ver := 6.0.2
|
||||
ver := 6.0.3
|
||||
|
||||
client := $(wildcard client/*.json client/*.ts)
|
||||
server := $(wildcard server/*.go)
|
||||
|
|
|
|||
|
|
@ -39,5 +39,5 @@
|
|||
"build": "ng build --base-href ./ --configuration production",
|
||||
"start": "ng serve"
|
||||
},
|
||||
"version": "6.0.2"
|
||||
"version": "6.0.3"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,6 @@ export interface Config {
|
|||
access?: Access[];
|
||||
apiKeys?: ApiKey[];
|
||||
dirWatch?: DirWatch[];
|
||||
docker?: boolean;
|
||||
downstreams?: Downstream[];
|
||||
groups?: Group[];
|
||||
options?: Options;
|
||||
|
|
@ -399,7 +398,6 @@ export class RdioScannerAdminService implements OnDestroy {
|
|||
newDirWatchForm(dirWatch?: DirWatch): FormGroup {
|
||||
return this.ngFormBuilder.group({
|
||||
_id: [dirWatch?._id],
|
||||
// delay: [dirWatch?.delay, Validators.min(0)],
|
||||
deleteAfter: [dirWatch?.deleteAfter],
|
||||
directory: [dirWatch?.directory, [Validators.required, this.validateDirectory()]],
|
||||
disabled: [dirWatch?.disabled],
|
||||
|
|
@ -410,7 +408,6 @@ export class RdioScannerAdminService implements OnDestroy {
|
|||
systemId: [dirWatch?.systemId, this.validateDirwatchSystemId()],
|
||||
talkgroupId: [dirWatch?.talkgroupId, this.validateDirwatchTalkgroupId()],
|
||||
type: [dirWatch?.type],
|
||||
// usePolling: [dirWatch?.usePolling],
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
<mat-icon *ngIf="form?.get('dirWatch')?.invalid" color="warn">error</mat-icon>
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
<rdio-scanner-admin-dir-watch #dirWatchComponent [docker]="docker" [form]="dirWatch"></rdio-scanner-admin-dir-watch>
|
||||
<rdio-scanner-admin-dir-watch #dirWatchComponent [form]="dirWatch"></rdio-scanner-admin-dir-watch>
|
||||
</mat-expansion-panel>
|
||||
<mat-expansion-panel (afterCollapse)="downstreamsComponent.closeAll()">
|
||||
<mat-expansion-panel-header>
|
||||
|
|
|
|||
|
|
@ -44,10 +44,6 @@ export class RdioScannerAdminConfigComponent implements OnDestroy, OnInit {
|
|||
return this.form?.get('dirWatch') as FormArray;
|
||||
}
|
||||
|
||||
get docker(): boolean {
|
||||
return this.config?.docker || false;
|
||||
}
|
||||
|
||||
get downstreams(): FormArray {
|
||||
return this.form?.get('downstreams') as FormArray;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,13 +36,7 @@
|
|||
<p>
|
||||
<span class="mat-body">Directory</span><br>
|
||||
<span class="mat-caption">
|
||||
<ng-container *ngIf="docker">
|
||||
Absolute or relatives inside the <u>Docker container</u>, path of the directory to be
|
||||
monitored.
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!docker">
|
||||
Absolute or relatives to the server, path of the directory to be monitored.
|
||||
</ng-container>
|
||||
Absolute or relatives to the server, path of the directory to be monitored.
|
||||
</span>
|
||||
</p>
|
||||
<mat-form-field floatLabel="never">
|
||||
|
|
@ -124,13 +118,15 @@
|
|||
<span class="mat-caption">Some metadata can be extracted from the file name of the audio file using
|
||||
specific META tags. Possible META tags:
|
||||
<ul>
|
||||
<li><b>#DATE</b> - extract the date like 20201231 (YYYYMMMDD), 2020-12-31 (YYYY-MM-DD) or 2020_12_31 (YYYY_MM_DD).
|
||||
<li><b>#DATE</b> - extract the date like 20201231 (YYYYMMMDD),
|
||||
2020-12-31 (YYYY-MM-DD) or 2020_12_31 (YYYY_MM_DD).
|
||||
</li>
|
||||
<li><b>#HZ</b> - extract the frequency in hertz like 119100000.</li>
|
||||
<li><b>#KHZ</b> - extract the frequency in kilohertz like 119100.</li>
|
||||
<li><b>#MHZ</b> - extract the frequency in megahertz like 119.100.</li>
|
||||
<li><b>#SYS</b> - extract the system id like 11.</li>
|
||||
<li><b>#TIME</b> - extract the local time like 0853439 (HHMMSS), 08-34-39 (HH-MM-SS) or 08:34:39 (HH:MM:SS).</li>
|
||||
<li><b>#TIME</b> - extract the local time like 0853439 (HHMMSS),
|
||||
08-34-39 (HH-MM-SS) or 08:34:39 (HH:MM:SS).</li>
|
||||
<li><b>#TG</b> - extract the talkgroup id like 54241.</li>
|
||||
<li><b>#UNIT</b> - extract the unit id like 4424001.</li>
|
||||
<li><b>#ZTIME</b> - extract the zulu time like 0453439, 08-34-39 or 04:34:39.</li>
|
||||
|
|
@ -157,28 +153,6 @@
|
|||
</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <div class="row">
|
||||
<p>
|
||||
<span class="mat-body">Delay</span><br>
|
||||
<span class="mat-caption">Depending on the recorder, audio files can be ingested too soon after the
|
||||
recorder has created the file. You can set a timeout value in milliseconds for the audio file to
|
||||
settle before ingesting it.</span>
|
||||
</p>
|
||||
<mat-form-field floatLabel="never">
|
||||
<input type="number" min="0" step="1" matInput formControlName="delay" placeholder="Delay">
|
||||
</mat-form-field>
|
||||
</div> -->
|
||||
<!-- <div class="row">
|
||||
<p>
|
||||
<span class="mat-body">Use Polling</span><br>
|
||||
<span class="mat-caption">Use polling when monitoring the directory. While this takes a bit more CPU
|
||||
resources, it is necessary if the monitored directory is from a remote host or from outside of a
|
||||
Docker container.</span>
|
||||
</p>
|
||||
<div>
|
||||
<mat-slide-toggle color="primary" formControlName="usePolling"></mat-slide-toggle>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row bottom">
|
||||
<button type="button" mat-button color="warn" (click)="remove(i)">
|
||||
Delete dirwatch
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ import { RdioScannerAdminService } from '../../admin.service';
|
|||
templateUrl: './dir-watch.component.html',
|
||||
})
|
||||
export class RdioScannerAdminDirWatchComponent implements OnChanges {
|
||||
@Input() docker: boolean | undefined;
|
||||
|
||||
@Input() form: FormArray | undefined;
|
||||
|
||||
get dirWatches(): FormGroup[] {
|
||||
|
|
@ -64,7 +62,6 @@ export class RdioScannerAdminDirWatchComponent implements OnChanges {
|
|||
}
|
||||
|
||||
add(): void {
|
||||
// const dirWatch = this.adminService.newDirWatchForm({ usePolling: this.docker });
|
||||
const dirWatch = this.adminService.newDirWatchForm();
|
||||
|
||||
dirWatch.markAllAsTouched();
|
||||
|
|
|
|||
|
|
@ -39,10 +39,6 @@ export class RdioScannerAdminImportExportConfigComponent {
|
|||
async export(): Promise<void> {
|
||||
const config = await this.adminService.getConfig();
|
||||
|
||||
if ('docker' in config) {
|
||||
delete config.docker;
|
||||
}
|
||||
|
||||
const file = JSON.stringify(config);
|
||||
const fileName = 'rdio-scanner.json';
|
||||
const fileType = 'application/json';
|
||||
|
|
|
|||
|
|
@ -39,6 +39,4 @@ export class AppUpdateModule {
|
|||
providers: [AppUpdateService],
|
||||
};
|
||||
}
|
||||
|
||||
// constructor(appUpdateService: AppUpdateService) { }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,18 +24,25 @@ import { AppUpdateComponent } from './update.component';
|
|||
|
||||
@Injectable()
|
||||
export class AppUpdateService {
|
||||
private prompted: boolean = false;
|
||||
|
||||
constructor(
|
||||
private matDialog: MatDialog,
|
||||
private swUpdate: SwUpdate,
|
||||
) {
|
||||
if (swUpdate.isEnabled) {
|
||||
swUpdate.versionUpdates.subscribe(() => this.prompt());
|
||||
swUpdate.checkForUpdate();
|
||||
setInterval(() => swUpdate.checkForUpdate(), 5 * 60 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
prompt(): void {
|
||||
if (this.prompted) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.prompted = true
|
||||
|
||||
this.matDialog.open(AppUpdateComponent).afterClosed().subscribe((doUpdate) => {
|
||||
if (doUpdate) {
|
||||
if (this.swUpdate.isEnabled) {
|
||||
|
|
@ -44,6 +51,8 @@ export class AppUpdateService {
|
|||
document.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
this.prompted = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -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.2.zip
|
||||
Archive: /Users/rdio/Downloads/rdio-scanner-darwin-arm64-v6.0.2.zip
|
||||
> ~/Downloads/rdio-scanner-darwin-arm64-v6.0.3.zip
|
||||
Archive: /Users/rdio/Downloads/rdio-scanner-darwin-arm64-v6.0.3.zip
|
||||
inflating: rdio-scanner
|
||||
inflating: rdio-scanner.pdf
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
|
|||
|
||||
rdio@macos rdio-scanner % ./rdio-scanner
|
||||
|
||||
Rdio Scanner v6.0.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/29 08:38:06 server started
|
||||
2021/11/29 08:38:06 main interface at http://macos.local:3000
|
||||
|
|
@ -76,7 +76,7 @@ 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.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/29 08:48:03 server started
|
||||
2021/11/29 08:48:03 main interface at http://macos.local
|
||||
|
|
@ -107,7 +107,7 @@ Now we use the self-signed server certificate to run our instance.
|
|||
> -ssl_key_file server.key \
|
||||
> -ssl_listen :443
|
||||
|
||||
Rdio Scanner v6.0.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/29 08:50:58 server started
|
||||
2021/11/29 08:50:58 main interface at http://macos.local
|
||||
|
|
@ -139,7 +139,7 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
|
|||
|
||||
rdio@macos rdio-scanner % ./rdio-scanner
|
||||
|
||||
Rdio Scanner v6.0.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/29 08:54:08 server started
|
||||
2021/11/29 08:54:08 main interface at http://macos.local
|
||||
|
|
|
|||
|
|
@ -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.2.zip
|
||||
Archive: ../rdio-scanner-freebsd-amd64-v6.0.2.zip
|
||||
> ~/rdio-scanner-freebsd-amd64-v6.0.3.zip
|
||||
Archive: ../rdio-scanner-freebsd-amd64-v6.0.3.zip
|
||||
extracting: rdio-scanner
|
||||
extracting: rdio-scanner.pdf
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
|
|||
|
||||
rdio@pc-freebsd:~/rdio-scanner $ ./rdio-scanner
|
||||
|
||||
Rdio Scanner v6.0.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/28 08:16:36 server started
|
||||
2021/11/28 08:16:36 main interface at http://pc-freebsd:3000
|
||||
|
|
@ -80,7 +80,7 @@ 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.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/28 08:19:38 server started
|
||||
2021/11/28 08:19:38 main interface at http://pc-freebsd
|
||||
|
|
@ -113,7 +113,7 @@ Now we use the self-signed server certificate to run our instance.
|
|||
> -ssl_key_file server.key \
|
||||
> -ssl_listen :443
|
||||
|
||||
Rdio Scanner v6.0.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/28 10:34:29 server started
|
||||
2021/11/28 10:34:29 main interface at http://pc-freebsd
|
||||
|
|
@ -147,7 +147,7 @@ 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.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/28 10:38:28 server started
|
||||
2021/11/28 10:38:29 main interface at http://pc-freebsd
|
||||
|
|
|
|||
|
|
@ -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.2.zip
|
||||
Archive: /home/rdio/Downloads/rdio-scanner-linux-amd64-v6.0.2.zip
|
||||
> ~/Downloads/rdio-scanner-linux-amd64-v6.0.3.zip
|
||||
Archive: /home/rdio/Downloads/rdio-scanner-linux-amd64-v6.0.3.zip
|
||||
inflating: rdio-scanner
|
||||
inflating: rdio-scanner.pdf
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
|
|||
|
||||
[rdio@pc-linux rdio-scanner]$ ./rdio-scanner
|
||||
|
||||
Rdio Scanner v6.0.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/29 09:11:48 server started
|
||||
2021/11/29 09:11:48 main interface at http://pc-linux:3000
|
||||
|
|
@ -77,7 +77,7 @@ 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.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/29 09:14:00 server started
|
||||
2021/11/29 09:14:00 main interface at http://pc-linux
|
||||
|
|
@ -109,7 +109,7 @@ Now we use the self-signed server certificate to run our instance.
|
|||
> -ssl_listen :443
|
||||
[sudo] password for rdio:
|
||||
|
||||
Rdio Scanner v6.0.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/29 09:16:47 server started
|
||||
2021/11/29 09:16:47 main interface at http://pc-linux
|
||||
|
|
@ -142,7 +142,7 @@ 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.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/29 09:20:40 server started
|
||||
2021/11/29 09:20:40 main interface at http://pc-linux
|
||||
|
|
|
|||
|
|
@ -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.2.zip
|
||||
..\downloads\rdio-scanner-windows-amd64-v6.0.3.zip
|
||||
x rdio-scanner.exe
|
||||
x rdio-scanner.pdf
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
|
|||
|
||||
C:\Users\rdio\rdio-scanner>rdio-scanner
|
||||
|
||||
Rdio Scanner v6.0.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/25 13:48:48 server started
|
||||
2021/11/25 13:48:48 main interface at http://pc-windows:3000
|
||||
|
|
@ -77,7 +77,7 @@ 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.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/26 10:53:31 server started
|
||||
2021/11/26 10:53:31 main interface at http://pc-windows
|
||||
|
|
@ -108,7 +108,7 @@ Now we use the self-signed server certificate to run our instance.
|
|||
-ssl_key_file server.key ^
|
||||
-ssl_listen :443
|
||||
|
||||
Rdio Scanner v6.0.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/26 11:05:43 server started
|
||||
2021/11/26 11:05:43 main interface at http://pc-windows
|
||||
|
|
@ -140,7 +140,7 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
|
|||
|
||||
C:\Users\rdio\rdio-scanner>rdio-scanner
|
||||
|
||||
Rdio Scanner v6.0.2
|
||||
Rdio Scanner v6.0.3
|
||||
----------------------------------
|
||||
2021/11/26 11:11:28 server started
|
||||
2021/11/26 11:11:28 main interface at http://pc-windows
|
||||
|
|
|
|||
2
server/.gitignore
vendored
2
server/.gitignore
vendored
|
|
@ -9,4 +9,4 @@
|
|||
/rdio-scanner
|
||||
/server
|
||||
/webapp/*
|
||||
!/webapp/.gitkeep
|
||||
!/webapp
|
||||
|
|
@ -6,13 +6,13 @@ require (
|
|||
github.com/dhowden/tag v0.0.0-20201120070457-d52dcb253c63
|
||||
github.com/fsnotify/fsnotify v1.5.1
|
||||
github.com/go-sql-driver/mysql v1.6.0
|
||||
github.com/golang-jwt/jwt/v4 v4.1.0
|
||||
github.com/golang-jwt/jwt/v4 v4.2.0
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/gorilla/websocket v1.4.2
|
||||
github.com/kardianos/service v1.2.0
|
||||
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871
|
||||
gopkg.in/ini.v1 v1.66.1
|
||||
modernc.org/sqlite v1.14.1
|
||||
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e
|
||||
gopkg.in/ini.v1 v1.66.2
|
||||
modernc.org/sqlite v1.14.2
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
@ -21,15 +21,15 @@ require (
|
|||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
|
||||
github.com/stretchr/testify v1.7.0 // indirect
|
||||
golang.org/x/mod v0.5.1 // indirect
|
||||
golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c // indirect
|
||||
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect
|
||||
golang.org/x/net v0.0.0-20211205041911-012df41ee64c // indirect
|
||||
golang.org/x/sys v0.0.0-20211204120058-94396e421777 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/tools v0.1.7 // indirect
|
||||
golang.org/x/tools v0.1.8 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||
lukechampine.com/uint128 v1.1.1 // indirect
|
||||
modernc.org/cc/v3 v3.35.18 // indirect
|
||||
modernc.org/ccgo/v3 v3.12.82 // indirect
|
||||
modernc.org/libc v1.11.87 // indirect
|
||||
modernc.org/ccgo/v3 v3.12.86 // indirect
|
||||
modernc.org/libc v1.11.88 // indirect
|
||||
modernc.org/mathutil v1.4.1 // indirect
|
||||
modernc.org/memory v1.0.5 // indirect
|
||||
modernc.org/opt v0.1.1 // indirect
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWp
|
|||
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
|
||||
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
|
||||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/golang-jwt/jwt/v4 v4.1.0 h1:XUgk2Ex5veyVFVeLm0xhusUTQybEbexJXrvPNOKkSY0=
|
||||
github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
|
||||
github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU=
|
||||
github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
|
||||
github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
|
||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
|
|
@ -33,23 +33,22 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
|||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 h1:/pEO3GD/ABYAjuakUS6xSEmmlyVS4kxBNkeA9tLJiTI=
|
||||
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e h1:MUP6MR3rJ7Gk9LEia0LP2ytiH6MuCfs7qYz+47jGdD8=
|
||||
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
|
||||
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c h1:WtYZ93XtWSO5KlOMgPZu7hXY9WhMZpprvlm5VwvAl8c=
|
||||
golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211205041911-012df41ee64c h1:7SfqwP5fxEtl/P02w5IhKc86ziJ+A25yFrkVgoy2FT8=
|
||||
golang.org/x/net v0.0.0-20211205041911-012df41ee64c/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
|
@ -63,11 +62,11 @@ golang.org/x/sys v0.0.0-20201126233918-771906719818/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 h1:TyHqChC80pFkXWraUUf6RuB5IqFdQieMLwwCJokV2pc=
|
||||
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211204120058-94396e421777 h1:QAkhGVjOxMa+n4mlsAWeAU+BMZmimQAaNiMu+iUi94E=
|
||||
golang.org/x/sys v0.0.0-20211204120058-94396e421777/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
|
|
@ -77,16 +76,16 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
|||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w=
|
||||
golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/ini.v1 v1.66.1 h1:kWVKj9OXQuOk10tEqPxDmpEoISM3NZHelrsfWcmtEUA=
|
||||
gopkg.in/ini.v1 v1.66.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI=
|
||||
gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
lukechampine.com/uint128 v1.1.1 h1:pnxCASz787iMf+02ssImqk6OLt+Z5QHMoZyUXR4z6JU=
|
||||
|
|
@ -140,8 +139,10 @@ modernc.org/ccgo/v3 v3.12.66/go.mod h1:jUuxlCFZTUZLMV08s7B1ekHX5+LIAurKTTaugUr/E
|
|||
modernc.org/ccgo/v3 v3.12.67/go.mod h1:Bll3KwKvGROizP2Xj17GEGOTrlvB1XcVaBrC90ORO84=
|
||||
modernc.org/ccgo/v3 v3.12.73/go.mod h1:hngkB+nUUqzOf3iqsM48Gf1FZhY599qzVg1iX+BT3cQ=
|
||||
modernc.org/ccgo/v3 v3.12.81/go.mod h1:p2A1duHoBBg1mFtYvnhAnQyI6vL0uw5PGYLSIgF6rYY=
|
||||
modernc.org/ccgo/v3 v3.12.82 h1:wudcnJyjLj1aQQCXF3IM9Gz2X6UNjw+afIghzdtn0v8=
|
||||
modernc.org/ccgo/v3 v3.12.82/go.mod h1:ApbflUfa5BKadjHynCficldU1ghjen84tuM5jRynB7w=
|
||||
modernc.org/ccgo/v3 v3.12.84/go.mod h1:ApbflUfa5BKadjHynCficldU1ghjen84tuM5jRynB7w=
|
||||
modernc.org/ccgo/v3 v3.12.86 h1:zN0MkWIf1a2SgP6w9V3EG5r30CSrpRunyzJ5wcYRLFM=
|
||||
modernc.org/ccgo/v3 v3.12.86/go.mod h1:dN7S26DLTgVSni1PVA3KxxHTcykyDurf3OgUzNqTSrU=
|
||||
modernc.org/ccorpus v1.11.1 h1:K0qPfpVG1MJh5BYazccnmhywH4zHuOgJXgbjzyp6dWA=
|
||||
modernc.org/ccorpus v1.11.1/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ=
|
||||
modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
|
||||
|
|
@ -180,8 +181,9 @@ modernc.org/libc v1.11.71/go.mod h1:DUOmMYe+IvKi9n6Mycyx3DbjfzSKrdr/0Vgt3j7P5gw=
|
|||
modernc.org/libc v1.11.75/go.mod h1:dGRVugT6edz361wmD9gk6ax1AbDSe0x5vji0dGJiPT0=
|
||||
modernc.org/libc v1.11.82/go.mod h1:NF+Ek1BOl2jeC7lw3a7Jj5PWyHPwWD4aq3wVKxqV1fI=
|
||||
modernc.org/libc v1.11.86/go.mod h1:ePuYgoQLmvxdNT06RpGnaDKJmDNEkV7ZPKI2jnsvZoE=
|
||||
modernc.org/libc v1.11.87 h1:PzIzOqtlzMDDcCzJ5cUP6h/Ku6Fa9iyflP2ccTY64aE=
|
||||
modernc.org/libc v1.11.87/go.mod h1:Qvd5iXTeLhI5PS0XSyqMY99282y+3euapQFxM7jYnpY=
|
||||
modernc.org/libc v1.11.88 h1:ibbHksDVITfJtBTSCENSXRt/pL4P/QJP+EzJUimW268=
|
||||
modernc.org/libc v1.11.88/go.mod h1:h3oIVe8dxmTcchcFuCcJ4nAWaoiwzKCdv82MM0oiIdQ=
|
||||
modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
|
||||
modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
|
||||
modernc.org/mathutil v1.4.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
|
||||
|
|
@ -192,8 +194,8 @@ modernc.org/memory v1.0.5 h1:XRch8trV7GgvTec2i7jc33YlUI0RKVDBvZ5eZ5m8y14=
|
|||
modernc.org/memory v1.0.5/go.mod h1:B7OYswTRnfGg+4tDH1t1OeUNnsy2viGTdME4tzd+IjM=
|
||||
modernc.org/opt v0.1.1 h1:/0RX92k9vwVeDXj+Xn23DKp2VJubL7k8qNffND6qn3A=
|
||||
modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
|
||||
modernc.org/sqlite v1.14.1 h1:jthfQCbWKfbK/lvZSjFEpBk0QzIBN6pQbFdDqBMR490=
|
||||
modernc.org/sqlite v1.14.1/go.mod h1:04Lqa+3PuAEUhAPAPWeDMljT4UYA31nb2DHTFG47L1g=
|
||||
modernc.org/sqlite v1.14.2 h1:ohsW2+e+Qe2To1W6GNezzKGwjXwSax6R+CrhRxVaFbE=
|
||||
modernc.org/sqlite v1.14.2/go.mod h1:yqfn85u8wVOE6ub5UT8VI9JjhrwBUUCNyTACN0h6Sx8=
|
||||
modernc.org/strutil v1.1.1 h1:xv+J1BXY3Opl2ALrBwyfEikFAj8pmqcpnfmuwUwcozs=
|
||||
modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw=
|
||||
modernc.org/tcl v1.8.13 h1:V0sTNBw0Re86PvXZxuCub3oO9WrSTqALgrwNZNvLFGw=
|
||||
|
|
|
|||
|
|
@ -30,6 +30,16 @@ import (
|
|||
)
|
||||
|
||||
func main() {
|
||||
const defaultAddr = "0.0.0.0"
|
||||
|
||||
var (
|
||||
addr string
|
||||
port string
|
||||
hostname string
|
||||
sslAddr string
|
||||
sslPort string
|
||||
)
|
||||
|
||||
config := &Config{}
|
||||
ok, err := config.Init()
|
||||
if err != nil {
|
||||
|
|
@ -39,9 +49,6 @@ func main() {
|
|||
os.Exit(0)
|
||||
}
|
||||
|
||||
fmt.Printf("\nRdio Scanner v%s\n", Version)
|
||||
fmt.Printf("----------------------------------\n")
|
||||
|
||||
database := &Database{}
|
||||
if err = database.Init(config); err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
@ -65,7 +72,7 @@ func main() {
|
|||
log.Fatal(err)
|
||||
}
|
||||
|
||||
LogEvent(controller.Database, LogLevelInfo, "admin password changed, please restart the server.")
|
||||
LogEvent(controller.Database, LogLevelInfo, "admin password changed.")
|
||||
|
||||
os.Exit(0)
|
||||
|
||||
|
|
@ -74,22 +81,11 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
fmt.Printf("\nRdio Scanner v%s\n", Version)
|
||||
fmt.Printf("----------------------------------\n")
|
||||
|
||||
LogEvent(controller.Database, LogLevelWarn, "server started")
|
||||
|
||||
Start(controller, "/")
|
||||
}
|
||||
|
||||
func Start(controller *Controller, rootUrl string) {
|
||||
const defaultAddr = "0.0.0.0"
|
||||
|
||||
var (
|
||||
addr string
|
||||
port string
|
||||
hostname string
|
||||
sslAddr string
|
||||
sslPort string
|
||||
)
|
||||
|
||||
if h, err := os.Hostname(); err == nil {
|
||||
hostname = h
|
||||
} else {
|
||||
|
|
@ -118,7 +114,7 @@ func Start(controller *Controller, rootUrl string) {
|
|||
sslAddr = defaultAddr
|
||||
}
|
||||
|
||||
http.HandleFunc(rootUrl, func(w http.ResponseWriter, r *http.Request) {
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
url := r.URL.Path[1:]
|
||||
|
||||
switch url {
|
||||
|
|
|
|||
|
|
@ -39,10 +39,12 @@ func ParseSdrTrunkMeta(call *Call, controller *Controller) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if i, err = strconv.Atoi(m.Artist()); err != nil {
|
||||
return err
|
||||
if len(m.Artist()) > 0 {
|
||||
if i, err = strconv.Atoi(m.Artist()); err != nil {
|
||||
return err
|
||||
}
|
||||
call.Source = uint(i)
|
||||
}
|
||||
call.Source = uint(i)
|
||||
|
||||
s = regexp.MustCompile(`Date:([^;]+);`).FindStringSubmatch(m.Comment())
|
||||
if len(s) == 2 {
|
||||
|
|
@ -53,7 +55,7 @@ func ParseSdrTrunkMeta(call *Call, controller *Controller) error {
|
|||
}
|
||||
|
||||
s = regexp.MustCompile(`Frequency:([0-9]+);`).FindStringSubmatch(m.Comment())
|
||||
if len(s) == 2 {
|
||||
if len(s) == 2 && len(s[1]) > 0 {
|
||||
if i, err = strconv.Atoi(s[1]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -71,7 +73,7 @@ func ParseSdrTrunkMeta(call *Call, controller *Controller) error {
|
|||
}
|
||||
|
||||
s = regexp.MustCompile(`^([0-9]+)`).FindStringSubmatch(m.Title())
|
||||
if len(s) > 1 {
|
||||
if len(s) > 1 && len(s[1]) > 0 {
|
||||
if i, err = strconv.Atoi(s[1]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,4 @@
|
|||
|
||||
package main
|
||||
|
||||
const Version = "6.0.2"
|
||||
const Version = "6.0.3"
|
||||
|
|
|
|||
Loading…
Reference in a new issue