mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
Removed guids from the model project
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Common.Events;
|
||||
using System.Globalization;
|
||||
using MediaBrowser.Common.Events;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Drawing;
|
||||
@@ -712,12 +713,20 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
|
||||
public Task SendMessageCommand(string controllingSessionId, string sessionId, MessageCommand command, CancellationToken cancellationToken)
|
||||
{
|
||||
var session = GetSessionForRemoteControl(sessionId);
|
||||
var generalCommand = new GeneralCommand
|
||||
{
|
||||
Name = GeneralCommandType.DisplayMessage.ToString()
|
||||
};
|
||||
|
||||
var controllingSession = GetSession(controllingSessionId);
|
||||
AssertCanControl(session, controllingSession);
|
||||
generalCommand.Arguments["Header"] = command.Header;
|
||||
generalCommand.Arguments["Text"] = command.Text;
|
||||
|
||||
return session.SessionController.SendMessageCommand(command, cancellationToken);
|
||||
if (command.TimeoutMs.HasValue)
|
||||
{
|
||||
generalCommand.Arguments["TimeoutMs"] = command.TimeoutMs.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
return SendGeneralCommand(controllingSessionId, sessionId, generalCommand, cancellationToken);
|
||||
}
|
||||
|
||||
public Task SendGeneralCommand(string controllingSessionId, string sessionId, GeneralCommand command, CancellationToken cancellationToken)
|
||||
@@ -1199,7 +1208,7 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
};
|
||||
|
||||
info.PrimaryImageTag = GetImageCacheTag(item, ImageType.Primary);
|
||||
if (info.PrimaryImageTag.HasValue)
|
||||
if (info.PrimaryImageTag != null)
|
||||
{
|
||||
info.PrimaryImageItemId = GetDtoId(item);
|
||||
}
|
||||
@@ -1237,14 +1246,14 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
info.Album = audio.Album;
|
||||
info.Artists = audio.Artists;
|
||||
|
||||
if (!info.PrimaryImageTag.HasValue)
|
||||
if (info.PrimaryImageTag == null)
|
||||
{
|
||||
var album = audio.Parents.OfType<MusicAlbum>().FirstOrDefault();
|
||||
|
||||
if (album != null && album.HasImage(ImageType.Primary))
|
||||
{
|
||||
info.PrimaryImageTag = GetImageCacheTag(album, ImageType.Primary);
|
||||
if (info.PrimaryImageTag.HasValue)
|
||||
if (info.PrimaryImageTag != null)
|
||||
{
|
||||
info.PrimaryImageItemId = GetDtoId(album);
|
||||
}
|
||||
@@ -1345,7 +1354,7 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
return info;
|
||||
}
|
||||
|
||||
private Guid? GetImageCacheTag(BaseItem item, ImageType type)
|
||||
private string GetImageCacheTag(BaseItem item, ImageType type)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user