Fixed conversion to mp3 command main
This commit is contained in:
parent
f571ee1470
commit
cbfcaccd52
@ -146,10 +146,10 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "commanderMp3ToMp4",
|
||||
"title": "mp3 to mp4",
|
||||
"name": "commanderMp4ToMp3",
|
||||
"title": "mp4 to mp3",
|
||||
"description": "Converts an mp4 into an mp3 using ffmpeg at 320Kbps",
|
||||
"mode": "view",
|
||||
"mode": "no-view",
|
||||
"fallbackText": "test2",
|
||||
"keywords": [
|
||||
"commander",
|
||||
@ -158,7 +158,7 @@
|
||||
],
|
||||
"preferences": [
|
||||
{
|
||||
"name": "name",
|
||||
"name": "mp4ToMp3",
|
||||
"required": false,
|
||||
"type": "textfield",
|
||||
"key": "name",
|
||||
|
@ -39,8 +39,29 @@ export default async function Command(props: any) {
|
||||
return
|
||||
|
||||
}
|
||||
console.log('nik process.argv', process.argv)
|
||||
console.log('nik process.cwd()', process.cwd())
|
||||
// log preferences
|
||||
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 (
|
||||
<List searchBarPlaceholder="Search image transformations...">
|
||||
<List.EmptyView
|
||||
|
Loading…
Reference in New Issue
Block a user