chore: move test-only helpers to test file

This commit is contained in:
2026-05-13 13:00:59 +02:00
parent 0f8d1c7dc0
commit 5f7d82fc0b
2 changed files with 12 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
package allanime
import (
"bytes"
"context"
"crypto/aes"
"encoding/json"
@@ -8,6 +9,17 @@ import (
"testing"
)
func isLikelyM3U8(data []byte) bool {
return bytes.HasPrefix(bytes.TrimSpace(data), []byte("#EXTM3U"))
}
func isLikelyMP4(data []byte) bool {
if len(data) < 8 {
return false
}
return string(data[4:8]) == "ftyp"
}
func TestDecodeSourceURL(t *testing.T) {
t.Parallel()