Fix: emby stream default index can be -1
This commit is contained in:
parent
3ccb221371
commit
35c5170646
|
@ -473,8 +473,8 @@ type MediaSourceInfo struct {
|
|||
Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
|
||||
Container string `protobuf:"bytes,4,opt,name=container,proto3" json:"container,omitempty"`
|
||||
Protocol string `protobuf:"bytes,5,opt,name=protocol,proto3" json:"protocol,omitempty"`
|
||||
DefaultSubtitleStreamIndex uint64 `protobuf:"varint,6,opt,name=defaultSubtitleStreamIndex,proto3" json:"defaultSubtitleStreamIndex,omitempty"`
|
||||
DefaultAudioStreamIndex uint64 `protobuf:"varint,7,opt,name=defaultAudioStreamIndex,proto3" json:"defaultAudioStreamIndex,omitempty"`
|
||||
DefaultSubtitleStreamIndex int64 `protobuf:"varint,6,opt,name=defaultSubtitleStreamIndex,proto3" json:"defaultSubtitleStreamIndex,omitempty"`
|
||||
DefaultAudioStreamIndex int64 `protobuf:"varint,7,opt,name=defaultAudioStreamIndex,proto3" json:"defaultAudioStreamIndex,omitempty"`
|
||||
MediaStreamInfo []*MediaStreamInfo `protobuf:"bytes,8,rep,name=mediaStreamInfo,proto3" json:"mediaStreamInfo,omitempty"`
|
||||
DirectPlayUrl string `protobuf:"bytes,9,opt,name=directPlayUrl,proto3" json:"directPlayUrl,omitempty"`
|
||||
TranscodingUrl string `protobuf:"bytes,10,opt,name=transcodingUrl,proto3" json:"transcodingUrl,omitempty"`
|
||||
|
@ -547,14 +547,14 @@ func (x *MediaSourceInfo) GetProtocol() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (x *MediaSourceInfo) GetDefaultSubtitleStreamIndex() uint64 {
|
||||
func (x *MediaSourceInfo) GetDefaultSubtitleStreamIndex() int64 {
|
||||
if x != nil {
|
||||
return x.DefaultSubtitleStreamIndex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MediaSourceInfo) GetDefaultAudioStreamIndex() uint64 {
|
||||
func (x *MediaSourceInfo) GetDefaultAudioStreamIndex() int64 {
|
||||
if x != nil {
|
||||
return x.DefaultAudioStreamIndex
|
||||
}
|
||||
|
@ -1735,10 +1735,10 @@ var file_emby_emby_proto_rawDesc = []byte{
|
|||
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12,
|
||||
0x3e, 0x0a, 0x1a, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x62, 0x74, 0x69, 0x74,
|
||||
0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x04, 0x52, 0x1a, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x62, 0x74,
|
||||
0x01, 0x28, 0x03, 0x52, 0x1a, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x62, 0x74,
|
||||
0x69, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12,
|
||||
0x38, 0x0a, 0x17, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53,
|
||||
0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04,
|
||||
0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x17, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53, 0x74,
|
||||
0x72, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x43, 0x0a, 0x0f, 0x6d, 0x65, 0x64,
|
||||
0x69, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x03,
|
||||
|
|
|
@ -123,8 +123,8 @@ message MediaSourceInfo {
|
|||
string path = 3;
|
||||
string container = 4;
|
||||
string protocol = 5;
|
||||
uint64 defaultSubtitleStreamIndex = 6;
|
||||
uint64 defaultAudioStreamIndex = 7;
|
||||
int64 defaultSubtitleStreamIndex = 6;
|
||||
int64 defaultAudioStreamIndex = 7;
|
||||
repeated MediaStreamInfo mediaStreamInfo = 8;
|
||||
string directPlayUrl = 9;
|
||||
string transcodingUrl = 10;
|
||||
|
|
|
@ -226,8 +226,8 @@ type MediaSources struct {
|
|||
TranscodingContainer string `json:"TranscodingContainer"`
|
||||
AnalyzeDurationMs int `json:"AnalyzeDurationMs"`
|
||||
ReadAtNativeFramerate bool `json:"ReadAtNativeFramerate"`
|
||||
DefaultAudioStreamIndex uint64 `json:"DefaultAudioStreamIndex"`
|
||||
DefaultSubtitleStreamIndex uint64 `json:"DefaultSubtitleStreamIndex"`
|
||||
DefaultAudioStreamIndex int64 `json:"DefaultAudioStreamIndex"`
|
||||
DefaultSubtitleStreamIndex int64 `json:"DefaultSubtitleStreamIndex"`
|
||||
ItemID string `json:"ItemId"`
|
||||
ServerID string `json:"ServerId"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue