Full generation, file type cleanup
This commit is contained in:
@ -28,8 +28,8 @@ final class FileResource: Item {
|
||||
/**
|
||||
Only for bundle images
|
||||
*/
|
||||
init(resourceImage: String, type: ImageFileType) {
|
||||
self.type = .image(type)
|
||||
init(resourceImage: String, type: FileType) {
|
||||
self.type = type
|
||||
self.english = "A test image included in the bundle"
|
||||
self.german = "Ein Testbild aus dem Bundle"
|
||||
self.isExternallyStored = true
|
||||
@ -87,18 +87,20 @@ final class FileResource: Item {
|
||||
return makeCleanAbsolutePath(path)
|
||||
}
|
||||
|
||||
var assetUrl: String {
|
||||
let path = content.settings.paths.assetsOutputFolderPath + "/" + id
|
||||
return makeCleanAbsolutePath(path)
|
||||
}
|
||||
|
||||
|
||||
private var pathPrefix: String {
|
||||
switch type {
|
||||
case .image: return content.settings.paths.imagesOutputFolderPath
|
||||
case .video: return content.settings.paths.videosOutputFolderPath
|
||||
default: return content.settings.paths.filesOutputFolderPath
|
||||
if type.isImage {
|
||||
return content.settings.paths.imagesOutputFolderPath
|
||||
}
|
||||
if type.isVideo {
|
||||
return content.settings.paths.videosOutputFolderPath
|
||||
}
|
||||
if type.isAudio {
|
||||
|
||||
}
|
||||
if type.isAsset {
|
||||
return content.settings.paths.assetsOutputFolderPath
|
||||
}
|
||||
return content.settings.paths.filesOutputFolderPath
|
||||
}
|
||||
|
||||
// MARK: File
|
||||
|
Reference in New Issue
Block a user