mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
[New] Action: Remux container
This commit is contained in:
parent
2d41b20eda
commit
2c26bf3692
1 changed files with 38 additions and 0 deletions
38
methods/library/actions/remuxContainer.js
Normal file
38
methods/library/actions/remuxContainer.js
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
|
||||
function remuxContainer(file, container) {
|
||||
|
||||
try {
|
||||
|
||||
|
||||
if (file.container != container) {
|
||||
|
||||
var response = {
|
||||
processFile: true,
|
||||
note:`File is not in ${container} \\n`
|
||||
}
|
||||
return response
|
||||
|
||||
} else {
|
||||
|
||||
var response = {
|
||||
processFile: false,
|
||||
note:`File is already in ${container} \\n`
|
||||
}
|
||||
return response
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
} catch (err) {
|
||||
var response = {
|
||||
processFile: false,
|
||||
note:`library.actions.remuxContainer error: ${err.stack} \\n`
|
||||
}
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module.exports = remuxContainer
|
||||
Loading…
Add table
Add a link
Reference in a new issue