mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-23 15:30:56 -04:00
update hdhomerun
This commit is contained in:
parent
c08f8fd6fe
commit
1bf9c446d9
@ -283,7 +283,59 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
{
|
{
|
||||||
new ImageOption
|
new ImageOption
|
||||||
{
|
{
|
||||||
Limit = 2,
|
Limit = 1,
|
||||||
|
MinWidth = 1280,
|
||||||
|
Type = ImageType.Backdrop
|
||||||
|
},
|
||||||
|
|
||||||
|
// Don't download this by default as it's rarely used.
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 0,
|
||||||
|
Type = ImageType.Art
|
||||||
|
},
|
||||||
|
|
||||||
|
// Don't download this by default as it's rarely used.
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 0,
|
||||||
|
Type = ImageType.Disc
|
||||||
|
},
|
||||||
|
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 1,
|
||||||
|
Type = ImageType.Primary
|
||||||
|
},
|
||||||
|
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 0,
|
||||||
|
Type = ImageType.Banner
|
||||||
|
},
|
||||||
|
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 1,
|
||||||
|
Type = ImageType.Thumb
|
||||||
|
},
|
||||||
|
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 1,
|
||||||
|
Type = ImageType.Logo
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
new MetadataOptions(1, 1280)
|
||||||
|
{
|
||||||
|
ItemType = "MusicVideo",
|
||||||
|
ImageOptions = new []
|
||||||
|
{
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 1,
|
||||||
MinWidth = 1280,
|
MinWidth = 1280,
|
||||||
Type = ImageType.Backdrop
|
Type = ImageType.Backdrop
|
||||||
},
|
},
|
||||||
@ -335,7 +387,7 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
{
|
{
|
||||||
new ImageOption
|
new ImageOption
|
||||||
{
|
{
|
||||||
Limit = 2,
|
Limit = 1,
|
||||||
MinWidth = 1280,
|
MinWidth = 1280,
|
||||||
Type = ImageType.Backdrop
|
Type = ImageType.Backdrop
|
||||||
},
|
},
|
||||||
@ -432,9 +484,89 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
new MetadataOptions(1, 1280)
|
||||||
|
{
|
||||||
|
ItemType = "BoxSet",
|
||||||
|
ImageOptions = new []
|
||||||
|
{
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 1,
|
||||||
|
MinWidth = 1280,
|
||||||
|
Type = ImageType.Backdrop
|
||||||
|
},
|
||||||
|
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 1,
|
||||||
|
Type = ImageType.Primary
|
||||||
|
},
|
||||||
|
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 1,
|
||||||
|
Type = ImageType.Thumb
|
||||||
|
},
|
||||||
|
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 1,
|
||||||
|
Type = ImageType.Logo
|
||||||
|
},
|
||||||
|
|
||||||
|
// Don't download this by default as it's rarely used.
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 0,
|
||||||
|
Type = ImageType.Art
|
||||||
|
},
|
||||||
|
|
||||||
|
// Don't download this by default as it's rarely used.
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 0,
|
||||||
|
Type = ImageType.Disc
|
||||||
|
},
|
||||||
|
|
||||||
|
// Don't download this by default as it's rarely used.
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 0,
|
||||||
|
Type = ImageType.Banner
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
new MetadataOptions(0, 1280)
|
new MetadataOptions(0, 1280)
|
||||||
{
|
{
|
||||||
ItemType = "Season"
|
ItemType = "Season",
|
||||||
|
ImageOptions = new []
|
||||||
|
{
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 0,
|
||||||
|
MinWidth = 1280,
|
||||||
|
Type = ImageType.Backdrop
|
||||||
|
},
|
||||||
|
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 1,
|
||||||
|
Type = ImageType.Primary
|
||||||
|
},
|
||||||
|
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 0,
|
||||||
|
Type = ImageType.Banner
|
||||||
|
},
|
||||||
|
|
||||||
|
new ImageOption
|
||||||
|
{
|
||||||
|
Limit = 0,
|
||||||
|
Type = ImageType.Thumb
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
DisplayContent = 26,
|
DisplayContent = 26,
|
||||||
GoToSearch = 27,
|
GoToSearch = 27,
|
||||||
DisplayMessage = 28,
|
DisplayMessage = 28,
|
||||||
SetRepeatAll = 29,
|
SetRepeatMode = 29
|
||||||
SetRepeatOne = 30
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -80,6 +80,10 @@ namespace MediaBrowser.Model.Users
|
|||||||
EnableLiveTvManagement = true;
|
EnableLiveTvManagement = true;
|
||||||
EnableLiveTvAccess = true;
|
EnableLiveTvAccess = true;
|
||||||
|
|
||||||
|
// Without this on by default, admins won't be able to do this
|
||||||
|
// Improve in the future
|
||||||
|
EnableLiveTvManagement = true;
|
||||||
|
|
||||||
EnableSharedDeviceControl = true;
|
EnableSharedDeviceControl = true;
|
||||||
|
|
||||||
BlockedTags = new string[] { };
|
BlockedTags = new string[] { };
|
||||||
|
@ -151,65 +151,72 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|||||||
public async Task AddMetadata(ListingsProviderInfo info, List<ChannelInfo> channels,
|
public async Task AddMetadata(ListingsProviderInfo info, List<ChannelInfo> channels,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(info.ListingsId))
|
||||||
|
{
|
||||||
|
throw new Exception("ListingsId required");
|
||||||
|
}
|
||||||
|
|
||||||
var token = await GetToken(info, cancellationToken);
|
var token = await GetToken(info, cancellationToken);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(token))
|
||||||
|
{
|
||||||
|
throw new Exception("token required");
|
||||||
|
}
|
||||||
|
|
||||||
_channelPair.Clear();
|
_channelPair.Clear();
|
||||||
|
|
||||||
if (!String.IsNullOrWhiteSpace(token) && !String.IsNullOrWhiteSpace(info.ListingsId))
|
var httpOptions = new HttpRequestOptions()
|
||||||
{
|
{
|
||||||
var httpOptions = new HttpRequestOptions()
|
Url = ApiUrl + "/lineups/" + info.ListingsId,
|
||||||
{
|
UserAgent = UserAgent,
|
||||||
Url = ApiUrl + "/lineups/" + info.ListingsId,
|
CancellationToken = cancellationToken
|
||||||
UserAgent = UserAgent,
|
};
|
||||||
CancellationToken = cancellationToken
|
|
||||||
};
|
|
||||||
|
|
||||||
httpOptions.RequestHeaders["token"] = token;
|
httpOptions.RequestHeaders["token"] = token;
|
||||||
|
|
||||||
using (var response = await _httpClient.Get(httpOptions))
|
using (var response = await _httpClient.Get(httpOptions))
|
||||||
|
{
|
||||||
|
var root = _jsonSerializer.DeserializeFromStream<ScheduleDirect.Channel>(response);
|
||||||
|
_logger.Info("Found " + root.map.Count() + " channels on the lineup on ScheduleDirect");
|
||||||
|
_logger.Info("Mapping Stations to Channel");
|
||||||
|
foreach (ScheduleDirect.Map map in root.map)
|
||||||
{
|
{
|
||||||
var root = _jsonSerializer.DeserializeFromStream<ScheduleDirect.Channel>(response);
|
var channel = (map.channel ?? (map.atscMajor + "." + map.atscMinor)).TrimStart('0');
|
||||||
_logger.Info("Found " + root.map.Count() + " channels on the lineup on ScheduleDirect");
|
_logger.Debug("Found channel: " + channel + " in Schedules Direct");
|
||||||
_logger.Info("Mapping Stations to Channel");
|
var schChannel = root.stations.FirstOrDefault(item => item.stationID == map.stationID);
|
||||||
foreach (ScheduleDirect.Map map in root.map)
|
|
||||||
|
if (!_channelPair.ContainsKey(channel) && channel != "0.0" && schChannel != null)
|
||||||
{
|
{
|
||||||
var channel = (map.channel ?? (map.atscMajor + "." + map.atscMinor)).TrimStart('0');
|
_channelPair.TryAdd(channel, schChannel);
|
||||||
_logger.Debug("Found channel: " + channel + " in Schedules Direct");
|
|
||||||
var schChannel = root.stations.FirstOrDefault(item => item.stationID == map.stationID);
|
|
||||||
|
|
||||||
if (!_channelPair.ContainsKey(channel) && channel != "0.0" && schChannel != null)
|
|
||||||
{
|
|
||||||
_channelPair.TryAdd(channel, schChannel);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_logger.Info("Added " + _channelPair.Count() + " channels to the dictionary");
|
}
|
||||||
|
_logger.Info("Added " + _channelPair.Count() + " channels to the dictionary");
|
||||||
|
|
||||||
foreach (ChannelInfo channel in channels)
|
foreach (ChannelInfo channel in channels)
|
||||||
|
{
|
||||||
|
// Helper.logger.Info("Modifyin channel " + channel.Number);
|
||||||
|
if (_channelPair.ContainsKey(channel.Number))
|
||||||
{
|
{
|
||||||
// Helper.logger.Info("Modifyin channel " + channel.Number);
|
string channelName;
|
||||||
if (_channelPair.ContainsKey(channel.Number))
|
if (_channelPair[channel.Number].logo != null)
|
||||||
{
|
{
|
||||||
string channelName;
|
channel.ImageUrl = _channelPair[channel.Number].logo.URL;
|
||||||
if (_channelPair[channel.Number].logo != null)
|
channel.HasImage = true;
|
||||||
{
|
}
|
||||||
channel.ImageUrl = _channelPair[channel.Number].logo.URL;
|
if (_channelPair[channel.Number].affiliate != null)
|
||||||
channel.HasImage = true;
|
{
|
||||||
}
|
channelName = _channelPair[channel.Number].affiliate;
|
||||||
if (_channelPair[channel.Number].affiliate != null)
|
|
||||||
{
|
|
||||||
channelName = _channelPair[channel.Number].affiliate;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
channelName = _channelPair[channel.Number].name;
|
|
||||||
}
|
|
||||||
channel.Name = channelName;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.Info("Schedules Direct doesnt have data for channel: " + channel.Number + " " +
|
channelName = _channelPair[channel.Number].name;
|
||||||
channel.Name);
|
|
||||||
}
|
}
|
||||||
|
channel.Name = channelName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.Info("Schedules Direct doesnt have data for channel: " + channel.Number + " " +
|
||||||
|
channel.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -572,6 +579,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|||||||
|
|
||||||
var token = await GetToken(info, cancellationToken);
|
var token = await GetToken(info, cancellationToken);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(token))
|
||||||
|
{
|
||||||
|
throw new Exception("token required");
|
||||||
|
}
|
||||||
|
|
||||||
_logger.Info("Headends on account ");
|
_logger.Info("Headends on account ");
|
||||||
|
|
||||||
var options = new HttpRequestOptions()
|
var options = new HttpRequestOptions()
|
||||||
|
@ -1459,7 +1459,7 @@
|
|||||||
"ButtonUnlockGuide": "Unlock Guide",
|
"ButtonUnlockGuide": "Unlock Guide",
|
||||||
"LabelEnableFullScreen": "Enable fullscreen mode",
|
"LabelEnableFullScreen": "Enable fullscreen mode",
|
||||||
"LabelEnableChromecastAc3Passthrough": "Enable Chromecast AC3 Passthrough",
|
"LabelEnableChromecastAc3Passthrough": "Enable Chromecast AC3 Passthrough",
|
||||||
"LabelSyncPath": "Synced content path:",
|
"OptionSyncToSDCard": "Synced to external SD card",
|
||||||
"LabelEmail": "Email:",
|
"LabelEmail": "Email:",
|
||||||
"LabelUsername": "Username:",
|
"LabelUsername": "Username:",
|
||||||
"HeaderSignUp": "Sign Up",
|
"HeaderSignUp": "Sign Up",
|
||||||
@ -1491,5 +1491,6 @@
|
|||||||
"LabelLineup": "Lineup:",
|
"LabelLineup": "Lineup:",
|
||||||
"MessageTunerDeviceNotListed": "Is your tuner device not listed? Try installing an external service provider for more Live TV options.",
|
"MessageTunerDeviceNotListed": "Is your tuner device not listed? Try installing an external service provider for more Live TV options.",
|
||||||
"LabelImportOnlyFavoriteChannels": "Restrict to channels marked as favorite",
|
"LabelImportOnlyFavoriteChannels": "Restrict to channels marked as favorite",
|
||||||
"ImportFavoriteChannelsHelp": "If enabled, only channels that are marked as favorite on the tuner device will be imported."
|
"ImportFavoriteChannelsHelp": "If enabled, only channels that are marked as favorite on the tuner device will be imported.",
|
||||||
|
"ButtonRepeat": "Repeat"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user