ChannelAudioItem.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 string GetUserDataKey()
  23. {
  24. return ExternalId;
  25. }
  26. public override bool SupportsLocalMetadata
  27. {
  28. get
  29. {
  30. return false;
  31. }
  32. }
  33. public ChannelAudioItem()
  34. {
  35. ChannelMediaSources = new List<ChannelMediaInfo>();
  36. }
  37. public override LocationType LocationType
  38. {
  39. get
  40. {
  41. if (string.IsNullOrEmpty(Path))
  42. {
  43. return LocationType.Remote;
  44. }
  45. return base.LocationType;
  46. }
  47. }
  48. }
  49. }