mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
update recording dialogs
This commit is contained in:
parent
d517aadc1c
commit
ac2ca1fec2
@ -182,7 +182,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
case ItemFields.HomePageUrl:
|
||||
case ItemFields.VoteCount:
|
||||
case ItemFields.DisplayMediaType:
|
||||
case ItemFields.ServiceName:
|
||||
//case ItemFields.ServiceName:
|
||||
case ItemFields.Genres:
|
||||
case ItemFields.Studios:
|
||||
case ItemFields.Settings:
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
using System.Diagnostics;
|
||||
@ -47,7 +48,7 @@ namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Title))
|
||||
{
|
||||
return Title;
|
||||
return AddLanguageIfNeeded(Title);
|
||||
}
|
||||
|
||||
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; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -360,6 +360,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
|
||||
public async Task<LiveStreamResponse> OpenLiveStream(LiveStreamRequest request, bool enableAutoClose, CancellationToken cancellationToken)
|
||||
{
|
||||
enableAutoClose = false;
|
||||
await _liveStreamSemaphore.WaitAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
try
|
||||
|
@ -85,6 +85,12 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
|
||||
{
|
||||
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
|
||||
{
|
||||
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)
|
||||
{
|
||||
var recordingTuples = new List<Tuple<BaseItemDto, string, string, string>>();
|
||||
var programTuples = new List<Tuple<BaseItemDto, string, string, string>>();
|
||||
|
||||
foreach (var tuple in tuples)
|
||||
{
|
||||
@ -1812,18 +1812,17 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
}
|
||||
}
|
||||
|
||||
var service = GetService(program);
|
||||
var serviceName = service == null ? null : service.Name;
|
||||
var serviceName = program.ServiceName;
|
||||
|
||||
if (fields.Contains(ItemFields.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)
|
||||
|
@ -1188,7 +1188,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
|
||||
public ItemImageInfo ItemImageInfoFromValueString(string value)
|
||||
{
|
||||
var parts = value.Split(new[] { '*' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var parts = value.Split(new[] { '*' }, StringSplitOptions.None);
|
||||
|
||||
var image = new ItemImageInfo();
|
||||
|
||||
@ -1633,14 +1633,13 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
}
|
||||
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);
|
||||
}
|
||||
index++;
|
||||
item.ServiceName = reader.GetString(index);
|
||||
}
|
||||
index++;
|
||||
|
||||
if (!reader.IsDBNull(index))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user