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:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: [ 'python' ]
|
language: [ 'go' ]
|
||||||
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
|
# 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 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||||
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript 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{
|
item := &feeds.Item{
|
||||||
Title: fmt.Sprintf("Recording %s", rec.RecordedAt.Format("2006-01-02 15:04")),
|
Title: fmt.Sprintf("Recording %s", rec.RecordedAt.Format("2006-01-02 15:04")),
|
||||||
Link: &feeds.Link{Href: fileURL},
|
Link: &feeds.Link{Href: fileURL},
|
||||||
Description: fmt.Sprintf("Icecast stream recording from %s. Duration: %s",
|
Description: fmt.Sprintf("Icecast stream recording from %s. Duration: %s",
|
||||||
rec.RecordedAt.Format(time.RFC1123), rec.Duration.String()),
|
rec.RecordedAt.Format(time.RFC1123), rec.Duration.String()),
|
||||||
Created: rec.RecordedAt,
|
Created: rec.RecordedAt,
|
||||||
Id: rec.Hash,
|
Id: rec.Hash,
|
||||||
Enclosure: &feeds.Enclosure{
|
Enclosure: &feeds.Enclosure{
|
||||||
Url: fileURL,
|
Url: fileURL,
|
||||||
Length: fmt.Sprintf("%d", rec.FileSize),
|
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
|
// Calculate an estimated duration based on file size
|
||||||
// Assuming ~128kbps MP3 bitrate: 16KB per second
|
// 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
|
// Generate a stable hash for the recording
|
||||||
filename := filepath.Base(path)
|
filename := filepath.Base(path)
|
||||||
|
|||||||
Reference in New Issue
Block a user