Simplify images, tag overview

This commit is contained in:
Christoph Hagen
2025-01-04 08:44:26 +01:00
parent 4d4275e072
commit 22e7d9a05a
49 changed files with 603 additions and 509 deletions

View File

@ -50,12 +50,19 @@ struct AudioPlayerCommandProcessor: CommandProcessor {
results.missing(file: song.cover, containedIn: file)
continue
}
guard image.type.isImage else {
results.warning("Cover '\(song.cover)' in file \(fileId) is not an image file")
continue
}
guard let audioFile = content.file(song.file) else {
results.missing(file: song.cover, containedIn: file)
continue
}
#warning("Check if file is audio")
guard audioFile.type.isAudio else {
results.warning("Song '\(song.file)' in file \(fileId) is not an audio file")
continue
}
let coverUrl = image.absoluteUrl
let playlistItem = AudioPlayer.PlaylistItem(

View File

@ -106,7 +106,8 @@ struct PageHtmlProcessor: CommandProcessor {
results.warning("Failed to find <source> elements in inline HTML: \(error)")
return
}
checkSourceSetAttributes(sources: sources)
checkSourceAttributes(sources: sources)
}
private func checkSourceSetAttributes(sources: [Element]) {