mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-17 19:08:53 -07:00
commit
69f5c28bad
@ -182,7 +182,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
case ItemFields.HomePageUrl:
|
case ItemFields.HomePageUrl:
|
||||||
case ItemFields.VoteCount:
|
case ItemFields.VoteCount:
|
||||||
case ItemFields.DisplayMediaType:
|
case ItemFields.DisplayMediaType:
|
||||||
case ItemFields.ServiceName:
|
//case ItemFields.ServiceName:
|
||||||
case ItemFields.Genres:
|
case ItemFields.Genres:
|
||||||
case ItemFields.Studios:
|
case ItemFields.Studios:
|
||||||
case ItemFields.Settings:
|
case ItemFields.Settings:
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using MediaBrowser.Model.Dlna;
|
using MediaBrowser.Model.Dlna;
|
||||||
using MediaBrowser.Model.Extensions;
|
using MediaBrowser.Model.Extensions;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
@ -47,7 +48,7 @@ namespace MediaBrowser.Model.Entities
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(Title))
|
if (!string.IsNullOrEmpty(Title))
|
||||||
{
|
{
|
||||||
return Title;
|
return AddLanguageIfNeeded(Title);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Type == MediaStreamType.Audio)
|
if (Type == MediaStreamType.Audio)
|
||||||
@ -115,6 +116,16 @@ namespace MediaBrowser.Model.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string AddLanguageIfNeeded(string title)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(Language) && title.IndexOf(Language, StringComparison.OrdinalIgnoreCase) == -1)
|
||||||
|
{
|
||||||
|
title = StringHelper.FirstToUpper(Language) + " " + title;
|
||||||
|
}
|
||||||
|
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
public string NalLengthSize { get; set; }
|
public string NalLengthSize { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -360,6 +360,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
|
|
||||||
public async Task<LiveStreamResponse> OpenLiveStream(LiveStreamRequest request, bool enableAutoClose, CancellationToken cancellationToken)
|
public async Task<LiveStreamResponse> OpenLiveStream(LiveStreamRequest request, bool enableAutoClose, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
enableAutoClose = false;
|
||||||
await _liveStreamSemaphore.WaitAsync(cancellationToken).ConfigureAwait(false);
|
await _liveStreamSemaphore.WaitAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -85,6 +85,12 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
|
|||||||
{
|
{
|
||||||
if (args.ContainsFileSystemEntryByName("tvshow.nfo"))
|
if (args.ContainsFileSystemEntryByName("tvshow.nfo"))
|
||||||
{
|
{
|
||||||
|
if (args.Parent.IsRoot)
|
||||||
|
{
|
||||||
|
// For now, return null, but if we want to allow this in the future then add some additional checks to guard against a misplaced tvshow.nfo
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return new Series
|
return new Series
|
||||||
{
|
{
|
||||||
Path = args.Path,
|
Path = args.Path,
|
||||||
|
@ -1752,7 +1752,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||||||
|
|
||||||
public async Task AddInfoToProgramDto(List<Tuple<BaseItem, BaseItemDto>> tuples, List<ItemFields> fields, User user = null)
|
public async Task AddInfoToProgramDto(List<Tuple<BaseItem, BaseItemDto>> tuples, List<ItemFields> fields, User user = null)
|
||||||
{
|
{
|
||||||
var recordingTuples = new List<Tuple<BaseItemDto, string, string, string>>();
|
var programTuples = new List<Tuple<BaseItemDto, string, string, string>>();
|
||||||
|
|
||||||
foreach (var tuple in tuples)
|
foreach (var tuple in tuples)
|
||||||
{
|
{
|
||||||
@ -1812,18 +1812,17 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var service = GetService(program);
|
var serviceName = program.ServiceName;
|
||||||
var serviceName = service == null ? null : service.Name;
|
|
||||||
|
|
||||||
if (fields.Contains(ItemFields.ServiceName))
|
if (fields.Contains(ItemFields.ServiceName))
|
||||||
{
|
{
|
||||||
dto.ServiceName = serviceName;
|
dto.ServiceName = serviceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
recordingTuples.Add(new Tuple<BaseItemDto, string, string, string>(dto, serviceName, program.ExternalId, program.ExternalSeriesIdLegacy));
|
programTuples.Add(new Tuple<BaseItemDto, string, string, string>(dto, serviceName, program.ExternalId, program.ExternalSeriesIdLegacy));
|
||||||
}
|
}
|
||||||
|
|
||||||
await AddRecordingInfo(recordingTuples, CancellationToken.None).ConfigureAwait(false);
|
await AddRecordingInfo(programTuples, CancellationToken.None).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddInfoToRecordingDto(BaseItem item, BaseItemDto dto, User user = null)
|
public void AddInfoToRecordingDto(BaseItem item, BaseItemDto dto, User user = null)
|
||||||
|
@ -1188,7 +1188,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
|
|
||||||
public ItemImageInfo ItemImageInfoFromValueString(string value)
|
public ItemImageInfo ItemImageInfoFromValueString(string value)
|
||||||
{
|
{
|
||||||
var parts = value.Split(new[] { '*' }, StringSplitOptions.RemoveEmptyEntries);
|
var parts = value.Split(new[] { '*' }, StringSplitOptions.None);
|
||||||
|
|
||||||
var image = new ItemImageInfo();
|
var image = new ItemImageInfo();
|
||||||
|
|
||||||
@ -1633,14 +1633,13 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (query.HasField(ItemFields.ServiceName))
|
// TODO: Even if not needed by apps, the server needs it internally
|
||||||
{
|
// But get this excluded from contexts where it is not needed
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.ServiceName = reader.GetString(index);
|
item.ServiceName = reader.GetString(index);
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user