com.github.mmauro94.mkvtoolnix_wrapper.extract.MkvExtractAttachmentExtractionMode.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mkvtoolnix-wrapper Show documentation
Show all versions of mkvtoolnix-wrapper Show documentation
An easy to use light kotlin-jvm wrapper for most common mkvmerge and mkvpropedit CLI commands
The newest version!
package com.github.mmauro94.mkvtoolnix_wrapper.extract
import com.github.mmauro94.mkvtoolnix_wrapper.*
import java.io.File
class MkvExtractAttachmentExtractionMode : MkvExtractExtractionMode {
val tracks: MutableList> = ArrayList()
fun addAttachment(attachment: MkvToolnixAttachment, file: File) {
addAttachmentId(attachment.id, file)
}
fun addAttachmentId(attachmentId: Long, file: File) {
tracks.add(attachmentId to file)
}
override fun commandArgs(): List = ArrayList().apply {
add("attachments")
tracks.forEach {(id,file)->
add("$id:${file.absolutePath}")
}
}
}