From f62c8723539cb71761b8b328705736f9459192bd Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Fri, 29 Jun 2018 13:42:59 -0700 Subject: [PATCH] - make text tracks always a json array --- .../api2/domain/TextTracks.scala | 19 ++++++++++++++----- .../api2/util/RecMetaXmlHelper.scala | 3 +-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/domain/TextTracks.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/domain/TextTracks.scala index f77c95467d..ad1e4e3a65 100755 --- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/domain/TextTracks.scala +++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/domain/TextTracks.scala @@ -17,11 +17,20 @@ case class UploadedTrackInfo(recordId: String, lang: String, label: String, origFilename: String) -case class Track(kind: String, lang: String, label: String, source: String, href: String) -case class Tracks(tracks: util.ArrayList[Track]) -case class GetRecTextTracksResult(returncode: String, tracks: Tracks) +case class Track(kind: String, + lang: String, + label: String, + source: String, + href: String) +case class GetRecTextTracksResult(returncode: String, + tracks: util.ArrayList[Track]) case class GetRecTextTracksResp(response: GetRecTextTracksResult) -case class GetRecTextTracksResultFailed(returncode: String, messageKey: String, message: String) +case class GetRecTextTracksResultFailed(returncode: String, + messageKey: String, + message: String) case class GetRecTextTracksRespFailed(response: GetRecTextTracksResultFailed) -case class PutRecTextTrackResult(returncode: String, recordId: String, messageKey: String, message: String) +case class PutRecTextTrackResult(returncode: String, + recordId: String, + messageKey: String, + message: String) case class PutRecTextTrackResp(response: PutRecTextTrackResult) \ No newline at end of file diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/util/RecMetaXmlHelper.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/util/RecMetaXmlHelper.scala index 69c071a06b..5c46c8ffce 100755 --- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/util/RecMetaXmlHelper.scala +++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/util/RecMetaXmlHelper.scala @@ -192,8 +192,7 @@ class RecMetaXmlHelper extends RecordingServiceGW with LogHelper { readCaptionJsonFile(captionsFilePath, StandardCharsets.UTF_8) match { case Some(captions) => val ctracks = gson.fromJson(captions, classOf[util.ArrayList[Track]]) - val xtracks = Tracks(ctracks) - val result1 = GetRecTextTracksResult(SUCCESS, xtracks) + val result1 = GetRecTextTracksResult(SUCCESS, ctracks) val response1 = GetRecTextTracksResp(result1) val respText1 = gson.toJson(response1)