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.
17 lines
624 B
17 lines
624 B
using System; |
|
using ErsatzTV.Core.Domain; |
|
|
|
namespace ErsatzTV.Application.MediaSources |
|
{ |
|
internal static class Mapper |
|
{ |
|
internal static MediaSourceViewModel ProjectToViewModel(MediaSource mediaSource) => |
|
mediaSource switch |
|
{ |
|
// TODO: address this... |
|
LocalMediaSource lms => new LocalMediaSourceViewModel(lms.Id, "LMS Name", "LMS Folder"), |
|
PlexMediaSource pms => Plex.Mapper.ProjectToViewModel(pms), |
|
_ => throw new NotSupportedException($"Unsupported media source {mediaSource.GetType().Name}") |
|
}; |
|
} |
|
}
|
|
|