Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff4add0
commit ed692df
Showing
11 changed files
with
99 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
using MediaBrowser.Controller.Channels; | ||
using MediaBrowser.Controller.Providers; | ||
using MediaBrowser.Model.Entities; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace MediaBrowser.Dlna.Channels | ||
{ | ||
public class DlnaChannelFactory : IChannelFactory | ||
{ | ||
public IEnumerable<IChannel> GetChannels() | ||
{ | ||
// Check config here | ||
// If user wants all channels separate, return them all | ||
// If user wants one parent channel, return just that one | ||
|
||
return new List<IChannel>() | ||
{ | ||
//new DummyChannel("test 1"), | ||
//new DummyChannel("test 2") | ||
}; | ||
} | ||
} | ||
|
||
public class DummyChannel : IChannel | ||
{ | ||
private readonly string _name; | ||
|
||
public DummyChannel(string name) | ||
{ | ||
_name = name; | ||
} | ||
|
||
public string Name | ||
{ | ||
get { return _name; } | ||
} | ||
|
||
public string Description | ||
{ | ||
get { return "Dummy Channel"; } | ||
} | ||
|
||
public string DataVersion | ||
{ | ||
get { return "1"; } | ||
} | ||
|
||
public string HomePageUrl | ||
{ | ||
get { return "http://www.google.com"; } | ||
} | ||
|
||
public ChannelParentalRating ParentalRating | ||
{ | ||
get { return ChannelParentalRating.GeneralAudience; } | ||
} | ||
|
||
public InternalChannelFeatures GetChannelFeatures() | ||
{ | ||
return new InternalChannelFeatures | ||
{ | ||
|
||
}; | ||
} | ||
|
||
public bool IsEnabledFor(string userId) | ||
{ | ||
return true; | ||
} | ||
|
||
public Task<ChannelItemResult> GetChannelItems(InternalChannelItemQuery query, CancellationToken cancellationToken) | ||
{ | ||
return Task.FromResult(new ChannelItemResult()); | ||
} | ||
|
||
public Task<DynamicImageResponse> GetChannelImage(ImageType type, CancellationToken cancellationToken) | ||
{ | ||
return Task.FromResult(new DynamicImageResponse()); | ||
} | ||
|
||
public IEnumerable<ImageType> GetSupportedChannelImages() | ||
{ | ||
return new List<ImageType>(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters