Fixed conversion to mp3 command main
This commit is contained in:
parent
f571ee1470
commit
cbfcaccd52
@ -146,10 +146,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "commanderMp3ToMp4",
|
"name": "commanderMp4ToMp3",
|
||||||
"title": "mp3 to mp4",
|
"title": "mp4 to mp3",
|
||||||
"description": "Converts an mp4 into an mp3 using ffmpeg at 320Kbps",
|
"description": "Converts an mp4 into an mp3 using ffmpeg at 320Kbps",
|
||||||
"mode": "view",
|
"mode": "no-view",
|
||||||
"fallbackText": "test2",
|
"fallbackText": "test2",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"commander",
|
"commander",
|
||||||
@ -158,7 +158,7 @@
|
|||||||
],
|
],
|
||||||
"preferences": [
|
"preferences": [
|
||||||
{
|
{
|
||||||
"name": "name",
|
"name": "mp4ToMp3",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "textfield",
|
"type": "textfield",
|
||||||
"key": "name",
|
"key": "name",
|
||||||
|
@ -39,8 +39,29 @@ export default async function Command(props: any) {
|
|||||||
return
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
console.log('nik process.argv', process.argv)
|
// log preferences
|
||||||
console.log('nik process.cwd()', process.cwd())
|
console.log(preferences)
|
||||||
|
|
||||||
|
if (Object.hasOwnProperty.call(preferences, 'mp4ToMp3')) {
|
||||||
|
|
||||||
|
console.log('here !')
|
||||||
|
|
||||||
|
const selectedFiles = await getSelectedFiles();
|
||||||
|
|
||||||
|
await runOperation({
|
||||||
|
operation: () => any(selectedFiles, 'MP3'),
|
||||||
|
selectedImages: selectedFiles,
|
||||||
|
inProgressMessage: "Conversion in progress...",
|
||||||
|
successMessage: "Converted",
|
||||||
|
failureMessage: "Failed to convert",
|
||||||
|
});
|
||||||
|
|
||||||
|
await showHUD(`🌈 MP4 to MP3 🦄`)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<List searchBarPlaceholder="Search image transformations...">
|
<List searchBarPlaceholder="Search image transformations...">
|
||||||
<List.EmptyView
|
<List.EmptyView
|
||||||
|
Loading…
Reference in New Issue
Block a user