Fetch title, description and author from Youtube
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
aabd0f3252
commit
35b62f1e59
|
@ -1,7 +1,7 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.27.1
|
// protoc-gen-go v1.27.1
|
||||||
// protoc v3.17.3
|
// protoc v3.19.1
|
||||||
// source: media_set.proto
|
// source: media_set.proto
|
||||||
|
|
||||||
package media_set
|
package media_set
|
||||||
|
@ -74,6 +74,9 @@ type MediaSet struct {
|
||||||
|
|
||||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
YoutubeId string `protobuf:"bytes,2,opt,name=youtube_id,json=youtubeId,proto3" json:"youtube_id,omitempty"`
|
YoutubeId string `protobuf:"bytes,2,opt,name=youtube_id,json=youtubeId,proto3" json:"youtube_id,omitempty"`
|
||||||
|
Title string `protobuf:"bytes,12,opt,name=title,proto3" json:"title,omitempty"`
|
||||||
|
Description string `protobuf:"bytes,13,opt,name=description,proto3" json:"description,omitempty"`
|
||||||
|
Author string `protobuf:"bytes,14,opt,name=author,proto3" json:"author,omitempty"`
|
||||||
AudioChannels int32 `protobuf:"varint,3,opt,name=audio_channels,json=audioChannels,proto3" json:"audio_channels,omitempty"`
|
AudioChannels int32 `protobuf:"varint,3,opt,name=audio_channels,json=audioChannels,proto3" json:"audio_channels,omitempty"`
|
||||||
AudioApproxFrames int64 `protobuf:"varint,4,opt,name=audio_approx_frames,json=audioApproxFrames,proto3" json:"audio_approx_frames,omitempty"`
|
AudioApproxFrames int64 `protobuf:"varint,4,opt,name=audio_approx_frames,json=audioApproxFrames,proto3" json:"audio_approx_frames,omitempty"`
|
||||||
AudioFrames int64 `protobuf:"varint,5,opt,name=audio_frames,json=audioFrames,proto3" json:"audio_frames,omitempty"`
|
AudioFrames int64 `protobuf:"varint,5,opt,name=audio_frames,json=audioFrames,proto3" json:"audio_frames,omitempty"`
|
||||||
|
@ -131,6 +134,27 @@ func (x *MediaSet) GetYoutubeId() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *MediaSet) GetTitle() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Title
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MediaSet) GetDescription() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Description
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MediaSet) GetAuthor() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Author
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
func (x *MediaSet) GetAudioChannels() int32 {
|
func (x *MediaSet) GetAudioChannels() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.AudioChannels
|
return x.AudioChannels
|
||||||
|
@ -553,8 +577,6 @@ type GetAudioSegmentProgress struct {
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
|
|
||||||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
|
||||||
PercentComplete float32 `protobuf:"fixed32,3,opt,name=percent_complete,json=percentComplete,proto3" json:"percent_complete,omitempty"`
|
PercentComplete float32 `protobuf:"fixed32,3,opt,name=percent_complete,json=percentComplete,proto3" json:"percent_complete,omitempty"`
|
||||||
AudioData []byte `protobuf:"bytes,4,opt,name=audio_data,json=audioData,proto3" json:"audio_data,omitempty"`
|
AudioData []byte `protobuf:"bytes,4,opt,name=audio_data,json=audioData,proto3" json:"audio_data,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -591,20 +613,6 @@ func (*GetAudioSegmentProgress) Descriptor() ([]byte, []int) {
|
||||||
return file_media_set_proto_rawDescGZIP(), []int{7}
|
return file_media_set_proto_rawDescGZIP(), []int{7}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetAudioSegmentProgress) GetMimeType() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.MimeType
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetAudioSegmentProgress) GetMessage() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Message
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetAudioSegmentProgress) GetPercentComplete() float32 {
|
func (x *GetAudioSegmentProgress) GetPercentComplete() float32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.PercentComplete
|
return x.PercentComplete
|
||||||
|
@ -837,11 +845,16 @@ var file_media_set_proto_rawDesc = []byte{
|
||||||
0x0a, 0x0f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
0x0a, 0x0f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x6f, 0x12, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x1a, 0x1e, 0x67, 0x6f,
|
0x6f, 0x12, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x1a, 0x1e, 0x67, 0x6f,
|
||||||
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75,
|
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75,
|
||||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x03, 0x0a,
|
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x04, 0x0a,
|
||||||
0x08, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
0x08, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x79, 0x6f, 0x75,
|
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x79, 0x6f, 0x75,
|
||||||
0x74, 0x75, 0x62, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x79,
|
0x74, 0x75, 0x62, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x79,
|
||||||
0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x75, 0x64, 0x69,
|
0x6f, 0x75, 0x74, 0x75, 0x62, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c,
|
||||||
|
0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20,
|
||||||
|
0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
|
0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x75, 0x64, 0x69,
|
||||||
0x6f, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
0x6f, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x52, 0x0d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12,
|
0x52, 0x0d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12,
|
||||||
0x2e, 0x0a, 0x13, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x5f,
|
0x2e, 0x0a, 0x13, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x5f,
|
||||||
|
@ -901,68 +914,65 @@ var file_media_set_proto_rawDesc = []byte{
|
||||||
0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01,
|
0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01,
|
||||||
0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x41,
|
0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x41,
|
||||||
0x75, 0x64, 0x69, 0x6f, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d,
|
0x75, 0x64, 0x69, 0x6f, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d,
|
||||||
0x61, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53,
|
0x61, 0x74, 0x22, 0x63, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53, 0x65,
|
||||||
0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b,
|
0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a,
|
||||||
0x0a, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x10, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74,
|
||||||
0x09, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d,
|
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74,
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
|
0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x64, 0x69,
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74,
|
0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x61, 0x75,
|
||||||
0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52,
|
0x64, 0x69, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x56, 0x69,
|
||||||
0x0f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65,
|
0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||||
0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4f, 0x0a, 0x10, 0x47, 0x65,
|
||||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x22,
|
0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29,
|
||||||
0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x0a, 0x10, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65,
|
||||||
0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
|
0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e,
|
||||||
0x69, 0x64, 0x22, 0x4f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x72,
|
0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c,
|
||||||
0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x2a, 0x0a, 0x18, 0x47,
|
||||||
0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02,
|
0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c,
|
||||||
0x52, 0x0f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74,
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||||
0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5f, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x56, 0x69,
|
||||||
0x75, 0x72, 0x6c, 0x22, 0x2a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54,
|
0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
|
||||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22,
|
0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69,
|
||||||
0x5f, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62,
|
0x64, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68,
|
||||||
0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05,
|
0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61,
|
0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x2a, 0x1f, 0x0a, 0x0b, 0x41, 0x75, 0x64, 0x69,
|
||||||
0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x6f, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x41, 0x56, 0x10, 0x00,
|
||||||
0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67,
|
0x12, 0x07, 0x0a, 0x03, 0x4d, 0x50, 0x33, 0x10, 0x01, 0x32, 0xfd, 0x03, 0x0a, 0x0f, 0x4d, 0x65,
|
||||||
0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74,
|
0x64, 0x69, 0x61, 0x53, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a,
|
||||||
0x2a, 0x1f, 0x0a, 0x0b, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12,
|
0x03, 0x47, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74,
|
||||||
0x07, 0x0a, 0x03, 0x57, 0x41, 0x56, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x50, 0x33, 0x10,
|
0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6d, 0x65,
|
||||||
0x01, 0x32, 0xfd, 0x03, 0x0a, 0x0f, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65, 0x74, 0x53, 0x65,
|
0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65, 0x74,
|
||||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x6d,
|
0x22, 0x00, 0x12, 0x47, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x65, 0x61, 0x6b, 0x73, 0x12, 0x1a,
|
||||||
0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75,
|
0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65,
|
||||||
0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e,
|
0x61, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x64,
|
||||||
0x4d, 0x65, 0x64, 0x69, 0x61, 0x53, 0x65, 0x74, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x08, 0x47, 0x65,
|
0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x61, 0x6b, 0x73, 0x50,
|
||||||
0x74, 0x50, 0x65, 0x61, 0x6b, 0x73, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73,
|
0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x00, 0x30, 0x01, 0x12, 0x63, 0x0a, 0x12, 0x47,
|
||||||
0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x61, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x65, 0x74, 0x50, 0x65, 0x61, 0x6b, 0x73, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e,
|
||||||
0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47,
|
0x74, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65,
|
||||||
0x65, 0x74, 0x50, 0x65, 0x61, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22,
|
0x74, 0x50, 0x65, 0x61, 0x6b, 0x73, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74,
|
||||||
0x00, 0x30, 0x01, 0x12, 0x63, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x65, 0x61, 0x6b, 0x73, 0x46,
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f,
|
||||||
0x6f, 0x72, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69,
|
0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x61, 0x6b, 0x73, 0x46, 0x6f, 0x72, 0x53,
|
||||||
0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x61, 0x6b, 0x73, 0x46, 0x6f,
|
0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||||
0x72, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
0x12, 0x5c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53, 0x65, 0x67, 0x6d,
|
||||||
0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50,
|
0x65, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e,
|
||||||
0x65, 0x61, 0x6b, 0x73, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65,
|
0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52,
|
||||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73,
|
||||||
0x75, 0x64, 0x69, 0x6f, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x6d, 0x65,
|
0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53, 0x65, 0x67, 0x6d, 0x65,
|
||||||
0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f,
|
0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x00, 0x30, 0x01, 0x12, 0x47,
|
||||||
0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22,
|
0x0a, 0x08, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x64,
|
||||||
0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75,
|
0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52,
|
||||||
0x64, 0x69, 0x6f, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73,
|
||||||
0x73, 0x73, 0x22, 0x00, 0x30, 0x01, 0x12, 0x47, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64,
|
0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x72, 0x6f, 0x67, 0x72,
|
||||||
0x65, 0x6f, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47,
|
0x65, 0x73, 0x73, 0x22, 0x00, 0x30, 0x01, 0x12, 0x60, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x69,
|
||||||
0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b,
|
0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x12, 0x23, 0x2e, 0x6d,
|
||||||
0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x69,
|
0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65,
|
||||||
0x64, 0x65, 0x6f, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x00, 0x30, 0x01, 0x12,
|
0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x60, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62,
|
0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65,
|
||||||
0x6e, 0x61, 0x69, 0x6c, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74,
|
0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52,
|
||||||
0x2e, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61,
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0e, 0x5a, 0x0c, 0x70, 0x62, 0x2f,
|
||||||
0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69,
|
0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x61, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x68,
|
0x33,
|
||||||
0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
|
||||||
0x00, 0x42, 0x0e, 0x5a, 0x0c, 0x70, 0x62, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x73, 0x65,
|
|
||||||
0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -36,4 +36,7 @@ type MediaSet struct {
|
||||||
VideoContentLength int64
|
VideoContentLength int64
|
||||||
AudioEncodedS3Key sql.NullString
|
AudioEncodedS3Key sql.NullString
|
||||||
AudioEncodedS3UploadedAt sql.NullTime
|
AudioEncodedS3UploadedAt sql.NullTime
|
||||||
|
Title string
|
||||||
|
Description string
|
||||||
|
Author string
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,13 +11,16 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const createMediaSet = `-- name: CreateMediaSet :one
|
const createMediaSet = `-- name: CreateMediaSet :one
|
||||||
INSERT INTO media_sets (youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_sample_rate, audio_content_length, audio_encoded_mime_type, video_youtube_itag, video_content_length, video_mime_type, video_duration_nanos, created_at, updated_at)
|
INSERT INTO media_sets (youtube_id, title, description, author, audio_youtube_itag, audio_channels, audio_frames_approx, audio_sample_rate, audio_content_length, audio_encoded_mime_type, video_youtube_itag, video_content_length, video_mime_type, video_duration_nanos, created_at, updated_at)
|
||||||
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, NOW(), NOW())
|
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, NOW(), NOW())
|
||||||
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at
|
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at, title, description, author
|
||||||
`
|
`
|
||||||
|
|
||||||
type CreateMediaSetParams struct {
|
type CreateMediaSetParams struct {
|
||||||
YoutubeID string
|
YoutubeID string
|
||||||
|
Title string
|
||||||
|
Description string
|
||||||
|
Author string
|
||||||
AudioYoutubeItag int32
|
AudioYoutubeItag int32
|
||||||
AudioChannels int32
|
AudioChannels int32
|
||||||
AudioFramesApprox int64
|
AudioFramesApprox int64
|
||||||
|
@ -33,6 +36,9 @@ type CreateMediaSetParams struct {
|
||||||
func (q *Queries) CreateMediaSet(ctx context.Context, arg CreateMediaSetParams) (MediaSet, error) {
|
func (q *Queries) CreateMediaSet(ctx context.Context, arg CreateMediaSetParams) (MediaSet, error) {
|
||||||
row := q.db.QueryRow(ctx, createMediaSet,
|
row := q.db.QueryRow(ctx, createMediaSet,
|
||||||
arg.YoutubeID,
|
arg.YoutubeID,
|
||||||
|
arg.Title,
|
||||||
|
arg.Description,
|
||||||
|
arg.Author,
|
||||||
arg.AudioYoutubeItag,
|
arg.AudioYoutubeItag,
|
||||||
arg.AudioChannels,
|
arg.AudioChannels,
|
||||||
arg.AudioFramesApprox,
|
arg.AudioFramesApprox,
|
||||||
|
@ -72,12 +78,15 @@ func (q *Queries) CreateMediaSet(ctx context.Context, arg CreateMediaSetParams)
|
||||||
&i.VideoContentLength,
|
&i.VideoContentLength,
|
||||||
&i.AudioEncodedS3Key,
|
&i.AudioEncodedS3Key,
|
||||||
&i.AudioEncodedS3UploadedAt,
|
&i.AudioEncodedS3UploadedAt,
|
||||||
|
&i.Title,
|
||||||
|
&i.Description,
|
||||||
|
&i.Author,
|
||||||
)
|
)
|
||||||
return i, err
|
return i, err
|
||||||
}
|
}
|
||||||
|
|
||||||
const getMediaSet = `-- name: GetMediaSet :one
|
const getMediaSet = `-- name: GetMediaSet :one
|
||||||
SELECT id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at FROM media_sets WHERE id = $1
|
SELECT id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at, title, description, author FROM media_sets WHERE id = $1
|
||||||
`
|
`
|
||||||
|
|
||||||
func (q *Queries) GetMediaSet(ctx context.Context, id uuid.UUID) (MediaSet, error) {
|
func (q *Queries) GetMediaSet(ctx context.Context, id uuid.UUID) (MediaSet, error) {
|
||||||
|
@ -110,12 +119,15 @@ func (q *Queries) GetMediaSet(ctx context.Context, id uuid.UUID) (MediaSet, erro
|
||||||
&i.VideoContentLength,
|
&i.VideoContentLength,
|
||||||
&i.AudioEncodedS3Key,
|
&i.AudioEncodedS3Key,
|
||||||
&i.AudioEncodedS3UploadedAt,
|
&i.AudioEncodedS3UploadedAt,
|
||||||
|
&i.Title,
|
||||||
|
&i.Description,
|
||||||
|
&i.Author,
|
||||||
)
|
)
|
||||||
return i, err
|
return i, err
|
||||||
}
|
}
|
||||||
|
|
||||||
const getMediaSetByYoutubeID = `-- name: GetMediaSetByYoutubeID :one
|
const getMediaSetByYoutubeID = `-- name: GetMediaSetByYoutubeID :one
|
||||||
SELECT id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at FROM media_sets WHERE youtube_id = $1
|
SELECT id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at, title, description, author FROM media_sets WHERE youtube_id = $1
|
||||||
`
|
`
|
||||||
|
|
||||||
func (q *Queries) GetMediaSetByYoutubeID(ctx context.Context, youtubeID string) (MediaSet, error) {
|
func (q *Queries) GetMediaSetByYoutubeID(ctx context.Context, youtubeID string) (MediaSet, error) {
|
||||||
|
@ -148,6 +160,9 @@ func (q *Queries) GetMediaSetByYoutubeID(ctx context.Context, youtubeID string)
|
||||||
&i.VideoContentLength,
|
&i.VideoContentLength,
|
||||||
&i.AudioEncodedS3Key,
|
&i.AudioEncodedS3Key,
|
||||||
&i.AudioEncodedS3UploadedAt,
|
&i.AudioEncodedS3UploadedAt,
|
||||||
|
&i.Title,
|
||||||
|
&i.Description,
|
||||||
|
&i.Author,
|
||||||
)
|
)
|
||||||
return i, err
|
return i, err
|
||||||
}
|
}
|
||||||
|
@ -156,7 +171,7 @@ const setEncodedAudioUploaded = `-- name: SetEncodedAudioUploaded :one
|
||||||
UPDATE media_sets
|
UPDATE media_sets
|
||||||
SET audio_encoded_s3_key = $2, audio_encoded_s3_uploaded_at = NOW(), updated_at = NOW()
|
SET audio_encoded_s3_key = $2, audio_encoded_s3_uploaded_at = NOW(), updated_at = NOW()
|
||||||
WHERE id = $1
|
WHERE id = $1
|
||||||
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at
|
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at, title, description, author
|
||||||
`
|
`
|
||||||
|
|
||||||
type SetEncodedAudioUploadedParams struct {
|
type SetEncodedAudioUploadedParams struct {
|
||||||
|
@ -194,6 +209,9 @@ func (q *Queries) SetEncodedAudioUploaded(ctx context.Context, arg SetEncodedAud
|
||||||
&i.VideoContentLength,
|
&i.VideoContentLength,
|
||||||
&i.AudioEncodedS3Key,
|
&i.AudioEncodedS3Key,
|
||||||
&i.AudioEncodedS3UploadedAt,
|
&i.AudioEncodedS3UploadedAt,
|
||||||
|
&i.Title,
|
||||||
|
&i.Description,
|
||||||
|
&i.Author,
|
||||||
)
|
)
|
||||||
return i, err
|
return i, err
|
||||||
}
|
}
|
||||||
|
@ -202,7 +220,7 @@ const setRawAudioUploaded = `-- name: SetRawAudioUploaded :one
|
||||||
UPDATE media_sets
|
UPDATE media_sets
|
||||||
SET audio_raw_s3_key = $2, audio_frames = $3, audio_raw_s3_uploaded_at = NOW(), updated_at = NOW()
|
SET audio_raw_s3_key = $2, audio_frames = $3, audio_raw_s3_uploaded_at = NOW(), updated_at = NOW()
|
||||||
WHERE id = $1
|
WHERE id = $1
|
||||||
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at
|
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at, title, description, author
|
||||||
`
|
`
|
||||||
|
|
||||||
type SetRawAudioUploadedParams struct {
|
type SetRawAudioUploadedParams struct {
|
||||||
|
@ -241,6 +259,9 @@ func (q *Queries) SetRawAudioUploaded(ctx context.Context, arg SetRawAudioUpload
|
||||||
&i.VideoContentLength,
|
&i.VideoContentLength,
|
||||||
&i.AudioEncodedS3Key,
|
&i.AudioEncodedS3Key,
|
||||||
&i.AudioEncodedS3UploadedAt,
|
&i.AudioEncodedS3UploadedAt,
|
||||||
|
&i.Title,
|
||||||
|
&i.Description,
|
||||||
|
&i.Author,
|
||||||
)
|
)
|
||||||
return i, err
|
return i, err
|
||||||
}
|
}
|
||||||
|
@ -249,7 +270,7 @@ const setVideoThumbnailUploaded = `-- name: SetVideoThumbnailUploaded :one
|
||||||
UPDATE media_sets
|
UPDATE media_sets
|
||||||
SET video_thumbnail_width = $2, video_thumbnail_height = $3, video_thumbnail_mime_type = $4, video_thumbnail_s3_key = $5, video_thumbnail_s3_uploaded_at = NOW(), updated_at = NOW()
|
SET video_thumbnail_width = $2, video_thumbnail_height = $3, video_thumbnail_mime_type = $4, video_thumbnail_s3_key = $5, video_thumbnail_s3_uploaded_at = NOW(), updated_at = NOW()
|
||||||
WHERE id = $1
|
WHERE id = $1
|
||||||
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at
|
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at, title, description, author
|
||||||
`
|
`
|
||||||
|
|
||||||
type SetVideoThumbnailUploadedParams struct {
|
type SetVideoThumbnailUploadedParams struct {
|
||||||
|
@ -296,6 +317,9 @@ func (q *Queries) SetVideoThumbnailUploaded(ctx context.Context, arg SetVideoThu
|
||||||
&i.VideoContentLength,
|
&i.VideoContentLength,
|
||||||
&i.AudioEncodedS3Key,
|
&i.AudioEncodedS3Key,
|
||||||
&i.AudioEncodedS3UploadedAt,
|
&i.AudioEncodedS3UploadedAt,
|
||||||
|
&i.Title,
|
||||||
|
&i.Description,
|
||||||
|
&i.Author,
|
||||||
)
|
)
|
||||||
return i, err
|
return i, err
|
||||||
}
|
}
|
||||||
|
@ -304,7 +328,7 @@ const setVideoUploaded = `-- name: SetVideoUploaded :one
|
||||||
UPDATE media_sets
|
UPDATE media_sets
|
||||||
SET video_s3_key = $2, video_s3_uploaded_at = NOW(), updated_at = NOW()
|
SET video_s3_key = $2, video_s3_uploaded_at = NOW(), updated_at = NOW()
|
||||||
WHERE id = $1
|
WHERE id = $1
|
||||||
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at
|
RETURNING id, youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_frames, audio_sample_rate, audio_raw_s3_key, audio_raw_s3_uploaded_at, audio_encoded_mime_type, video_youtube_itag, video_s3_key, video_s3_uploaded_at, video_mime_type, video_duration_nanos, video_thumbnail_s3_key, video_thumbnail_s3_uploaded_at, video_thumbnail_mime_type, video_thumbnail_width, video_thumbnail_height, created_at, updated_at, audio_content_length, video_content_length, audio_encoded_s3_key, audio_encoded_s3_uploaded_at, title, description, author
|
||||||
`
|
`
|
||||||
|
|
||||||
type SetVideoUploadedParams struct {
|
type SetVideoUploadedParams struct {
|
||||||
|
@ -342,6 +366,9 @@ func (q *Queries) SetVideoUploaded(ctx context.Context, arg SetVideoUploadedPara
|
||||||
&i.VideoContentLength,
|
&i.VideoContentLength,
|
||||||
&i.AudioEncodedS3Key,
|
&i.AudioEncodedS3Key,
|
||||||
&i.AudioEncodedS3UploadedAt,
|
&i.AudioEncodedS3UploadedAt,
|
||||||
|
&i.Title,
|
||||||
|
&i.Description,
|
||||||
|
&i.Author,
|
||||||
)
|
)
|
||||||
return i, err
|
return i, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.netflux.io/rob/clipper/config"
|
"git.netflux.io/rob/clipper/config"
|
||||||
|
@ -100,6 +101,9 @@ func (s *MediaSetService) createMediaSet(ctx context.Context, youtubeID string)
|
||||||
|
|
||||||
storeParams := store.CreateMediaSetParams{
|
storeParams := store.CreateMediaSetParams{
|
||||||
YoutubeID: youtubeID,
|
YoutubeID: youtubeID,
|
||||||
|
Title: strings.TrimSpace(video.Title),
|
||||||
|
Description: strings.TrimSpace(video.Description),
|
||||||
|
Author: strings.TrimSpace(video.Author),
|
||||||
AudioYoutubeItag: int32(audioMetadata.YoutubeItag),
|
AudioYoutubeItag: int32(audioMetadata.YoutubeItag),
|
||||||
AudioChannels: int32(audioMetadata.Channels),
|
AudioChannels: int32(audioMetadata.Channels),
|
||||||
AudioFramesApprox: audioMetadata.ApproxFrames,
|
AudioFramesApprox: audioMetadata.ApproxFrames,
|
||||||
|
@ -119,6 +123,9 @@ func (s *MediaSetService) createMediaSet(ctx context.Context, youtubeID string)
|
||||||
return &MediaSet{
|
return &MediaSet{
|
||||||
ID: mediaSet.ID,
|
ID: mediaSet.ID,
|
||||||
YoutubeID: youtubeID,
|
YoutubeID: youtubeID,
|
||||||
|
Title: mediaSet.Title,
|
||||||
|
Description: mediaSet.Description,
|
||||||
|
Author: mediaSet.Author,
|
||||||
Audio: audioMetadata,
|
Audio: audioMetadata,
|
||||||
Video: videoMetadata,
|
Video: videoMetadata,
|
||||||
}, nil
|
}, nil
|
||||||
|
@ -137,6 +144,9 @@ func (s *MediaSetService) findMediaSet(ctx context.Context, youtubeID string) (*
|
||||||
return &MediaSet{
|
return &MediaSet{
|
||||||
ID: mediaSet.ID,
|
ID: mediaSet.ID,
|
||||||
YoutubeID: mediaSet.YoutubeID,
|
YoutubeID: mediaSet.YoutubeID,
|
||||||
|
Title: mediaSet.Title,
|
||||||
|
Description: mediaSet.Description,
|
||||||
|
Author: mediaSet.Author,
|
||||||
Audio: Audio{
|
Audio: Audio{
|
||||||
YoutubeItag: int(mediaSet.AudioYoutubeItag),
|
YoutubeItag: int(mediaSet.AudioYoutubeItag),
|
||||||
ContentLength: mediaSet.AudioContentLength,
|
ContentLength: mediaSet.AudioContentLength,
|
||||||
|
|
|
@ -24,6 +24,7 @@ type MediaSet struct {
|
||||||
Video Video
|
Video Video
|
||||||
ID uuid.UUID
|
ID uuid.UUID
|
||||||
YoutubeID string
|
YoutubeID string
|
||||||
|
Title, Description, Author string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Audio contains the metadata for the audio part of the media set.
|
// Audio contains the metadata for the audio part of the media set.
|
||||||
|
|
|
@ -31,6 +31,9 @@ func (c *mediaSetServiceController) Get(ctx context.Context, request *pbmediaset
|
||||||
|
|
||||||
result := pbmediaset.MediaSet{
|
result := pbmediaset.MediaSet{
|
||||||
Id: mediaSet.ID.String(),
|
Id: mediaSet.ID.String(),
|
||||||
|
Title: mediaSet.Title,
|
||||||
|
Description: mediaSet.Description,
|
||||||
|
Author: mediaSet.Author,
|
||||||
YoutubeId: mediaSet.YoutubeID,
|
YoutubeId: mediaSet.YoutubeID,
|
||||||
AudioChannels: int32(mediaSet.Audio.Channels),
|
AudioChannels: int32(mediaSet.Audio.Channels),
|
||||||
AudioFrames: mediaSet.Audio.Frames,
|
AudioFrames: mediaSet.Audio.Frames,
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
ALTER TABLE media_sets DROP COLUMN title;
|
||||||
|
ALTER TABLE media_sets DROP COLUMN description;
|
||||||
|
ALTER TABLE media_sets DROP COLUMN author;
|
|
@ -0,0 +1,5 @@
|
||||||
|
ALTER TABLE media_sets ADD COLUMN title CHARACTER VARYING(256) NOT NULL DEFAULT '';
|
||||||
|
ALTER TABLE media_sets ADD COLUMN description text NOT NULL DEFAULT '';
|
||||||
|
ALTER TABLE media_sets ADD COLUMN author CHARACTER VARYING(256) NOT NULL DEFAULT '';
|
||||||
|
|
||||||
|
ALTER TABLE media_sets ADD CONSTRAINT check_description_length CHECK (LENGTH(description) <= 4096);
|
|
@ -5,8 +5,8 @@ SELECT * FROM media_sets WHERE id = $1;
|
||||||
SELECT * FROM media_sets WHERE youtube_id = $1;
|
SELECT * FROM media_sets WHERE youtube_id = $1;
|
||||||
|
|
||||||
-- name: CreateMediaSet :one
|
-- name: CreateMediaSet :one
|
||||||
INSERT INTO media_sets (youtube_id, audio_youtube_itag, audio_channels, audio_frames_approx, audio_sample_rate, audio_content_length, audio_encoded_mime_type, video_youtube_itag, video_content_length, video_mime_type, video_duration_nanos, created_at, updated_at)
|
INSERT INTO media_sets (youtube_id, title, description, author, audio_youtube_itag, audio_channels, audio_frames_approx, audio_sample_rate, audio_content_length, audio_encoded_mime_type, video_youtube_itag, video_content_length, video_mime_type, video_duration_nanos, created_at, updated_at)
|
||||||
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, NOW(), NOW())
|
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, NOW(), NOW())
|
||||||
RETURNING *;
|
RETURNING *;
|
||||||
|
|
||||||
-- name: SetRawAudioUploaded :one
|
-- name: SetRawAudioUploaded :one
|
||||||
|
|
|
@ -44,6 +44,9 @@ export function audioFormatToJSON(object: AudioFormat): string {
|
||||||
export interface MediaSet {
|
export interface MediaSet {
|
||||||
id: string;
|
id: string;
|
||||||
youtubeId: string;
|
youtubeId: string;
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
author: string;
|
||||||
audioChannels: number;
|
audioChannels: number;
|
||||||
audioApproxFrames: number;
|
audioApproxFrames: number;
|
||||||
audioFrames: number;
|
audioFrames: number;
|
||||||
|
@ -89,8 +92,6 @@ export interface GetAudioSegmentRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetAudioSegmentProgress {
|
export interface GetAudioSegmentProgress {
|
||||||
mimeType: string;
|
|
||||||
message: string;
|
|
||||||
percentComplete: number;
|
percentComplete: number;
|
||||||
audioData: Uint8Array;
|
audioData: Uint8Array;
|
||||||
}
|
}
|
||||||
|
@ -117,6 +118,9 @@ export interface GetVideoThumbnailResponse {
|
||||||
const baseMediaSet: object = {
|
const baseMediaSet: object = {
|
||||||
id: "",
|
id: "",
|
||||||
youtubeId: "",
|
youtubeId: "",
|
||||||
|
title: "",
|
||||||
|
description: "",
|
||||||
|
author: "",
|
||||||
audioChannels: 0,
|
audioChannels: 0,
|
||||||
audioApproxFrames: 0,
|
audioApproxFrames: 0,
|
||||||
audioFrames: 0,
|
audioFrames: 0,
|
||||||
|
@ -138,6 +142,15 @@ export const MediaSet = {
|
||||||
if (message.youtubeId !== "") {
|
if (message.youtubeId !== "") {
|
||||||
writer.uint32(18).string(message.youtubeId);
|
writer.uint32(18).string(message.youtubeId);
|
||||||
}
|
}
|
||||||
|
if (message.title !== "") {
|
||||||
|
writer.uint32(98).string(message.title);
|
||||||
|
}
|
||||||
|
if (message.description !== "") {
|
||||||
|
writer.uint32(106).string(message.description);
|
||||||
|
}
|
||||||
|
if (message.author !== "") {
|
||||||
|
writer.uint32(114).string(message.author);
|
||||||
|
}
|
||||||
if (message.audioChannels !== 0) {
|
if (message.audioChannels !== 0) {
|
||||||
writer.uint32(24).int32(message.audioChannels);
|
writer.uint32(24).int32(message.audioChannels);
|
||||||
}
|
}
|
||||||
|
@ -181,6 +194,15 @@ export const MediaSet = {
|
||||||
case 2:
|
case 2:
|
||||||
message.youtubeId = reader.string();
|
message.youtubeId = reader.string();
|
||||||
break;
|
break;
|
||||||
|
case 12:
|
||||||
|
message.title = reader.string();
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
message.description = reader.string();
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
message.author = reader.string();
|
||||||
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
message.audioChannels = reader.int32();
|
message.audioChannels = reader.int32();
|
||||||
break;
|
break;
|
||||||
|
@ -224,6 +246,18 @@ export const MediaSet = {
|
||||||
object.youtubeId !== undefined && object.youtubeId !== null
|
object.youtubeId !== undefined && object.youtubeId !== null
|
||||||
? String(object.youtubeId)
|
? String(object.youtubeId)
|
||||||
: "";
|
: "";
|
||||||
|
message.title =
|
||||||
|
object.title !== undefined && object.title !== null
|
||||||
|
? String(object.title)
|
||||||
|
: "";
|
||||||
|
message.description =
|
||||||
|
object.description !== undefined && object.description !== null
|
||||||
|
? String(object.description)
|
||||||
|
: "";
|
||||||
|
message.author =
|
||||||
|
object.author !== undefined && object.author !== null
|
||||||
|
? String(object.author)
|
||||||
|
: "";
|
||||||
message.audioChannels =
|
message.audioChannels =
|
||||||
object.audioChannels !== undefined && object.audioChannels !== null
|
object.audioChannels !== undefined && object.audioChannels !== null
|
||||||
? Number(object.audioChannels)
|
? Number(object.audioChannels)
|
||||||
|
@ -268,6 +302,10 @@ export const MediaSet = {
|
||||||
const obj: any = {};
|
const obj: any = {};
|
||||||
message.id !== undefined && (obj.id = message.id);
|
message.id !== undefined && (obj.id = message.id);
|
||||||
message.youtubeId !== undefined && (obj.youtubeId = message.youtubeId);
|
message.youtubeId !== undefined && (obj.youtubeId = message.youtubeId);
|
||||||
|
message.title !== undefined && (obj.title = message.title);
|
||||||
|
message.description !== undefined &&
|
||||||
|
(obj.description = message.description);
|
||||||
|
message.author !== undefined && (obj.author = message.author);
|
||||||
message.audioChannels !== undefined &&
|
message.audioChannels !== undefined &&
|
||||||
(obj.audioChannels = message.audioChannels);
|
(obj.audioChannels = message.audioChannels);
|
||||||
message.audioApproxFrames !== undefined &&
|
message.audioApproxFrames !== undefined &&
|
||||||
|
@ -295,6 +333,9 @@ export const MediaSet = {
|
||||||
const message = { ...baseMediaSet } as MediaSet;
|
const message = { ...baseMediaSet } as MediaSet;
|
||||||
message.id = object.id ?? "";
|
message.id = object.id ?? "";
|
||||||
message.youtubeId = object.youtubeId ?? "";
|
message.youtubeId = object.youtubeId ?? "";
|
||||||
|
message.title = object.title ?? "";
|
||||||
|
message.description = object.description ?? "";
|
||||||
|
message.author = object.author ?? "";
|
||||||
message.audioChannels = object.audioChannels ?? 0;
|
message.audioChannels = object.audioChannels ?? 0;
|
||||||
message.audioApproxFrames = object.audioApproxFrames ?? 0;
|
message.audioApproxFrames = object.audioApproxFrames ?? 0;
|
||||||
message.audioFrames = object.audioFrames ?? 0;
|
message.audioFrames = object.audioFrames ?? 0;
|
||||||
|
@ -796,23 +837,13 @@ export const GetAudioSegmentRequest = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const baseGetAudioSegmentProgress: object = {
|
const baseGetAudioSegmentProgress: object = { percentComplete: 0 };
|
||||||
mimeType: "",
|
|
||||||
message: "",
|
|
||||||
percentComplete: 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
export const GetAudioSegmentProgress = {
|
export const GetAudioSegmentProgress = {
|
||||||
encode(
|
encode(
|
||||||
message: GetAudioSegmentProgress,
|
message: GetAudioSegmentProgress,
|
||||||
writer: _m0.Writer = _m0.Writer.create()
|
writer: _m0.Writer = _m0.Writer.create()
|
||||||
): _m0.Writer {
|
): _m0.Writer {
|
||||||
if (message.mimeType !== "") {
|
|
||||||
writer.uint32(10).string(message.mimeType);
|
|
||||||
}
|
|
||||||
if (message.message !== "") {
|
|
||||||
writer.uint32(18).string(message.message);
|
|
||||||
}
|
|
||||||
if (message.percentComplete !== 0) {
|
if (message.percentComplete !== 0) {
|
||||||
writer.uint32(29).float(message.percentComplete);
|
writer.uint32(29).float(message.percentComplete);
|
||||||
}
|
}
|
||||||
|
@ -835,12 +866,6 @@ export const GetAudioSegmentProgress = {
|
||||||
while (reader.pos < end) {
|
while (reader.pos < end) {
|
||||||
const tag = reader.uint32();
|
const tag = reader.uint32();
|
||||||
switch (tag >>> 3) {
|
switch (tag >>> 3) {
|
||||||
case 1:
|
|
||||||
message.mimeType = reader.string();
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
message.message = reader.string();
|
|
||||||
break;
|
|
||||||
case 3:
|
case 3:
|
||||||
message.percentComplete = reader.float();
|
message.percentComplete = reader.float();
|
||||||
break;
|
break;
|
||||||
|
@ -859,14 +884,6 @@ export const GetAudioSegmentProgress = {
|
||||||
const message = {
|
const message = {
|
||||||
...baseGetAudioSegmentProgress,
|
...baseGetAudioSegmentProgress,
|
||||||
} as GetAudioSegmentProgress;
|
} as GetAudioSegmentProgress;
|
||||||
message.mimeType =
|
|
||||||
object.mimeType !== undefined && object.mimeType !== null
|
|
||||||
? String(object.mimeType)
|
|
||||||
: "";
|
|
||||||
message.message =
|
|
||||||
object.message !== undefined && object.message !== null
|
|
||||||
? String(object.message)
|
|
||||||
: "";
|
|
||||||
message.percentComplete =
|
message.percentComplete =
|
||||||
object.percentComplete !== undefined && object.percentComplete !== null
|
object.percentComplete !== undefined && object.percentComplete !== null
|
||||||
? Number(object.percentComplete)
|
? Number(object.percentComplete)
|
||||||
|
@ -880,8 +897,6 @@ export const GetAudioSegmentProgress = {
|
||||||
|
|
||||||
toJSON(message: GetAudioSegmentProgress): unknown {
|
toJSON(message: GetAudioSegmentProgress): unknown {
|
||||||
const obj: any = {};
|
const obj: any = {};
|
||||||
message.mimeType !== undefined && (obj.mimeType = message.mimeType);
|
|
||||||
message.message !== undefined && (obj.message = message.message);
|
|
||||||
message.percentComplete !== undefined &&
|
message.percentComplete !== undefined &&
|
||||||
(obj.percentComplete = message.percentComplete);
|
(obj.percentComplete = message.percentComplete);
|
||||||
message.audioData !== undefined &&
|
message.audioData !== undefined &&
|
||||||
|
@ -897,8 +912,6 @@ export const GetAudioSegmentProgress = {
|
||||||
const message = {
|
const message = {
|
||||||
...baseGetAudioSegmentProgress,
|
...baseGetAudioSegmentProgress,
|
||||||
} as GetAudioSegmentProgress;
|
} as GetAudioSegmentProgress;
|
||||||
message.mimeType = object.mimeType ?? "";
|
|
||||||
message.message = object.message ?? "";
|
|
||||||
message.percentComplete = object.percentComplete ?? 0;
|
message.percentComplete = object.percentComplete ?? 0;
|
||||||
message.audioData = object.audioData ?? new Uint8Array();
|
message.audioData = object.audioData ?? new Uint8Array();
|
||||||
return message;
|
return message;
|
||||||
|
|
|
@ -13,7 +13,13 @@
|
||||||
|
|
||||||
var jspb = require('google-protobuf');
|
var jspb = require('google-protobuf');
|
||||||
var goog = jspb;
|
var goog = jspb;
|
||||||
var global = Function('return this')();
|
var global = (function() {
|
||||||
|
if (this) { return this; }
|
||||||
|
if (typeof window !== 'undefined') { return window; }
|
||||||
|
if (typeof global !== 'undefined') { return global; }
|
||||||
|
if (typeof self !== 'undefined') { return self; }
|
||||||
|
return Function('return this')();
|
||||||
|
}.call(null));
|
||||||
|
|
||||||
var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
|
var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
|
||||||
goog.object.extend(proto, google_protobuf_duration_pb);
|
goog.object.extend(proto, google_protobuf_duration_pb);
|
||||||
|
@ -316,6 +322,9 @@ proto.media_set.MediaSet.toObject = function(includeInstance, msg) {
|
||||||
var f, obj = {
|
var f, obj = {
|
||||||
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||||
youtubeId: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
youtubeId: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||||
|
title: jspb.Message.getFieldWithDefault(msg, 12, ""),
|
||||||
|
description: jspb.Message.getFieldWithDefault(msg, 13, ""),
|
||||||
|
author: jspb.Message.getFieldWithDefault(msg, 14, ""),
|
||||||
audioChannels: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
audioChannels: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
||||||
audioApproxFrames: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
audioApproxFrames: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
||||||
audioFrames: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
audioFrames: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
||||||
|
@ -369,6 +378,18 @@ proto.media_set.MediaSet.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
var value = /** @type {string} */ (reader.readString());
|
var value = /** @type {string} */ (reader.readString());
|
||||||
msg.setYoutubeId(value);
|
msg.setYoutubeId(value);
|
||||||
break;
|
break;
|
||||||
|
case 12:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setTitle(value);
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setDescription(value);
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setAuthor(value);
|
||||||
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
var value = /** @type {number} */ (reader.readInt32());
|
var value = /** @type {number} */ (reader.readInt32());
|
||||||
msg.setAudioChannels(value);
|
msg.setAudioChannels(value);
|
||||||
|
@ -449,6 +470,27 @@ proto.media_set.MediaSet.serializeBinaryToWriter = function(message, writer) {
|
||||||
f
|
f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
f = message.getTitle();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
12,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getDescription();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
13,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getAuthor();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
14,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
f = message.getAudioChannels();
|
f = message.getAudioChannels();
|
||||||
if (f !== 0) {
|
if (f !== 0) {
|
||||||
writer.writeInt32(
|
writer.writeInt32(
|
||||||
|
@ -552,6 +594,60 @@ proto.media_set.MediaSet.prototype.setYoutubeId = function(value) {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string title = 12;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.media_set.MediaSet.prototype.getTitle = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.media_set.MediaSet} returns this
|
||||||
|
*/
|
||||||
|
proto.media_set.MediaSet.prototype.setTitle = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 12, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string description = 13;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.media_set.MediaSet.prototype.getDescription = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.media_set.MediaSet} returns this
|
||||||
|
*/
|
||||||
|
proto.media_set.MediaSet.prototype.setDescription = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 13, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string author = 14;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.media_set.MediaSet.prototype.getAuthor = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.media_set.MediaSet} returns this
|
||||||
|
*/
|
||||||
|
proto.media_set.MediaSet.prototype.setAuthor = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 14, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional int32 audio_channels = 3;
|
* optional int32 audio_channels = 3;
|
||||||
* @return {number}
|
* @return {number}
|
||||||
|
@ -1871,8 +1967,6 @@ proto.media_set.GetAudioSegmentProgress.prototype.toObject = function(opt_includ
|
||||||
*/
|
*/
|
||||||
proto.media_set.GetAudioSegmentProgress.toObject = function(includeInstance, msg) {
|
proto.media_set.GetAudioSegmentProgress.toObject = function(includeInstance, msg) {
|
||||||
var f, obj = {
|
var f, obj = {
|
||||||
mimeType: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
||||||
message: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
||||||
percentComplete: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
|
percentComplete: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
|
||||||
audioData: msg.getAudioData_asB64()
|
audioData: msg.getAudioData_asB64()
|
||||||
};
|
};
|
||||||
|
@ -1911,14 +2005,6 @@ proto.media_set.GetAudioSegmentProgress.deserializeBinaryFromReader = function(m
|
||||||
}
|
}
|
||||||
var field = reader.getFieldNumber();
|
var field = reader.getFieldNumber();
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case 1:
|
|
||||||
var value = /** @type {string} */ (reader.readString());
|
|
||||||
msg.setMimeType(value);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
var value = /** @type {string} */ (reader.readString());
|
|
||||||
msg.setMessage(value);
|
|
||||||
break;
|
|
||||||
case 3:
|
case 3:
|
||||||
var value = /** @type {number} */ (reader.readFloat());
|
var value = /** @type {number} */ (reader.readFloat());
|
||||||
msg.setPercentComplete(value);
|
msg.setPercentComplete(value);
|
||||||
|
@ -1956,20 +2042,6 @@ proto.media_set.GetAudioSegmentProgress.prototype.serializeBinary = function() {
|
||||||
*/
|
*/
|
||||||
proto.media_set.GetAudioSegmentProgress.serializeBinaryToWriter = function(message, writer) {
|
proto.media_set.GetAudioSegmentProgress.serializeBinaryToWriter = function(message, writer) {
|
||||||
var f = undefined;
|
var f = undefined;
|
||||||
f = message.getMimeType();
|
|
||||||
if (f.length > 0) {
|
|
||||||
writer.writeString(
|
|
||||||
1,
|
|
||||||
f
|
|
||||||
);
|
|
||||||
}
|
|
||||||
f = message.getMessage();
|
|
||||||
if (f.length > 0) {
|
|
||||||
writer.writeString(
|
|
||||||
2,
|
|
||||||
f
|
|
||||||
);
|
|
||||||
}
|
|
||||||
f = message.getPercentComplete();
|
f = message.getPercentComplete();
|
||||||
if (f !== 0.0) {
|
if (f !== 0.0) {
|
||||||
writer.writeFloat(
|
writer.writeFloat(
|
||||||
|
@ -1987,42 +2059,6 @@ proto.media_set.GetAudioSegmentProgress.serializeBinaryToWriter = function(messa
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* optional string mime_type = 1;
|
|
||||||
* @return {string}
|
|
||||||
*/
|
|
||||||
proto.media_set.GetAudioSegmentProgress.prototype.getMimeType = function() {
|
|
||||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {string} value
|
|
||||||
* @return {!proto.media_set.GetAudioSegmentProgress} returns this
|
|
||||||
*/
|
|
||||||
proto.media_set.GetAudioSegmentProgress.prototype.setMimeType = function(value) {
|
|
||||||
return jspb.Message.setProto3StringField(this, 1, value);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* optional string message = 2;
|
|
||||||
* @return {string}
|
|
||||||
*/
|
|
||||||
proto.media_set.GetAudioSegmentProgress.prototype.getMessage = function() {
|
|
||||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {string} value
|
|
||||||
* @return {!proto.media_set.GetAudioSegmentProgress} returns this
|
|
||||||
*/
|
|
||||||
proto.media_set.GetAudioSegmentProgress.prototype.setMessage = function(value) {
|
|
||||||
return jspb.Message.setProto3StringField(this, 2, value);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional float percent_complete = 3;
|
* optional float percent_complete = 3;
|
||||||
* @return {number}
|
* @return {number}
|
||||||
|
|
|
@ -10,6 +10,9 @@ import "google/protobuf/duration.proto";
|
||||||
message MediaSet {
|
message MediaSet {
|
||||||
string id = 1;
|
string id = 1;
|
||||||
string youtube_id = 2;
|
string youtube_id = 2;
|
||||||
|
string title = 12;
|
||||||
|
string description = 13;
|
||||||
|
string author = 14;
|
||||||
|
|
||||||
int32 audio_channels = 3;
|
int32 audio_channels = 3;
|
||||||
int64 audio_approx_frames = 4;
|
int64 audio_approx_frames = 4;
|
||||||
|
|
Loading…
Reference in New Issue