mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
813 B
18 lines
813 B
using ErsatzTV.Core.Domain; |
|
|
|
namespace ErsatzTV.Application.Jellyfin; |
|
|
|
internal static class Mapper |
|
{ |
|
internal static JellyfinMediaSourceViewModel ProjectToViewModel(JellyfinMediaSource jellyfinMediaSource) => |
|
new( |
|
jellyfinMediaSource.Id, |
|
jellyfinMediaSource.ServerName, |
|
jellyfinMediaSource.Connections.HeadOrNone().Match(c => c.Address, string.Empty)); |
|
|
|
internal static JellyfinLibraryViewModel ProjectToViewModel(JellyfinLibrary library) => |
|
new(library.Id, library.Name, library.MediaKind, library.ShouldSyncItems, library.MediaSourceId); |
|
|
|
internal static JellyfinPathReplacementViewModel ProjectToViewModel(JellyfinPathReplacement pathReplacement) => |
|
new(pathReplacement.Id, pathReplacement.JellyfinPath, pathReplacement.LocalPath); |
|
}
|
|
|