Merge pull request #2108 from MediaBrowser/dev

Dev
This commit is contained in:
Luke 2016-08-27 14:13:56 -04:00 committed by GitHub
commit 3f41aae7ac
39 changed files with 961 additions and 156 deletions

View File

@ -206,7 +206,6 @@ namespace MediaBrowser.Dlna
throw new ArgumentNullException("headers"); throw new ArgumentNullException("headers");
} }
//_logger.Debug("GetProfile. Headers: " + _jsonSerializer.SerializeToString(headers));
// Convert to case insensitive // Convert to case insensitive
headers = new Dictionary<string, string>(headers, StringComparer.OrdinalIgnoreCase); headers = new Dictionary<string, string>(headers, StringComparer.OrdinalIgnoreCase);
@ -218,16 +217,12 @@ namespace MediaBrowser.Dlna
} }
else else
{ {
string userAgent = null; var msg = new StringBuilder();
headers.TryGetValue("User-Agent", out userAgent); foreach (var header in headers)
var msg = "No matching device profile via headers found. The default will be used. ";
if (!string.IsNullOrEmpty(userAgent))
{ {
msg += "User-agent: " + userAgent + ". "; msg.AppendLine(header.Key + ": " + header.Value);
} }
_logger.LogMultiline("No matching device profile found. The default will need to be used.", LogSeverity.Info, msg);
_logger.Debug(msg);
} }
return profile; return profile;
@ -566,7 +561,10 @@ namespace MediaBrowser.Dlna
new SonyBravia2012Profile(), new SonyBravia2012Profile(),
new SonyBravia2013Profile(), new SonyBravia2013Profile(),
new SonyBravia2014Profile(), new SonyBravia2014Profile(),
new SonyBlurayPlayer2013Profile(), new SonyBlurayPlayer2013(),
new SonyBlurayPlayer2014(),
new SonyBlurayPlayer2015(),
new SonyBlurayPlayer2016(),
new SonyBlurayPlayerProfile(), new SonyBlurayPlayerProfile(),
new PanasonicVieraProfile(), new PanasonicVieraProfile(),
new WdtvLiveProfile(), new WdtvLiveProfile(),

View File

