mirror of
https://github.com/kemko/icecast-ripper.git
synced 2026-01-01 15:55:42 +03:00
switched codeql to go
This commit is contained in:
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user