+function getFormatedVideo (videoObj) {
+ const formatedVideo = {
+ id: videoObj._id,
+ name: videoObj.name,
+ description: videoObj.description,
+ podUrl: videoObj.podUrl,
+ isLocal: videos.getVideoState(videoObj).owned,
+ magnetUri: videoObj.magnetUri,
+ author: videoObj.author,
+ duration: videoObj.duration,
+ thumbnailPath: constants.THUMBNAILS_STATIC_PATH + '/' + videoObj.thumbnail
+ }
+
+ return formatedVideo
+}
+
+function getFormatedVideos (videosObj) {
+ const formatedVideos = []
+
+ videosObj.forEach(function (videoObj) {
+ formatedVideos.push(getFormatedVideo(videoObj))
+ })
+
+ return formatedVideos
+}
+