@ -94,6 +94,9 @@
<Compile Include="Profiles\DishHopperJoeyProfile.cs" /> <Compile Include="Profiles\DishHopperJoeyProfile.cs" />
<Compile Include="Profiles\KodiProfile.cs" /> <Compile Include="Profiles\KodiProfile.cs" />
<Compile Include="Profiles\PopcornHourProfile.cs" /> <Compile Include="Profiles\PopcornHourProfile.cs" />
<Compile Include="Profiles\SonyBlurayPlayer2016.cs" />
<Compile Include="Profiles\SonyBlurayPlayer2015.cs" />
<Compile Include="Profiles\SonyBlurayPlayer2014.cs" />
<Compile Include="Profiles\SonyBravia2014Profile.cs" /> <Compile Include="Profiles\SonyBravia2014Profile.cs" />
<Compile Include="Profiles\SonyPs4Profile.cs" /> <Compile Include="Profiles\SonyPs4Profile.cs" />
<Compile Include="Profiles\VlcProfile.cs" /> <Compile Include="Profiles\VlcProfile.cs" />
@ -137,7 +140,7 @@
<Compile Include="Profiles\LinksysDMA2100Profile.cs" /> <Compile Include="Profiles\LinksysDMA2100Profile.cs" />
<Compile Include="Profiles\PanasonicVieraProfile.cs" /> <Compile Include="Profiles\PanasonicVieraProfile.cs" />
<Compile Include="Profiles\SamsungSmartTvProfile.cs" /> <Compile Include="Profiles\SamsungSmartTvProfile.cs" />
<Compile Include="Profiles\SonyBlurayPlayer2013Profile.cs" /> <Compile Include="Profiles\SonyBlurayPlayer2013.cs" />
<Compile Include="Profiles\SonyBlurayPlayerProfile.cs" /> <Compile Include="Profiles\SonyBlurayPlayerProfile.cs" />
<Compile Include="Profiles\SonyBravia2010Profile.cs" /> <Compile Include="Profiles\SonyBravia2010Profile.cs" />
<Compile Include="Profiles\SonyBravia2011Profile.cs" /> <Compile Include="Profiles\SonyBravia2011Profile.cs" />
@ -244,6 +247,11 @@
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Profiles\Xml\Sony Blu-ray Player 2014.xml" />
<EmbeddedResource Include="Profiles\Xml\Sony Blu-ray Player 2015.xml" />
<EmbeddedResource Include="Profiles\Xml\Sony Blu-ray Player 2016.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -221,7 +221,7 @@ namespace MediaBrowser.Dlna.PlayTo
{ {
await _sessionManager.OnPlaybackStopped(new PlaybackStopInfo await _sessionManager.OnPlaybackStopped(new PlaybackStopInfo
{ {
ItemId = mediaInfo.Id, ItemId = streamInfo.ItemId,
SessionId = _session.Id, SessionId = _session.Id,
PositionTicks = positionTicks, PositionTicks = positionTicks,
MediaSourceId = streamInfo.MediaSourceId MediaSourceId = streamInfo.MediaSourceId

View File

@ -4,16 +4,14 @@ using System.Xml.Serialization;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {
[XmlRoot("Profile")] [XmlRoot("Profile")]
public class SonyBlurayPlayer2013Profile : DefaultProfile public class SonyBlurayPlayer2013 : DefaultProfile
{ {
public SonyBlurayPlayer2013Profile() public SonyBlurayPlayer2013()
{ {
Name = "Sony Blu-ray Player 2013"; Name = "Sony Blu-ray Player 2013";
Identification = new DeviceIdentification Identification = new DeviceIdentification
{ {
FriendlyName = @"Blu-ray Disc Player",
Manufacturer = "Sony",
ModelNumber = "BDP-2013" ModelNumber = "BDP-2013"
}; };
@ -36,9 +34,9 @@ namespace MediaBrowser.Dlna.Profiles
new TranscodingProfile new TranscodingProfile
{ {
Container = "ts", Container = "mkv",
VideoCodec = "h264", VideoCodec = "h264",
AudioCodec = "ac3", AudioCodec = "ac3,aac,mp3",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
@ -53,21 +51,21 @@ namespace MediaBrowser.Dlna.Profiles
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Container = "ts", Container = "ts,mpegts",
VideoCodec = "mpeg1video,mpeg2video,h264", VideoCodec = "mpeg1video,mpeg2video,h264",
AudioCodec = "ac3,aac,mp3,pcm", AudioCodec = "ac3,aac,mp3,pcm",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Container = "mpeg", Container = "mpeg,mpg",
VideoCodec = "mpeg1video,mpeg2video", VideoCodec = "mpeg1video,mpeg2video",
AudioCodec = "ac3,mp3,mp2,pcm", AudioCodec = "ac3,mp3,mp2,pcm",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Container = "mp4", Container = "mp4,m4v",
VideoCodec = "mpeg4,h264", VideoCodec = "mpeg4,h264",
AudioCodec = "ac3,aac,pcm,mp3", AudioCodec = "ac3,aac,pcm,mp3",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
@ -88,25 +86,24 @@ namespace MediaBrowser.Dlna.Profiles
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Container = "mp3", Container = "m2ts,mts",
AudioCodec = "mp3", VideoCodec = "h264,mpeg4,vc1",
AudioCodec = "aac,mp3,ac3,dca,dts",
Type = DlnaProfileType.Video
},
new DirectPlayProfile
{
Container = "wmv,asf",
Type = DlnaProfileType.Video
},
new DirectPlayProfile
{
Container = "mp3,m4a,wma,wav",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Container = "mp4", Container = "jpeg,png,gif",
AudioCodec = "aac",
Type = DlnaProfileType.Audio
},
new DirectPlayProfile
{
Container = "asf",
AudioCodec = "wmav2,wmapro,wmavoice",
Type = DlnaProfileType.Audio
},
new DirectPlayProfile
{
Container = "jpeg",
Type = DlnaProfileType.Photo Type = DlnaProfileType.Photo
} }
}; };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@
<MaxStreamingBitrate>20000000</MaxStreamingBitrate> <MaxStreamingBitrate>20000000</MaxStreamingBitrate>
<MaxStaticBitrate>20000000</MaxStaticBitrate> <MaxStaticBitrate>20000000</MaxStaticBitrate>
<MusicStreamingTranscodingBitrate>192000</MusicStreamingTranscodingBitrate> <MusicStreamingTranscodingBitrate>192000</MusicStreamingTranscodingBitrate>
<MusicSyncBitrate>192000</MusicSyncBitrate> <MaxStaticMusicBitrate xsi:nil="true" />
<XDlnaDoc>DMS-1.50</XDlnaDoc> <XDlnaDoc>DMS-1.50</XDlnaDoc>
<ProtocolInfo>http-get:*:video/mp2t:*,http-get:*:video/MP1S:*,http-get:*:video/mpeg2:*,http-get:*:video/mp4:*,http-get:*:video/x-matroska:*,http-get:*:audio/mpeg:*,http-get:*:audio/mpeg3:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4a-latm:*,http-get:*:image/jpeg:*</ProtocolInfo> <ProtocolInfo>http-get:*:video/mp2t:*,http-get:*:video/MP1S:*,http-get:*:video/mpeg2:*,http-get:*:video/mp4:*,http-get:*:video/x-matroska:*,http-get:*:audio/mpeg:*,http-get:*:audio/mpeg3:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4a-latm:*,http-get:*:image/jpeg:*</ProtocolInfo>
<TimelineOffsetSeconds>0</TimelineOffsetSeconds> <TimelineOffsetSeconds>0</TimelineOffsetSeconds>
@ -43,9 +43,9 @@
<DirectPlayProfile container="jpeg" type="Photo" /> <DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
<TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" /> <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles /> <ContainerProfiles />
<CodecProfiles> <CodecProfiles>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@
<MaxStreamingBitrate>20000000</MaxStreamingBitrate> <MaxStreamingBitrate>20000000</MaxStreamingBitrate>
<MaxStaticBitrate>20000000</MaxStaticBitrate> <MaxStaticBitrate>20000000</MaxStaticBitrate>
<MusicStreamingTranscodingBitrate>192000</MusicStreamingTranscodingBitrate> <MusicStreamingTranscodingBitrate>192000</MusicStreamingTranscodingBitrate>
<MusicSyncBitrate>192000</MusicSyncBitrate> <MaxStaticMusicBitrate xsi:nil="true" />
<XDlnaDoc>DMS-1.50</XDlnaDoc> <XDlnaDoc>DMS-1.50</XDlnaDoc>
<SonyAggregationFlags>10</SonyAggregationFlags> <SonyAggregationFlags>10</SonyAggregationFlags>
<ProtocolInfo>http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000</ProtocolInfo> <ProtocolInfo>http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000</ProtocolInfo>
@ -45,9 +45,9 @@
<DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" /> <DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -283,7 +283,7 @@ namespace MediaBrowser.Server.Implementations.Library
ExcludeItemTypes = excludeItemTypes, ExcludeItemTypes = excludeItemTypes,
ExcludeLocationTypes = new[] { LocationType.Virtual }, ExcludeLocationTypes = new[] { LocationType.Virtual },
Limit = limit * 5, Limit = limit * 5,
ExcludeSourceTypes = parentIds.Length == 0 ? new[] { SourceType.Channel, SourceType.LiveTV } : new SourceType[] { }, SourceTypes = parentIds.Length == 0 ? new[] { SourceType.Library } : new SourceType[] { },
IsPlayed = request.IsPlayed IsPlayed = request.IsPlayed
}, parentIds); }, parentIds);

View File

@ -937,7 +937,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
_saveItemCommand.GetParameter(index++).Value = item.Album; _saveItemCommand.GetParameter(index++).Value = item.Album;
_saveItemCommand.GetParameter(index++).Value = item.IsVirtualItem || (!item.IsFolder && item.LocationType == LocationType.Virtual); _saveItemCommand.GetParameter(index++).Value = item.IsVirtualItem;
var hasSeries = item as IHasSeries; var hasSeries = item as IHasSeries;
if (hasSeries != null) if (hasSeries != null)

View File

@ -64,25 +64,25 @@ namespace MediaBrowser.XbmcMetadata.Savers
writer.WriteElementString("aired", episode.PremiereDate.Value.ToLocalTime().ToString(formatString)); writer.WriteElementString("aired", episode.PremiereDate.Value.ToLocalTime().ToString(formatString));
} }
if (episode.AirsAfterSeasonNumber.HasValue) if (episode.AirsAfterSeasonNumber.HasValue && episode.AirsAfterSeasonNumber.Value != -1)
{ {
writer.WriteElementString("airsafter_season", episode.AirsAfterSeasonNumber.Value.ToString(UsCulture)); writer.WriteElementString("airsafter_season", episode.AirsAfterSeasonNumber.Value.ToString(UsCulture));
} }
if (episode.AirsBeforeEpisodeNumber.HasValue) if (episode.AirsBeforeEpisodeNumber.HasValue && episode.AirsBeforeEpisodeNumber.Value != -1)
{ {
writer.WriteElementString("airsbefore_episode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture)); writer.WriteElementString("airsbefore_episode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture));
} }
if (episode.AirsBeforeEpisodeNumber.HasValue) if (episode.AirsBeforeEpisodeNumber.HasValue && episode.AirsBeforeEpisodeNumber.Value != -1)
{ {
writer.WriteElementString("displayepisode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture)); writer.WriteElementString("displayepisode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture));
} }
if (episode.AirsBeforeSeasonNumber.HasValue) if (episode.AirsBeforeSeasonNumber.HasValue && episode.AirsBeforeSeasonNumber.Value != -1)
{ {
writer.WriteElementString("airsbefore_season", episode.AirsBeforeSeasonNumber.Value.ToString(UsCulture)); writer.WriteElementString("airsbefore_season", episode.AirsBeforeSeasonNumber.Value.ToString(UsCulture));
} }
var season = episode.AiredSeasonNumber; var season = episode.AiredSeasonNumber;
if (season.HasValue) if (season.HasValue && season.Value != -1)
{ {
writer.WriteElementString("displayseason", season.Value.ToString(UsCulture)); writer.WriteElementString("displayseason", season.Value.ToString(UsCulture));
} }