switched codeql to go

This commit is contained in:
Dmitrii Andreev
2025-04-07 19:17:04 +03:00
parent 926a9ca08b
commit b4bed37a9f
2 changed files with 6 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
language: [ 'go' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both

View File

@@ -83,12 +83,12 @@ func (g *Generator) GenerateFeed(maxItems int) ([]byte, error) {
}
item := &feeds.Item{
Title: fmt.Sprintf("Recording %s", rec.RecordedAt.Format("2006-01-02 15:04")),
Link: &feeds.Link{Href: fileURL},
Title: fmt.Sprintf("Recording %s", rec.RecordedAt.Format("2006-01-02 15:04")),
Link: &feeds.Link{Href: fileURL},
Description: fmt.Sprintf("Icecast stream recording from %s. Duration: %s",
rec.RecordedAt.Format(time.RFC1123), rec.Duration.String()),
Created: rec.RecordedAt,
Id: rec.Hash,
Created: rec.RecordedAt,
Id: rec.Hash,
Enclosure: &feeds.Enclosure{
Url: fileURL,
Length: fmt.Sprintf("%d", rec.FileSize),
@@ -149,7 +149,7 @@ func (g *Generator) scanRecordings(maxItems int) ([]RecordingInfo, error) {
// Calculate an estimated duration based on file size
// Assuming ~128kbps MP3 bitrate: 16KB per second
estimatedDuration := time.Duration(info.Size() / 16000) * time.Second
estimatedDuration := time.Duration(info.Size()/16000) * time.Second
// Generate a stable hash for the recording
filename := filepath.Base(path)