- make text tracks always a json array
This commit is contained in:
parent
6401bf905d
commit
f62c872353
@ -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)
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user