From 34e1079fe7cb8edfce4be19b76cc69f1d2f98bac Mon Sep 17 00:00:00 2001 From: ghawken Date: Sun, 15 Sep 2019 11:32:43 +1000 Subject: [PATCH] 0.4.6 AudioPath returns caf file without any conversion --- iMessage.indigoPlugin/Contents/Info.plist | 2 +- .../Contents/Server Plugin/plugin.py | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/iMessage.indigoPlugin/Contents/Info.plist b/iMessage.indigoPlugin/Contents/Info.plist index 2126735..859c6a0 100644 --- a/iMessage.indigoPlugin/Contents/Info.plist +++ b/iMessage.indigoPlugin/Contents/Info.plist @@ -3,7 +3,7 @@ PluginVersion - 0.4.5 + 0.4.6 ServerApiVersion 2.0.0 IwsApiVersion diff --git a/iMessage.indigoPlugin/Contents/Server Plugin/plugin.py b/iMessage.indigoPlugin/Contents/Server Plugin/plugin.py index b61d654..8a358a1 100644 --- a/iMessage.indigoPlugin/Contents/Server Plugin/plugin.py +++ b/iMessage.indigoPlugin/Contents/Server Plugin/plugin.py @@ -685,18 +685,7 @@ def process_getaudiofilepath(self): #also converts to mp3 file_touse = file_touse[-1] # last item in list file_touse = os.path.expanduser(file_touse) self.logger.debug(u'Expanded FilePath:' + unicode(file_touse)) - - ffmpegpath = self.pathtoPlugin + '/ffmpeg/ffmpeg' - mp4fileout = file_touse[:-3] + 'mp3' - - argstopass = '"' + ffmpegpath + '"' + ' -i "' + str(file_touse) + '" -q:a 0 "' + str(mp4fileout) + '"' - p1 = subprocess.Popen([argstopass], shell=True) - - output, err = p1.communicate() - self.logger.debug(unicode(argstopass)) - self.logger.debug('ffmpeg return code:' + unicode(p1.returncode) + ' output:' + unicode( - output) + ' error:' + unicode(err)) - return mp4fileout + return file_touse #self.updateVar('AudioPath', mp4fileout) @@ -728,7 +717,7 @@ def process_convert_audiofile(self): self.logger.debug('ffmpeg return code:' + unicode(p1.returncode) + ' output:' + unicode( output) + ' error:' + unicode(err)) if self.saveVariables: - self.updateVar('AudioPath', mp4fileout) + self.updateVar('AudioPath', file_touse) except Exception as e: self.logger.exception(u'Caught Exception within ffmpeg conversion')