ChannelAudioItem.cs 1.4 KB

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