update tuners

This commit is contained in:
Luke Pulverenti
2015-07-25 14:11:46 -04:00
parent 14f97d6176
commit b194512843
8 changed files with 34 additions and 10 deletions

View File

@@ -2172,7 +2172,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
return await _libraryManager.GetNamedView(user, name, "livetv", "zz_" + name, cancellationToken).ConfigureAwait(false);
}
public async Task SaveTunerHost(TunerHostInfo info)
public async Task<TunerHostInfo> SaveTunerHost(TunerHostInfo info)
{
info = (TunerHostInfo)_jsonSerializer.DeserializeFromString(_jsonSerializer.SerializeToString(info), typeof(TunerHostInfo));
@@ -2202,6 +2202,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
_config.SaveConfiguration("livetv", config);
_taskManager.CancelIfRunningAndQueue<RefreshChannelsScheduledTask>();
return info;
}
public async Task<ListingsProviderInfo> SaveListingProvider(ListingsProviderInfo info, bool validateLogin, bool validateListings)

View File

@@ -73,7 +73,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
}
// Strip off the port
url = new Uri(url).GetComponents(UriComponents.AbsoluteUri & ~UriComponents.Port, UriFormat.UriEscaped);
url = new Uri(url).GetComponents(UriComponents.AbsoluteUri & ~UriComponents.Port, UriFormat.UriEscaped).TrimEnd('/');
await _liveTvManager.SaveTunerHost(new TunerHostInfo
{

View File

@@ -60,7 +60,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
if (root != null)
{
return root.Select(i => new ChannelInfo
var result = root.Select(i => new ChannelInfo
{
Name = i.GuideName,
Number = i.GuideNumber.ToString(CultureInfo.InvariantCulture),
@@ -68,6 +68,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
IsFavorite = i.Favorite
});
if (info.ImportFavoritesOnly)
{
result = result.Where(i => (i.IsFavorite ?? true)).ToList();
}
return result;
}
return new List<ChannelInfo>();
}

View File

@@ -1480,7 +1480,7 @@
"ButtonAddDevice": "Add Device",
"HeaderAddDevice": "Add Device",
"HeaderExternalServices": "External Services",
"LabelIpAddressPath": "IP Address / Path:",
"LabelTunerIpAddress": "Tuner IP Address:",
"TabExternalServices": "External Services",
"TabTuners": "Tuners",
"HeaderGuideProviders": "Guide Providers",
@@ -1489,5 +1489,7 @@
"GuideProviderListingsStep": "Step 2: Select Listings",
"GuideProviderLoginStep": "Step 1: Login",
"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",
"ImportFavoriteChannelsHelp": "If enabled, only channels that are marked as favorite on the tuner device will be imported."
}