mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
commit
50b033f3aa
@ -285,7 +285,7 @@ namespace Emby.Dlna.Main
|
|||||||
{
|
{
|
||||||
"urn:schemas-upnp-org:service:ContentDirectory:1",
|
"urn:schemas-upnp-org:service:ContentDirectory:1",
|
||||||
"urn:schemas-upnp-org:service:ConnectionManager:1",
|
"urn:schemas-upnp-org:service:ConnectionManager:1",
|
||||||
"urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1"
|
//"urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1"
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var subDevice in embeddedDevices)
|
foreach (var subDevice in embeddedDevices)
|
||||||
|
@ -80,7 +80,7 @@ namespace Emby.Server.Implementations.TV
|
|||||||
var group = new SeriesGroup();
|
var group = new SeriesGroup();
|
||||||
FindAllLinked(series, visited, links, group);
|
FindAllLinked(series, visited, links, group);
|
||||||
|
|
||||||
group.Key = group.Select(s => s.GetProviderId(MetadataProviders.Tvdb)).FirstOrDefault(id => !string.IsNullOrEmpty(id));
|
group.Key = group.Select(s => s.PresentationUniqueKey).FirstOrDefault(id => !string.IsNullOrEmpty(id));
|
||||||
|
|
||||||
yield return group;
|
yield return group;
|
||||||
}
|
}
|
||||||
@ -105,11 +105,7 @@ namespace Emby.Server.Implementations.TV
|
|||||||
|
|
||||||
private static bool ShareProviderId(Series a, Series b)
|
private static bool ShareProviderId(Series a, Series b)
|
||||||
{
|
{
|
||||||
return a.ProviderIds.Any(id =>
|
return string.Equals(a.PresentationUniqueKey, b.PresentationUniqueKey, StringComparison.Ordinal);
|
||||||
{
|
|
||||||
string value;
|
|
||||||
return b.ProviderIds.TryGetValue(id.Key, out value) && id.Value == value;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Order
|
public int Order
|
||||||
|
@ -2134,7 +2134,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
{
|
{
|
||||||
MetadataCountryCode = GetPreferredMetadataCountryCode(),
|
MetadataCountryCode = GetPreferredMetadataCountryCode(),
|
||||||
MetadataLanguage = GetPreferredMetadataLanguage(),
|
MetadataLanguage = GetPreferredMetadataLanguage(),
|
||||||
Name = Name,
|
Name = GetNameForMetadataLookup(),
|
||||||
ProviderIds = ProviderIds,
|
ProviderIds = ProviderIds,
|
||||||
IndexNumber = IndexNumber,
|
IndexNumber = IndexNumber,
|
||||||
ParentIndexNumber = ParentIndexNumber,
|
ParentIndexNumber = ParentIndexNumber,
|
||||||
@ -2143,6 +2143,11 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual string GetNameForMetadataLookup()
|
||||||
|
{
|
||||||
|
return Name;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made
|
/// This is called before any metadata refresh and returns true or false indicating if changes were made
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -4,9 +4,12 @@ using MediaBrowser.Model.Configuration;
|
|||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
|
using MediaBrowser.Model.Extensions;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.LiveTv
|
namespace MediaBrowser.Controller.LiveTv
|
||||||
{
|
{
|
||||||
@ -236,6 +239,40 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private LiveTvOptions GetConfiguration()
|
||||||
|
{
|
||||||
|
return ConfigurationManager.GetConfiguration<LiveTvOptions>("livetv");
|
||||||
|
}
|
||||||
|
|
||||||
|
private ListingsProviderInfo GetListingsProviderInfo()
|
||||||
|
{
|
||||||
|
if (string.Equals(ServiceName, "Emby", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
var config = GetConfiguration();
|
||||||
|
|
||||||
|
return config.ListingProviders.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i.MoviePrefix));
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string GetNameForMetadataLookup()
|
||||||
|
{
|
||||||
|
var name = base.GetNameForMetadataLookup();
|
||||||
|
|
||||||
|
var listings = GetListingsProviderInfo();
|
||||||
|
|
||||||
|
if (listings != null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(listings.MoviePrefix))
|
||||||
|
{
|
||||||
|
name = name.Replace(listings.MoviePrefix, string.Empty, StringComparison.OrdinalIgnoreCase).Trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
public override List<ExternalUrl> GetRelatedUrls()
|
public override List<ExternalUrl> GetRelatedUrls()
|
||||||
{
|
{
|
||||||
var list = base.GetRelatedUrls();
|
var list = base.GetRelatedUrls();
|
||||||
|
@ -83,6 +83,7 @@ namespace MediaBrowser.Model.LiveTv
|
|||||||
public string[] KidsCategories { get; set; }
|
public string[] KidsCategories { get; set; }
|
||||||
public string[] MovieCategories { get; set; }
|
public string[] MovieCategories { get; set; }
|
||||||
public NameValuePair[] ChannelMappings { get; set; }
|
public NameValuePair[] ChannelMappings { get; set; }
|
||||||
|
public string MoviePrefix { get; set; }
|
||||||
|
|
||||||
public ListingsProviderInfo()
|
public ListingsProviderInfo()
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@ namespace MediaBrowser.Providers.Omdb
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async Task Fetch<T>(MetadataResult<T> itemResult, string imdbId, string language, string country, CancellationToken cancellationToken)
|
public async Task Fetch<T>(MetadataResult<T> itemResult, string imdbId, string language, string country, CancellationToken cancellationToken)
|
||||||
where T :BaseItem
|
where T : BaseItem
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(imdbId))
|
if (string.IsNullOrWhiteSpace(imdbId))
|
||||||
{
|
{
|
||||||
@ -48,25 +48,25 @@ namespace MediaBrowser.Providers.Omdb
|
|||||||
|
|
||||||
var result = await GetRootObject(imdbId, cancellationToken);
|
var result = await GetRootObject(imdbId, cancellationToken);
|
||||||
|
|
||||||
// Only take the name and rating if the user's language is set to english, since Omdb has no localization
|
// Only take the name and rating if the user's language is set to english, since Omdb has no localization
|
||||||
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
item.Name = result.Title;
|
||||||
|
|
||||||
|
if (string.Equals(country, "us", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
item.Name = result.Title;
|
item.OfficialRating = result.Rated;
|
||||||
|
|
||||||
if (string.Equals(country, "us", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
item.OfficialRating = result.Rated;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int year;
|
int year;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(result.Year) && result.Year.Length >= 4
|
if (!string.IsNullOrEmpty(result.Year) && result.Year.Length >= 4
|
||||||
&& int.TryParse(result.Year.Substring(0, 4), NumberStyles.Number, _usCulture, out year)
|
&& int.TryParse(result.Year.Substring(0, 4), NumberStyles.Number, _usCulture, out year)
|
||||||
&& year >= 0)
|
&& year >= 0)
|
||||||
{
|
{
|
||||||
item.ProductionYear = year;
|
item.ProductionYear = year;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Seeing some bogus RT data on omdb for series, so filter it out here
|
// Seeing some bogus RT data on omdb for series, so filter it out here
|
||||||
// RT doesn't even have tv series
|
// RT doesn't even have tv series
|
||||||
@ -87,33 +87,33 @@ namespace MediaBrowser.Providers.Omdb
|
|||||||
|
|
||||||
int voteCount;
|
int voteCount;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(result.imdbVotes)
|
if (!string.IsNullOrEmpty(result.imdbVotes)
|
||||||
&& int.TryParse(result.imdbVotes, NumberStyles.Number, _usCulture, out voteCount)
|
&& int.TryParse(result.imdbVotes, NumberStyles.Number, _usCulture, out voteCount)
|
||||||
&& voteCount >= 0)
|
&& voteCount >= 0)
|
||||||
{
|
{
|
||||||
item.VoteCount = voteCount;
|
item.VoteCount = voteCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
float imdbRating;
|
float imdbRating;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(result.imdbRating)
|
if (!string.IsNullOrEmpty(result.imdbRating)
|
||||||
&& float.TryParse(result.imdbRating, NumberStyles.Any, _usCulture, out imdbRating)
|
&& float.TryParse(result.imdbRating, NumberStyles.Any, _usCulture, out imdbRating)
|
||||||
&& imdbRating >= 0)
|
&& imdbRating >= 0)
|
||||||
{
|
{
|
||||||
item.CommunityRating = imdbRating;
|
item.CommunityRating = imdbRating;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(result.Website))
|
if (!string.IsNullOrEmpty(result.Website))
|
||||||
{
|
{
|
||||||
item.HomePageUrl = result.Website;
|
item.HomePageUrl = result.Website;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(result.imdbID))
|
if (!string.IsNullOrWhiteSpace(result.imdbID))
|
||||||
{
|
{
|
||||||
item.SetProviderId(MetadataProviders.Imdb, result.imdbID);
|
item.SetProviderId(MetadataProviders.Imdb, result.imdbID);
|
||||||
}
|
}
|
||||||
|
|
||||||
ParseAdditionalMetadata(itemResult, result);
|
ParseAdditionalMetadata(itemResult, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> FetchEpisodeData<T>(MetadataResult<T> itemResult, int episodeNumber, int seasonNumber, string imdbId, string language, string country, CancellationToken cancellationToken)
|
public async Task<bool> FetchEpisodeData<T>(MetadataResult<T> itemResult, int episodeNumber, int seasonNumber, string imdbId, string language, string country, CancellationToken cancellationToken)
|
||||||
@ -135,7 +135,7 @@ namespace MediaBrowser.Providers.Omdb
|
|||||||
|
|
||||||
RootObject result = null;
|
RootObject result = null;
|
||||||
|
|
||||||
foreach (var episode in seasonResult.Episodes)
|
foreach (var episode in (seasonResult.Episodes ?? new RootObject[] { }))
|
||||||
{
|
{
|
||||||
if (episode.Episode == episodeNumber)
|
if (episode.Episode == episodeNumber)
|
||||||
{
|
{
|
||||||
|
@ -368,7 +368,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
var seasonNumber = i.Season.IndexNumber.Value + i.SeasonOffset;
|
var seasonNumber = i.Season.IndexNumber.Value + i.SeasonOffset;
|
||||||
|
|
||||||
// If there's a physical season with the same number, delete it
|
// If there's a physical season with the same number, delete it
|
||||||
if (physicalSeasons.Any(p => p.Season.IndexNumber.HasValue && (p.Season.IndexNumber.Value + p.SeasonOffset) == seasonNumber))
|
if (physicalSeasons.Any(p => p.Season.IndexNumber.HasValue && (p.Season.IndexNumber.Value + p.SeasonOffset) == seasonNumber && string.Equals(p.Season.Series.PresentationUniqueKey, i.Season.Series.PresentationUniqueKey, StringComparison.Ordinal)))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,9 @@ netsh advfirewall firewall delete rule name="Emby Server"
|
|||||||
netsh advfirewall firewall add rule name="Emby Server" dir=in action=allow protocol=TCP program=%4 enable=yes
|
netsh advfirewall firewall add rule name="Emby Server" dir=in action=allow protocol=TCP program=%4 enable=yes
|
||||||
netsh advfirewall firewall add rule name="Emby Server" dir=in action=allow protocol=UDP program=%4 enable=yes
|
netsh advfirewall firewall add rule name="Emby Server" dir=in action=allow protocol=UDP program=%4 enable=yes
|
||||||
|
|
||||||
|
netsh advfirewall firewall add rule name="mediabrowser.serverapplication.exe" dir=in action=allow protocol=TCP program=%4 enable=yes
|
||||||
|
netsh advfirewall firewall add rule name="mediabrowser.serverapplication.exe" dir=in action=allow protocol=UDP program=%4 enable=yes
|
||||||
|
|
||||||
|
|
||||||
:DONE
|
:DONE
|
||||||
Exit
|
Exit
|
Loading…
x
Reference in New Issue
Block a user