Optimize identity
This commit is contained in:
parent
ad03b16689
commit
277ec77d15
|
@ -510,8 +510,11 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
||||||
return directoryName;
|
return directoryName;
|
||||||
}
|
}
|
||||||
return Path.GetFileNameWithoutExtension(info.Path) ?? info.Name;
|
return Path.GetFileNameWithoutExtension(info.Path) ?? info.Name;
|
||||||
default:
|
case EpisodeInfo:
|
||||||
return Path.GetFileNameWithoutExtension(info.Path) ?? info.Name;
|
return Path.GetFileNameWithoutExtension(info.Path) ?? info.Name;
|
||||||
|
default:
|
||||||
|
// series和season文件名没扩展名
|
||||||
|
return Path.GetFileName(info.Path) ?? info.Name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,6 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
||||||
{
|
{
|
||||||
ProviderIds = new Dictionary<string, string> { { DoubanProviderId, subject.Sid } },
|
ProviderIds = new Dictionary<string, string> { { DoubanProviderId, subject.Sid } },
|
||||||
Name = subject.Name,
|
Name = subject.Name,
|
||||||
OriginalTitle = subject.OriginalName,
|
|
||||||
CommunityRating = subject.Rating,
|
CommunityRating = subject.Rating,
|
||||||
Overview = subject.Intro,
|
Overview = subject.Intro,
|
||||||
ProductionYear = subject.Year,
|
ProductionYear = subject.Year,
|
||||||
|
@ -111,7 +110,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
||||||
|
|
||||||
|
|
||||||
// 豆瓣找不到季数据,尝试获取tmdb的季数据
|
// 豆瓣找不到季数据,尝试获取tmdb的季数据
|
||||||
if (string.IsNullOrEmpty(seasonSid) && !string.IsNullOrWhiteSpace(seriesTmdbId) && (seasonNumber.HasValue && seasonNumber > 0))
|
if (string.IsNullOrEmpty(seasonSid) && !string.IsNullOrWhiteSpace(seriesTmdbId) && seasonNumber.HasValue && seasonNumber >= 0)
|
||||||
{
|
{
|
||||||
var tmdbResult = await this.GetMetadataByTmdb(info, seriesTmdbId, seasonNumber.Value, cancellationToken).ConfigureAwait(false);
|
var tmdbResult = await this.GetMetadataByTmdb(info, seriesTmdbId, seasonNumber.Value, cancellationToken).ConfigureAwait(false);
|
||||||
if (tmdbResult != null)
|
if (tmdbResult != null)
|
||||||
|
|
Loading…
Reference in New Issue