Add ISO media scan support

This commit is contained in:
ShukeBta
2026-07-16 12:47:31 +08:00
parent 19381eb270
commit cc056077ee
6 changed files with 42 additions and 12 deletions
+3 -3
View File
@@ -76,7 +76,7 @@ func (s *ScannerService) ingestCloudFile(ctx context.Context, lib *model.Library
isNewMedia = !exists
needsTrackProbe = !exists || cloudTrackMetadataMissing(existing)
if exists && existing.LibraryID == lib.ID && existing.SizeBytes == size && existing.STRMURL == expectedSTRMURL && !cloudMetadataNeedsRefresh(existing, localMeta) && !cloudDerivedMetadataNeedsRefresh(existing, m) {
if needsTrackProbe && ext != ".strm" {
if needsTrackProbe && mediaExtensionSupportsProbe(ext) {
s.queueCloudMediaProbeWithBudget(typ, ref, path, probeBudget)
}
res.Skipped++
@@ -90,7 +90,7 @@ func (s *ScannerService) ingestCloudFile(ctx context.Context, lib *model.Library
}
if isNewMedia && writeBatch != nil {
var after func()
if needsTrackProbe && ext != ".strm" {
if needsTrackProbe && mediaExtensionSupportsProbe(ext) {
after = func() {
s.queueCloudMediaProbeWithBudget(typ, ref, path, probeBudget)
}
@@ -103,7 +103,7 @@ func (s *ScannerService) ingestCloudFile(ctx context.Context, lib *model.Library
s.log.Warn("upsert cloud media failed", zap.String("path", path), zap.Error(err))
return
}
if needsTrackProbe && ext != ".strm" {
if needsTrackProbe && mediaExtensionSupportsProbe(ext) {
s.queueCloudMediaProbeWithBudget(typ, ref, path, probeBudget)
}
if isNewMedia {