ChannelAudioItem.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using MediaBrowser.Controller.Entities.Audio;
  2. using MediaBrowser.Model.Channels;
  3. using MediaBrowser.Model.Configuration;
  4. using MediaBrowser.Model.Entities;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. namespace MediaBrowser.Controller.Channels
  8. {
  9. public class ChannelAudioItem : Audio, IChannelMediaItem
  10. {
  11. public string ExternalId { get; set; }
  12. public string ChannelId { get; set; }
  13. public ChannelItemType ChannelItemType { get; set; }
  14. public bool IsInfiniteStream { get; set; }
  15. public ChannelMediaContentType ContentType { get; set; }
  16. public string OriginalImageUrl { get; set; }
  17. public List<ChannelMediaInfo> ChannelMediaSources { get; set; }
  18. protected override bool GetBlockUnratedValue(UserConfiguration config)
  19. {
  20. return config.BlockUnratedItems.Contains(UnratedItem.ChannelContent);
  21. }
  22. public override bool SupportsLocalMetadata
  23. {
  24. get
  25. {
  26. return false;
  27. }
  28. }
  29. public ChannelAudioItem()
  30. {
  31. ChannelMediaSources = new List<ChannelMediaInfo>();
  32. }
  33. public override LocationType LocationType
  34. {
  35. get
  36. {
  37. if (string.IsNullOrEmpty(Path))
  38. {
  39. return LocationType.Remote;
  40. }
  41. return base.LocationType;
  42. }
  43. }
  44. }
  45. }