Skip to content

Commit

Permalink
0.4.6
Browse files Browse the repository at this point in the history
AudioPath returns caf file without any conversion
  • Loading branch information
ghawken committed Sep 15, 2019
1 parent f1c2914 commit 34e1079
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion iMessage.indigoPlugin/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>PluginVersion</key>
<string>0.4.5</string>
<string>0.4.6</string>
<key>ServerApiVersion</key>
<string>2.0.0</string>
<key>IwsApiVersion</key>
Expand Down
15 changes: 2 additions & 13 deletions iMessage.indigoPlugin/Contents/Server Plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 34e1079

Please sign in to comment.