Explorar o código

Merge pull request #2108 from MediaBrowser/dev

Dev
Luke %!s(int64=8) %!d(string=hai) anos
pai
achega
3f41aae7ac
Modificáronse 39 ficheiros con 235 adicións e 72 borrados
  1. 8 10
      MediaBrowser.Dlna/DlnaManager.cs
  2. 9 1
      MediaBrowser.Dlna/MediaBrowser.Dlna.csproj
  3. 1 1
      MediaBrowser.Dlna/PlayTo/PlayToController.cs
  4. 15 18
      MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013.cs
  5. 23 0
      MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2014.cs
  6. 23 0
      MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2015.cs
  7. 33 0
      MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2016.cs
  8. 1 1
      MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml
  9. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Default.xml
  10. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml
  11. 1 1
      MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
  12. 4 4
      MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
  13. 2 2
      MediaBrowser.Dlna/Profiles/Xml/Kodi.xml
  14. 1 1
      MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml
  15. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml
  16. 1 1
      MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml
  17. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml
  18. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml
  19. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml
  20. 1 3
      MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
  21. 27 0
      MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml
  22. 27 0
      MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml
  23. 29 0
      MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml
  24. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
  25. 4 4
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml
  26. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml
  27. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml
  28. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml
  29. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2014).xml
  30. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml
  31. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 4.xml
  32. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Vlc.xml
  33. 1 1
      MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml
  34. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml
  35. 1 1
      MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml
  36. 1 1
      MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml
  37. 1 1
      MediaBrowser.Server.Implementations/Library/UserViewManager.cs
  38. 1 1
      MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
  39. 5 5
      MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs

+ 8 - 10
MediaBrowser.Dlna/DlnaManager.cs

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

+ 9 - 1
MediaBrowser.Dlna/MediaBrowser.Dlna.csproj

@@ -94,6 +94,9 @@
     <Compile Include="Profiles\DishHopperJoeyProfile.cs" />
     <Compile Include="Profiles\KodiProfile.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\SonyPs4Profile.cs" />
     <Compile Include="Profiles\VlcProfile.cs" />
@@ -137,7 +140,7 @@
     <Compile Include="Profiles\LinksysDMA2100Profile.cs" />
     <Compile Include="Profiles\PanasonicVieraProfile.cs" />
     <Compile Include="Profiles\SamsungSmartTvProfile.cs" />
-    <Compile Include="Profiles\SonyBlurayPlayer2013Profile.cs" />
+    <Compile Include="Profiles\SonyBlurayPlayer2013.cs" />
     <Compile Include="Profiles\SonyBlurayPlayerProfile.cs" />
     <Compile Include="Profiles\SonyBravia2010Profile.cs" />
     <Compile Include="Profiles\SonyBravia2011Profile.cs" />
@@ -244,6 +247,11 @@
   <ItemGroup>
     <None Include="packages.config" />
   </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" />
   <!-- 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.

+ 1 - 1
MediaBrowser.Dlna/PlayTo/PlayToController.cs

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

+ 15 - 18
MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013Profile.cs → MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013.cs

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

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 23 - 0
MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2014.cs


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 23 - 0
MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2015.cs


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 33 - 0
MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2016.cs


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Default.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml


+ 4 - 4
MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml

@@ -26,7 +26,7 @@
   <MaxStreamingBitrate>20000000</MaxStreamingBitrate>
   <MaxStaticBitrate>20000000</MaxStaticBitrate>
   <MusicStreamingTranscodingBitrate>192000</MusicStreamingTranscodingBitrate>
-  <MusicSyncBitrate>192000</MusicSyncBitrate>
+  <MaxStaticMusicBitrate xsi:nil="true" />
   <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>
   <TimelineOffsetSeconds>0</TimelineOffsetSeconds>
@@ -43,9 +43,9 @@
     <DirectPlayProfile container="jpeg" type="Photo" />
   </DirectPlayProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" 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" forceLiveStream="false" enableSubtitlesInManifest="false" />
-    <TranscodingProfile container="jpeg" type="Photo" 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" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   <ContainerProfiles />
   <CodecProfiles>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
MediaBrowser.Dlna/Profiles/Xml/Kodi.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 3
MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 27 - 0
MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 27 - 0
MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 29 - 0
MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml


+ 4 - 4
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml

@@ -26,7 +26,7 @@
   <MaxStreamingBitrate>20000000</MaxStreamingBitrate>
   <MaxStaticBitrate>20000000</MaxStaticBitrate>
   <MusicStreamingTranscodingBitrate>192000</MusicStreamingTranscodingBitrate>
-  <MusicSyncBitrate>192000</MusicSyncBitrate>
+  <MaxStaticMusicBitrate xsi:nil="true" />
   <XDlnaDoc>DMS-1.50</XDlnaDoc>
   <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>
@@ -45,9 +45,9 @@
     <DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />
   </DirectPlayProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" 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" forceLiveStream="false" enableSubtitlesInManifest="false" />
-    <TranscodingProfile container="jpeg" type="Photo" 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" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2014).xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 4.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Vlc.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml


+ 1 - 1
MediaBrowser.Server.Implementations/Library/UserViewManager.cs

@@ -283,7 +283,7 @@ namespace MediaBrowser.Server.Implementations.Library
                 ExcludeItemTypes = excludeItemTypes,
                 ExcludeLocationTypes = new[] { LocationType.Virtual },
                 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
 
             }, parentIds);

+ 1 - 1
MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs

@@ -937,7 +937,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
 
                     _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;
                     if (hasSeries != null)

+ 5 - 5
MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs

@@ -64,25 +64,25 @@ namespace MediaBrowser.XbmcMetadata.Savers
                 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));
             }
-            if (episode.AirsBeforeEpisodeNumber.HasValue)
+            if (episode.AirsBeforeEpisodeNumber.HasValue && episode.AirsBeforeEpisodeNumber.Value != -1)
             {
                 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));
             }
-            if (episode.AirsBeforeSeasonNumber.HasValue)
+            if (episode.AirsBeforeSeasonNumber.HasValue && episode.AirsBeforeSeasonNumber.Value != -1)
             {
                 writer.WriteElementString("airsbefore_season", episode.AirsBeforeSeasonNumber.Value.ToString(UsCulture));
             }
 
             var season = episode.AiredSeasonNumber;
-            if (season.HasValue)
+            if (season.HasValue && season.Value != -1)
             {
                 writer.WriteElementString("displayseason", season.Value.ToString(UsCulture));
             }

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio