Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/record.py
diff options
context:
space:
mode:
authorerikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-11-03 14:39:09 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-11-03 14:39:09 (GMT)
commit6df4d537d5419b900de6022500cad67e6bc14a08 (patch)
tree7b81598eedf4894c6c6fbea0331c9b6c0082708d /record.py
parent7738c7697b8a79203f8316b5b4e5ee1d0448d939 (diff)
cat and split save the day
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@874 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'record.py')
-rwxr-xr-xrecord.py32
1 files changed, 22 insertions, 10 deletions
diff --git a/record.py b/record.py
index 8c80284..d1b96e3 100755
--- a/record.py
+++ b/record.py
@@ -421,6 +421,17 @@ class Record(activity.Activity):
recd.meshUploading = True
filepath = recd.getMediaFilepath()
+
+ if (recd.type == Constants.TYPE_AUDIO):
+ audioImgFilepath = recd.getAudioImageFilepath()
+
+ destPath = os.path.join(Instance.tmpPath, "audioBundle")
+ destPath = utils.getUniqueFilepath(audioBundle, 0)
+ cmd = "cat " + str(filepath) + " " + str(audioImgFilepath) + " > " + str(destPath)
+ self.__class__.log.debug(cmd)
+ os.system(cmd)
+ filepath = destPath
+
sent = self.recTube.broadcastRecd(recd.mediaMd5, filepath, whoWantsIt)
recd.meshUploading = False
#if you were deleted while uploading, now throw away those bits now
@@ -465,17 +476,18 @@ class Record(activity.Activity):
recd.meshDownlodingPercent = 1.0
recd.downloadedFromBuddy = True
if (recd.type == Constants.TYPE_AUDIO):
- self.__class__.log.debug("_recdBitsArrivedCb:TYPE_AUDIO")
- greplay = Greplay()
- greplay.connect("coverart-found", self._getAlbumArtCb, recd )
filepath = recd.getMediaFilepath()
- if (filepath != None):
- if (os.path.exists(filepath)):
- greplay.findAlbumArt(filepath)
- else:
- self.ui.showMeshRecd(recd)
- else:
- self.ui.showMeshRecd(recd)
+ bundlePath = os.path.join(Instance.tmpPath, "audioBundle")
+ bundlePath = utils.getUniqueFilepath(bundlePath, 0)
+
+ cmd = "split -a 1 -b " + str(recd.mediaBytes) + " " + str(filepath) + " " + str(bundlePath)
+ self.__class__.log.debug( cmd )
+ os.system( cmd )
+ bundleName = os.path.basename(bundlePath)
+ recd.mediaFilename = str(bundleName) + "a"
+ recd.audioImageFilename = str(bundleName) + "b"
+
+
else:
self.ui.showMeshRecd( recd )
elif part > numparts: