mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
use shared alpha picker
This commit is contained in:
parent
c4b5258758
commit
c1b68356c4
@ -362,6 +362,10 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (item is Photo)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
//if (!(item is Folder))
|
//if (!(item is Folder))
|
||||||
//{
|
//{
|
||||||
// return;
|
// return;
|
||||||
|
@ -71,31 +71,36 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task AddMetadata(ListingsProviderInfo info, List<ChannelInfo> channels, CancellationToken cancellationToken)
|
public Task AddMetadata(ListingsProviderInfo info, List<ChannelInfo> channels, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// Add the channel image url
|
// Add the channel image url
|
||||||
var reader = new XmlTvReader(info.Path, GetLanguage(), null);
|
var reader = new XmlTvReader(info.Path, GetLanguage(), null);
|
||||||
var results = reader.GetChannels().ToList();
|
var results = reader.GetChannels().ToList();
|
||||||
|
|
||||||
if (channels != null && channels.Count > 0)
|
if (channels != null && channels.Count > 0)
|
||||||
{
|
{
|
||||||
channels.ForEach(c => {
|
channels.ForEach(c =>
|
||||||
|
{
|
||||||
var match = results.FirstOrDefault(r => r.Id == c.Id);
|
var match = results.FirstOrDefault(r => r.Id == c.Id);
|
||||||
if (match != null && match.Icon != null && !String.IsNullOrEmpty(match.Icon.Source))
|
if (match != null && match.Icon != null && !String.IsNullOrEmpty(match.Icon.Source))
|
||||||
{
|
{
|
||||||
c.ImageUrl = match.Icon.Source;
|
c.ImageUrl = match.Icon.Source;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return Task.FromResult(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task Validate(ListingsProviderInfo info, bool validateLogin, bool validateListings)
|
public Task Validate(ListingsProviderInfo info, bool validateLogin, bool validateListings)
|
||||||
{
|
{
|
||||||
// Check that the path or url is valid. If not, throw a file not found exception
|
// Assume all urls are valid. check files for existence
|
||||||
if (!File.Exists(info.Path))
|
if (!info.Path.StartsWith("http", StringComparison.OrdinalIgnoreCase) && !File.Exists(info.Path))
|
||||||
{
|
{
|
||||||
throw new FileNotFoundException("Could not find the XmlTv file specified:", info.Path);
|
throw new FileNotFoundException("Could not find the XmlTv file specified:", info.Path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return Task.FromResult(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<List<NameIdPair>> GetLineups(ListingsProviderInfo info, string country, string location)
|
public Task<List<NameIdPair>> GetLineups(ListingsProviderInfo info, string country, string location)
|
||||||
|
@ -1122,9 +1122,6 @@
|
|||||||
<Content Include="dashboard-ui\music.html">
|
<Content Include="dashboard-ui\music.html">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="dashboard-ui\scripts\alphapicker.js">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="dashboard-ui\components\imageeditor\imageeditor.js">
|
<Content Include="dashboard-ui\components\imageeditor\imageeditor.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user