fix NRE in person provider

This commit is contained in:
PingWin committed 2020-07-09 13:01:08 +03:00
1 parent d08e0096db
commit d786e04081
7 files changed
+254 -11

No files matched your search

+2 -2
View File
@@ -14,7 +14,7 @@
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary",
"/property:Version=10.6.0.1"
"/property:Version=10.6.0.2"
],
"group": "build",
"presentation": {
@@ -29,7 +29,7 @@
"args": [
"Compress-Archive",
"-Path", "${workspaceFolder}/src/Jellyfin.Plugin.Kinopoisk/bin/Debug/netstandard2.1/Jellyfin.Plugin.Kinopoisk.dll",
"-DestinationPath", "${workspaceFolder}/dist/jellyfin-plugin-kinopoisk_10.6.0.1.zip"
"-DestinationPath", "${workspaceFolder}/dist/jellyfin-plugin-kinopoisk_10.6.0.2.zip"
],
"group": "build",
"presentation": {
+137
View File
@@ -0,0 +1,137 @@
<?xml version="1.0"?>
<Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>Samsung Smart TV</Name>
<Identification>
<FriendlyName />
<ModelNumber />
<SerialNumber />
<ModelName />
<DeviceDescription />
<ModelUrl>samsung.com</ModelUrl>
<Manufacturer />
<ManufacturerUrl />
<Headers>
<HttpHeaderInfo name="User-Agent" value="SEC_" match="Substring" />
</Headers>
</Identification>
<FriendlyName />
<Manufacturer>Jellyfin</Manufacturer>
<ManufacturerUrl>https://github.com/jellyfin/jellyfin</ManufacturerUrl>
<ModelName>Jellyfin Server</ModelName>
<ModelNumber>01</ModelNumber>
<ModelUrl>https://github.com/jellyfin/jellyfin</ModelUrl>
<SerialNumber />
<EnableAlbumArtInDidl>true</EnableAlbumArtInDidl>
<EnableSingleAlbumArtLimit>true</EnableSingleAlbumArtLimit>
<EnableSingleSubtitleLimit>false</EnableSingleSubtitleLimit>
<SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
<UserId />
<AlbumArtPn>JPEG_SM</AlbumArtPn>
<MaxAlbumArtWidth>480</MaxAlbumArtWidth>
<MaxAlbumArtHeight>480</MaxAlbumArtHeight>
<MaxIconWidth>48</MaxIconWidth>
<MaxIconHeight>48</MaxIconHeight>
<MaxStreamingBitrate>140000000</MaxStreamingBitrate>
<MaxStaticBitrate>140000000</MaxStaticBitrate>
<MusicStreamingTranscodingBitrate>192000</MusicStreamingTranscodingBitrate>
<MaxStaticMusicBitrate xsi:nil="true" />
<SonyAggregationFlags />
<ProtocolInfo>http-get:*:video/mpeg:*,http-get:*:video/mp4:*,http-get:*:video/vnd.dlna.mpeg-tts:*,http-get:*:video/avi:*,http-get:*:video/x-matroska:*,http-get:*:video/x-ms-wmv:*,http-get:*:video/wtv:*,http-get:*:audio/mpeg:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/x-ms-wma:*,http-get:*:audio/wav:*,http-get:*:audio/L16:*,http-get:*:image/jpeg:*,http-get:*:image/png:*,http-get:*:image/gif:*,http-get:*:image/tiff:*</ProtocolInfo>
<TimelineOffsetSeconds>0</TimelineOffsetSeconds>
<RequiresPlainVideoItems>true</RequiresPlainVideoItems>
<RequiresPlainFolders>true</RequiresPlainFolders>
<EnableMSMediaReceiverRegistrar>false</EnableMSMediaReceiverRegistrar>
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<XmlRootAttributes>
<XmlAttribute name="xmlns:sec" value="http://www.sec.co.kr/" />
</XmlRootAttributes>
<DirectPlayProfiles>
<DirectPlayProfile container="asf" audioCodec="mp3,ac3,wmav2,wmapro,wmavoice" videoCodec="h264,mpeg4,mjpeg" type="Video" />
<DirectPlayProfile container="avi" audioCodec="mp3,ac3,dca,dts" videoCodec="h264,mpeg4,mjpeg" type="Video" />
<DirectPlayProfile container="mkv" audioCodec="aac,mp3,dca,dts" videoCodec="h264,mpeg4,mjpeg4" type="Video" />
<DirectPlayProfile container="mp4,m4v" audioCodec="mp3,aac" videoCodec="h264,mpeg4" type="Video" />
<DirectPlayProfile container="3gp" audioCodec="aac,he-aac" videoCodec="h264,mpeg4" type="Video" />
<DirectPlayProfile container="mpg,mpeg" audioCodec="ac3,mp2,mp3,aac" videoCodec="mpeg1video,mpeg2video,h264" type="Video" />
<DirectPlayProfile container="vro,vob" audioCodec="ac3,mp2,mp3" videoCodec="mpeg1video,mpeg2video" type="Video" />
<DirectPlayProfile container="ts" audioCodec="ac3,aac,mp3,eac3" videoCodec="mpeg2video,h264,vc1" type="Video" />
<DirectPlayProfile container="asf" audioCodec="wmav2,wmavoice" videoCodec="wmv2,wmv3" type="Video" />
<DirectPlayProfile container="mp3,flac" type="Audio" />
<DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles>
<TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" minSegments="0" segmentLength="0" breakOnNonKeyFrames="false" />
<TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" maxAudioChannels="2" protocol="Http" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" minSegments="0" segmentLength="0" breakOnNonKeyFrames="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" minSegments="0" segmentLength="0" breakOnNonKeyFrames="false" />
</TranscodingProfiles>
<ContainerProfiles>
<ContainerProfile type="Photo">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
</Conditions>
</ContainerProfile>
</ContainerProfiles>
<CodecProfiles>
<CodecProfile type="Video" codec="mpeg2video">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="30720000" isRequired="true" />
</Conditions>
<ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="mpeg4">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="8192000" isRequired="true" />
</Conditions>
<ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="h264">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="37500000" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions>
<ApplyConditions />
</CodecProfile>
<CodecProfile type="Video" codec="wmv2,wmv3,vc1">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="25600000" isRequired="true" />
</Conditions>
<ApplyConditions />
</CodecProfile>
<CodecProfile type="VideoAudio" codec="wmav2,dca,aac,mp3,dts">
<Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions>
<ApplyConditions />
</CodecProfile>
</CodecProfiles>
<ResponseProfiles>
<ResponseProfile container="avi" type="Video" mimeType="video/x-msvideo">
<Conditions />
</ResponseProfile>
<ResponseProfile container="mkv" type="Video" mimeType="video/x-mkv">
<Conditions />
</ResponseProfile>
<ResponseProfile container="flac" type="Audio" mimeType="audio/x-flac">
<Conditions />
</ResponseProfile>
<ResponseProfile container="m4v" type="Video" mimeType="video/mp4">
<Conditions />
</ResponseProfile>
</ResponseProfiles>
<SubtitleProfiles>
<SubtitleProfile format="srt" method="Embed" />
<SubtitleProfile format="srt" method="External" didlMode="CaptionInfoEx" />
</SubtitleProfiles>
</Profile>
+94
View File
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<Client name="Samsung SmartTV">
<!-- Author: holzi -->
<!-- http://www.samsungdforum.com/Guide/View/Developer_Documentation/Technical_Notes/Player/Detailed_player_specification -->
<Identification>
<DeviceDescription>
<ModelUrl substring="samsung.com" />
</DeviceDescription>
</Identification>
<Settings>
<!-- <Setting name="IconResolution" value="320x320" /> -->
<!-- <Setting name="OnlyPlainVideoItems" value="true" /> -->
<Setting name="EmitAlbumArtResources" value="true" />
<Setting name="DirectPlayStreamSelection" value="true" />
<Setting name="IconResolution" value="320x240" />
<Setting name="IconPN" value="JPEG_SM" />
<Setting name="AlbumArtResolution" value="320x240" />
<Setting name="AlbumArtPN" value="JPEG_SM" />
</Settings>
<TranscodeTargets>
<VideoProfile container="mp4" codec="h264" audioCodec="ac3" context="static" />
<PhotoProfile container="jpeg" />
</TranscodeTargets>
<DirectPlayProfiles>
<VideoProfile container="asf" codec="h264,mpeg4,mjpeg" audioCodec="mp3,ac3,wmav2,wmapro,wmavoice" />
<VideoProfile container="avi" codec="h264,mpeg4,mjpeg" audioCodec="mp3,ac3,dca" />
<VideoProfile container="mkv" codec="h264,mpeg4,mjpeg" audioCodec="mp3,ac3,dca,aac" />
<VideoProfile container="mp4" codec="h264,mpeg4" audioCodec="mp3,aac,ac3" />
<VideoProfile container="3gpp" codec="h264,mpeg4" audioCodec="aac" />
<VideoProfile container="mpeg" codec="mpeg1video,mpeg2video,h264" audioCodec="ac3,mp2,mp3,aac" />
<VideoProfile container="mpegts" codec="mpeg2video,h264,vc1" audioCodec="aac,mp3,ac3" />
<VideoProfile container="asf" codec="wmv2,wmv3" audioCodec="wmav2,wmavoice" />
<PhotoProfile container="jpeg" />
</DirectPlayProfiles>
<CodecProfiles>
<VideoCodec name="mpeg2video">
<Limitations>
<UpperBound name="video.width" value="1920" isRequired="true" />
<UpperBound name="video.height" value="1080" isRequired="true" />
<UpperBound name="video.frameRate" value="30" />
<UpperBound name="video.bitrate" value="30720" />
</Limitations>
</VideoCodec>
<VideoCodec name="mpeg4">
<Limitations>
<UpperBound name="video.width" value="1920" isRequired="true" />
<UpperBound name="video.height" value="1080" isRequired="true" />
<UpperBound name="video.frameRate" value="30" />
<UpperBound name="video.bitrate" value="8192" />
</Limitations>
</VideoCodec>
<VideoCodec name="h264">
<Limitations>
<UpperBound name="video.width" value="1920" isRequired="true" />
<UpperBound name="video.height" value="1080" isRequired="true" />
<UpperBound name="video.frameRate" value="30" />
<UpperBound name="video.bitrate" value="37500" />
<UpperBound name="video.level" value="41" />
</Limitations>
</VideoCodec>
<VideoCodec name="wmv2,wmv3,vc1">
<Limitations>
<UpperBound name="video.width" value="1920" isRequired="true" />
<UpperBound name="video.height" value="1080" isRequired="true" />
<UpperBound name="video.frameRate" value="30" />
<UpperBound name="video.bitrate" value="25600" />
</Limitations>
</VideoCodec>
<VideoAudioCodec name="ac3,wmav2,dca,aac,mp3">
<Limitations>
<UpperBound name="audio.channels" value="2" />
</Limitations>
</VideoAudioCodec>
</CodecProfiles>
<ContainerProfiles>
<VideoContainer name="mp4">
<Limitations>
<Match name="part.optimizedForStreaming" value="1" isRequired="true" />
</Limitations>
</VideoContainer>
<PhotoContainer name="jpeg">
<Limitations>
<UpperBound name="media.width" value="1920" isRequired="true" />
<UpperBound name="media.height" value="1080" isRequired="true" />
</Limitations>
</PhotoContainer>
</ContainerProfiles>
<DlnaMediaProfiles>
<DlnaVideoProfile container="mkv" pn="" mimeType="video/x-mkv" />
<DlnaVideoProfile container="mp4" pn="" mimeType="video/mp4" />
<DlnaVideoProfile container="mpeg" pn="MPEG_PS_PAL" mimeType="video/mpeg" />
<DlnaVideoProfile container="mpegts" pn="MPEG_TS_HD_NA_T" mimeType="video/vnd.dlna.mpeg-tts" />
</DlnaMediaProfiles>
</Client>
+1
View File
@@ -0,0 +1 @@
50674e215597995b96da17b49ee7ad62 *jellyfin-plugin-kinopoisk_10.6.0.2.zip
Binary file not shown.
+17 -6
View File
@@ -8,15 +8,15 @@
"description": "Загружает рейтинги сайта КиноПоиск",
"versions": [
{
"checksum": "8f43d3943f5f60293c6fb0ccbe560096",
"changelog": "new release",
"checksum": "50674e215597995b96da17b49ee7ad62",
"changelog": "fix NRE in person provider",
"name": "КиноПоиск",
"targetAbi": "10.6.0",
"runtimes": "netframework,netcore",
"sourceUrl": "https://github.com/LinFor/jellyfin-plugin-kinopoisk/raw/master/dist/jellyfin-plugin-kinopoisk_10.6.0.0.zip",
"filename": "jellyfin-plugin-kinopoisk_10.6.0.0.zip",
"timestamp": "2020-07-07 10:00:00",
"version": "10.6.0.0"
"sourceUrl": "https://github.com/LinFor/jellyfin-plugin-kinopoisk/raw/master/dist/jellyfin-plugin-kinopoisk_10.6.0.2.zip",
"filename": "jellyfin-plugin-kinopoisk_10.6.0.2.zip",
"timestamp": "2020-07-09 13:00:00",
"version": "10.6.0.2"
},
{
"checksum": "a877cde0df7d70266fdb9362b72884c1",
@@ -28,6 +28,17 @@
"filename": "jellyfin-plugin-kinopoisk_10.6.0.1.zip",
"timestamp": "2020-07-07 19:00:00",
"version": "10.6.0.1"
},
{
"checksum": "8f43d3943f5f60293c6fb0ccbe560096",
"changelog": "new release",
"name": "КиноПоиск",
"targetAbi": "10.6.0",
"runtimes": "netframework,netcore",
"sourceUrl": "https://github.com/LinFor/jellyfin-plugin-kinopoisk/raw/master/dist/jellyfin-plugin-kinopoisk_10.6.0.0.zip",
"filename": "jellyfin-plugin-kinopoisk_10.6.0.0.zip",
"timestamp": "2020-07-07 10:00:00",
"version": "10.6.0.0"
}
]
}
@@ -192,11 +192,11 @@ namespace Jellyfin.Plugin.Kinopoisk
{
Name = src.NameRu,
ImageUrl = src.PosterUrl,
Role = src.Description,
Role = src.Description ?? string.Empty,
Type = src.ProfessionKey.ToPersonType()
};
if (string.IsNullOrWhiteSpace(res.Name))
res.Name = src.NameEn;
res.Name = src.NameEn ?? string.Empty;
res.SetProviderId(Utils.ProviderId, Convert.ToString(src.StaffId));
return res;
@@ -231,7 +231,7 @@ namespace Jellyfin.Plugin.Kinopoisk
case ProfessionEnum.ProducerUssr:
return PersonType.Producer;
default:
return null;
return string.Empty;
}
}