aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-08 17:23:24 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-08 17:23:24 -0400
commitdce9093ba1f67a41c3bb9bca59ec9df77c5bd4bd (patch)
tree0f05da22d44941ddd39f4ec61e1b985696c0f183
parente653b41000c2116c555691f866710f2239553322 (diff)
split files into separate classes
-rw-r--r--MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj3
-rw-r--r--MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/ReloadLoggerFileTask.cs (renamed from MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/ReloadLoggerTask.cs)0
-rw-r--r--MediaBrowser.Common.Implementations/Security/MBRegistration.cs7
-rw-r--r--MediaBrowser.Common.Implementations/Security/RegRecord.cs11
-rw-r--r--MediaBrowser.Common/IApplicationHost.cs11
-rw-r--r--MediaBrowser.Common/IDependencyContainer.cs15
-rw-r--r--MediaBrowser.Common/MediaBrowser.Common.csproj5
-rw-r--r--MediaBrowser.Common/Net/IWebSocketConnection.cs12
-rw-r--r--MediaBrowser.Common/Net/WebSocketMessageInfo.cs16
-rw-r--r--MediaBrowser.Common/ScheduledTasks/IConfigurableScheduledTask.cs16
-rw-r--r--MediaBrowser.Common/ScheduledTasks/IHasKey.cs7
-rw-r--r--MediaBrowser.Common/ScheduledTasks/IScheduledTask.cs19
-rw-r--r--MediaBrowser.Common/Updates/InstallationEventArgs.cs6
-rw-r--r--MediaBrowser.Common/Updates/InstallationFailedEventArgs.cs9
-rw-r--r--MediaBrowser.Dlna/MediaBrowser.Dlna.csproj8
-rw-r--r--MediaBrowser.Dlna/PlayTo/DeviceEventArgs.cs28
-rw-r--r--MediaBrowser.Dlna/PlayTo/PlayToController.cs (renamed from MediaBrowser.Dlna/PlayTo/DlnaController.cs)0
-rw-r--r--MediaBrowser.Dlna/PlayTo/PlaybackProgressEventArgs.cs9
-rw-r--r--MediaBrowser.Dlna/PlayTo/PlaybackStartEventArgs.cs9
-rw-r--r--MediaBrowser.Dlna/PlayTo/PlaybackStoppedEventArgs.cs9
-rw-r--r--MediaBrowser.Dlna/PlayTo/TRANSPORTSTATE.cs11
-rw-r--r--MediaBrowser.Dlna/PlayTo/uParser.cs5
-rw-r--r--MediaBrowser.Dlna/PlayTo/uParserObject.cs9
-rw-r--r--MediaBrowser.Dlna/Profiles/DefaultProfile.cs4
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Default.xml4
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml4
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml4
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml4
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml4
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml4
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml4
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml4
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml4
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml4
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml4
-rw-r--r--MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml4
-rw-r--r--MediaBrowser.Model/Dlna/CodecProfile.cs7
-rw-r--r--MediaBrowser.Model/Dlna/ContainerProfile.cs8
-rw-r--r--MediaBrowser.Model/Dlna/DeviceProfile.cs7
-rw-r--r--MediaBrowser.Model/Dlna/DirectPlayProfile.cs22
-rw-r--r--MediaBrowser.Model/Dlna/ResponseProfile.cs24
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs65
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs28
-rw-r--r--MediaBrowser.Model/Dlna/TranscodingProfile.cs7
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs2
-rw-r--r--MediaBrowser.ServerApplication/Native/BrowserLauncher.cs2
46 files changed, 293 insertions, 156 deletions
diff --git a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj
index f6f800f4a..fcb66d0bd 100644
--- a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj
+++ b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj
@@ -95,11 +95,12 @@
<Compile Include="ScheduledTasks\Tasks\DeleteCacheFileTask.cs" />
<Compile Include="ScheduledTasks\Tasks\DeleteLogFileTask.cs" />
<Compile Include="ScheduledTasks\Tasks\PluginUpdateTask.cs" />
- <Compile Include="ScheduledTasks\Tasks\ReloadLoggerTask.cs" />
+ <Compile Include="ScheduledTasks\Tasks\ReloadLoggerFileTask.cs" />
<Compile Include="ScheduledTasks\Tasks\SystemUpdateTask.cs" />
<Compile Include="Security\MBLicenseFile.cs" />
<Compile Include="Security\MBRegistration.cs" />
<Compile Include="Security\PluginSecurityManager.cs" />
+ <Compile Include="Security\RegRecord.cs" />
<Compile Include="Serialization\JsonSerializer.cs" />
<Compile Include="Serialization\XmlSerializer.cs" />
<Compile Include="Updates\InstallationManager.cs" />
diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/ReloadLoggerTask.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/ReloadLoggerFileTask.cs
index 78f60632f..78f60632f 100644
--- a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/ReloadLoggerTask.cs
+++ b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/ReloadLoggerFileTask.cs
diff --git a/MediaBrowser.Common.Implementations/Security/MBRegistration.cs b/MediaBrowser.Common.Implementations/Security/MBRegistration.cs
index 1d64b5ea1..ca000df19 100644
--- a/MediaBrowser.Common.Implementations/Security/MBRegistration.cs
+++ b/MediaBrowser.Common.Implementations/Security/MBRegistration.cs
@@ -94,11 +94,4 @@ namespace MediaBrowser.Common.Implementations.Security
return new MBRegistrationRecord { IsRegistered = reg.registered, ExpirationDate = reg.expDate, RegChecked = true };
}
}
-
- class RegRecord
- {
- public string featId { get; set; }
- public bool registered { get; set; }
- public DateTime expDate { get; set; }
- }
}
diff --git a/MediaBrowser.Common.Implementations/Security/RegRecord.cs b/MediaBrowser.Common.Implementations/Security/RegRecord.cs
new file mode 100644
index 000000000..f4e4337bf
--- /dev/null
+++ b/MediaBrowser.Common.Implementations/Security/RegRecord.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace MediaBrowser.Common.Implementations.Security
+{
+ class RegRecord
+ {
+ public string featId { get; set; }
+ public bool registered { get; set; }
+ public DateTime expDate { get; set; }
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Common/IApplicationHost.cs b/MediaBrowser.Common/IApplicationHost.cs
index 0e2fef1e6..709a8e927 100644
--- a/MediaBrowser.Common/IApplicationHost.cs
+++ b/MediaBrowser.Common/IApplicationHost.cs
@@ -152,15 +152,4 @@ namespace MediaBrowser.Common
/// <returns>System.Object.</returns>
object CreateInstance(Type type);
}
-
- public interface IDependencyContainer
- {
- void RegisterSingleInstance<T>(T obj, bool manageLifetime = true)
- where T : class;
-
- void RegisterSingleInstance<T>(Func<T> func)
- where T : class;
-
- void Register(Type typeInterface, Type typeImplementation);
- }
}
diff --git a/MediaBrowser.Common/IDependencyContainer.cs b/MediaBrowser.Common/IDependencyContainer.cs
new file mode 100644
index 000000000..423c1740a
--- /dev/null
+++ b/MediaBrowser.Common/IDependencyContainer.cs
@@ -0,0 +1,15 @@
+using System;
+
+namespace MediaBrowser.Common
+{
+ public interface IDependencyContainer
+ {
+ void RegisterSingleInstance<T>(T obj, bool manageLifetime = true)
+ where T : class;
+
+ void RegisterSingleInstance<T>(Func<T> func)
+ where T : class;
+
+ void Register(Type typeInterface, Type typeImplementation);
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj
index 1da144649..2e7db5c35 100644
--- a/MediaBrowser.Common/MediaBrowser.Common.csproj
+++ b/MediaBrowser.Common/MediaBrowser.Common.csproj
@@ -60,6 +60,7 @@
<Compile Include="Events\EventHelper.cs" />
<Compile Include="Extensions\BaseExtensions.cs" />
<Compile Include="Extensions\ResourceNotFoundException.cs" />
+ <Compile Include="IDependencyContainer.cs" />
<Compile Include="IO\FileSystemRepository.cs" />
<Compile Include="IO\IFileSystem.cs" />
<Compile Include="IO\ProgressStream.cs" />
@@ -78,9 +79,12 @@
<Compile Include="Net\IWebSocketServer.cs" />
<Compile Include="Net\MimeTypes.cs" />
<Compile Include="Net\WebSocketConnectEventArgs.cs" />
+ <Compile Include="Net\WebSocketMessageInfo.cs" />
<Compile Include="Plugins\IDependencyModule.cs" />
<Compile Include="Plugins\IPlugin.cs" />
<Compile Include="Progress\ActionableProgress.cs" />
+ <Compile Include="ScheduledTasks\IConfigurableScheduledTask.cs" />
+ <Compile Include="ScheduledTasks\IHasKey.cs" />
<Compile Include="ScheduledTasks\IScheduledTask.cs" />
<Compile Include="ScheduledTasks\IScheduledTaskWorker.cs" />
<Compile Include="ScheduledTasks\ITaskManager.cs" />
@@ -98,6 +102,7 @@
<Compile Include="Security\ISecurityManager.cs" />
<Compile Include="Updates\IInstallationManager.cs" />
<Compile Include="Updates\InstallationEventArgs.cs" />
+ <Compile Include="Updates\InstallationFailedEventArgs.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
diff --git a/MediaBrowser.Common/Net/IWebSocketConnection.cs b/MediaBrowser.Common/Net/IWebSocketConnection.cs
index 482da131e..514a52d96 100644
--- a/MediaBrowser.Common/Net/IWebSocketConnection.cs
+++ b/MediaBrowser.Common/Net/IWebSocketConnection.cs
@@ -65,16 +65,4 @@ namespace MediaBrowser.Common.Net
/// <exception cref="System.ArgumentNullException">buffer</exception>
Task SendAsync(byte[] buffer, WebSocketMessageType type, CancellationToken cancellationToken);
}
-
- /// <summary>
- /// Class WebSocketMessageInfo
- /// </summary>
- public class WebSocketMessageInfo : WebSocketMessage<string>
- {
- /// <summary>
- /// Gets or sets the connection.
- /// </summary>
- /// <value>The connection.</value>
- public IWebSocketConnection Connection { get; set; }
- }
} \ No newline at end of file
diff --git a/MediaBrowser.Common/Net/WebSocketMessageInfo.cs b/MediaBrowser.Common/Net/WebSocketMessageInfo.cs
new file mode 100644
index 000000000..c1f935a7b
--- /dev/null
+++ b/MediaBrowser.Common/Net/WebSocketMessageInfo.cs
@@ -0,0 +1,16 @@
+using MediaBrowser.Model.Net;
+
+namespace MediaBrowser.Common.Net
+{
+ /// <summary>
+ /// Class WebSocketMessageInfo
+ /// </summary>
+ public class WebSocketMessageInfo : WebSocketMessage<string>
+ {
+ /// <summary>
+ /// Gets or sets the connection.
+ /// </summary>
+ /// <value>The connection.</value>
+ public IWebSocketConnection Connection { get; set; }
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Common/ScheduledTasks/IConfigurableScheduledTask.cs b/MediaBrowser.Common/ScheduledTasks/IConfigurableScheduledTask.cs
new file mode 100644
index 000000000..fc6963070
--- /dev/null
+++ b/MediaBrowser.Common/ScheduledTasks/IConfigurableScheduledTask.cs
@@ -0,0 +1,16 @@
+namespace MediaBrowser.Common.ScheduledTasks
+{
+ public interface IConfigurableScheduledTask
+ {
+ /// <summary>
+ /// Gets a value indicating whether this instance is hidden.
+ /// </summary>
+ /// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
+ bool IsHidden { get; }
+ /// <summary>
+ /// Gets a value indicating whether this instance is enabled.
+ /// </summary>
+ /// <value><c>true</c> if this instance is enabled; otherwise, <c>false</c>.</value>
+ bool IsEnabled { get; }
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Common/ScheduledTasks/IHasKey.cs b/MediaBrowser.Common/ScheduledTasks/IHasKey.cs
new file mode 100644
index 000000000..5736cb616
--- /dev/null
+++ b/MediaBrowser.Common/ScheduledTasks/IHasKey.cs
@@ -0,0 +1,7 @@
+namespace MediaBrowser.Common.ScheduledTasks
+{
+ public interface IHasKey
+ {
+ string Key { get; }
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Common/ScheduledTasks/IScheduledTask.cs b/MediaBrowser.Common/ScheduledTasks/IScheduledTask.cs
index e150f7f4e..351e96c7d 100644
--- a/MediaBrowser.Common/ScheduledTasks/IScheduledTask.cs
+++ b/MediaBrowser.Common/ScheduledTasks/IScheduledTask.cs
@@ -42,23 +42,4 @@ namespace MediaBrowser.Common.ScheduledTasks
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
IEnumerable<ITaskTrigger> GetDefaultTriggers();
}
-
- public interface IConfigurableScheduledTask
- {
- /// <summary>
- /// Gets a value indicating whether this instance is hidden.
- /// </summary>
- /// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
- bool IsHidden { get; }
- /// <summary>
- /// Gets a value indicating whether this instance is enabled.
- /// </summary>
- /// <value><c>true</c> if this instance is enabled; otherwise, <c>false</c>.</value>
- bool IsEnabled { get; }
- }
-
- public interface IHasKey
- {
- string Key { get; }
- }
}
diff --git a/MediaBrowser.Common/Updates/InstallationEventArgs.cs b/MediaBrowser.Common/Updates/InstallationEventArgs.cs
index 2c3a805de..9dc8ead83 100644
--- a/MediaBrowser.Common/Updates/InstallationEventArgs.cs
+++ b/MediaBrowser.Common/Updates/InstallationEventArgs.cs
@@ -1,5 +1,4 @@
using MediaBrowser.Model.Updates;
-using System;
namespace MediaBrowser.Common.Updates
{
@@ -9,9 +8,4 @@ namespace MediaBrowser.Common.Updates
public PackageVersionInfo PackageVersionInfo { get; set; }
}
-
- public class InstallationFailedEventArgs : InstallationEventArgs
- {
- public Exception Exception { get; set; }
- }
}
diff --git a/MediaBrowser.Common/Updates/InstallationFailedEventArgs.cs b/MediaBrowser.Common/Updates/InstallationFailedEventArgs.cs
new file mode 100644
index 000000000..69dc1ee98
--- /dev/null
+++ b/MediaBrowser.Common/Updates/InstallationFailedEventArgs.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace MediaBrowser.Common.Updates
+{
+ public class InstallationFailedEventArgs : InstallationEventArgs
+ {
+ public Exception Exception { get; set; }
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj b/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj
index fa609843b..d39bcbefe 100644
--- a/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj
+++ b/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj
@@ -59,18 +59,22 @@
<Compile Include="PlayTo\Device.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="PlayTo\DeviceEventArgs.cs" />
+ <Compile Include="PlayTo\PlaybackStartEventArgs.cs" />
<Compile Include="PlayTo\DeviceInfo.cs" />
<Compile Include="Common\DeviceService.cs" />
<Compile Include="Didl\DidlBuilder.cs" />
- <Compile Include="PlayTo\DlnaController.cs" />
+ <Compile Include="PlayTo\PlayToController.cs" />
<Compile Include="PlayTo\Extensions.cs" />
+ <Compile Include="PlayTo\PlaybackProgressEventArgs.cs" />
+ <Compile Include="PlayTo\PlaybackStoppedEventArgs.cs" />
<Compile Include="PlayTo\PlaylistItem.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="PlayTo\PlaylistItemFactory.cs" />
<Compile Include="PlayTo\PlayToManager.cs" />
<Compile Include="Common\ServiceAction.cs" />
+ <Compile Include="PlayTo\TRANSPORTSTATE.cs" />
+ <Compile Include="PlayTo\uParserObject.cs" />
<Compile Include="Profiles\Foobar2000Profile.cs" />
<Compile Include="Profiles\Windows81Profile.cs" />
<Compile Include="Profiles\WindowsMediaCenterProfile.cs" />
diff --git a/MediaBrowser.Dlna/PlayTo/DeviceEventArgs.cs b/MediaBrowser.Dlna/PlayTo/DeviceEventArgs.cs
deleted file mode 100644
index 67230c189..000000000
--- a/MediaBrowser.Dlna/PlayTo/DeviceEventArgs.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-
-namespace MediaBrowser.Dlna.PlayTo
-{
- public class PlaybackStartEventArgs : EventArgs
- {
- public uBaseObject MediaInfo { get; set; }
- }
-
- public class PlaybackProgressEventArgs : EventArgs
- {
- public uBaseObject MediaInfo { get; set; }
- }
-
- public class PlaybackStoppedEventArgs : EventArgs
- {
- public uBaseObject MediaInfo { get; set; }
- }
-
- public enum TRANSPORTSTATE
- {
- STOPPED,
- PLAYING,
- TRANSITIONING,
- PAUSED_PLAYBACK,
- PAUSED
- }
-}
diff --git a/MediaBrowser.Dlna/PlayTo/DlnaController.cs b/MediaBrowser.Dlna/PlayTo/PlayToController.cs
index ab342d635..ab342d635 100644
--- a/MediaBrowser.Dlna/PlayTo/DlnaController.cs
+++ b/MediaBrowser.Dlna/PlayTo/PlayToController.cs
diff --git a/MediaBrowser.Dlna/PlayTo/PlaybackProgressEventArgs.cs b/MediaBrowser.Dlna/PlayTo/PlaybackProgressEventArgs.cs
new file mode 100644
index 000000000..104697166
--- /dev/null
+++ b/MediaBrowser.Dlna/PlayTo/PlaybackProgressEventArgs.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace MediaBrowser.Dlna.PlayTo
+{
+ public class PlaybackProgressEventArgs : EventArgs
+ {
+ public uBaseObject MediaInfo { get; set; }
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Dlna/PlayTo/PlaybackStartEventArgs.cs b/MediaBrowser.Dlna/PlayTo/PlaybackStartEventArgs.cs
new file mode 100644
index 000000000..772eba55b
--- /dev/null
+++ b/MediaBrowser.Dlna/PlayTo/PlaybackStartEventArgs.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace MediaBrowser.Dlna.PlayTo
+{
+ public class PlaybackStartEventArgs : EventArgs
+ {
+ public uBaseObject MediaInfo { get; set; }
+ }
+}
diff --git a/MediaBrowser.Dlna/PlayTo/PlaybackStoppedEventArgs.cs b/MediaBrowser.Dlna/PlayTo/PlaybackStoppedEventArgs.cs
new file mode 100644
index 000000000..aac08cd6f
--- /dev/null
+++ b/MediaBrowser.Dlna/PlayTo/PlaybackStoppedEventArgs.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace MediaBrowser.Dlna.PlayTo
+{
+ public class PlaybackStoppedEventArgs : EventArgs
+ {
+ public uBaseObject MediaInfo { get; set; }
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Dlna/PlayTo/TRANSPORTSTATE.cs b/MediaBrowser.Dlna/PlayTo/TRANSPORTSTATE.cs
new file mode 100644
index 000000000..d58c4413c
--- /dev/null
+++ b/MediaBrowser.Dlna/PlayTo/TRANSPORTSTATE.cs
@@ -0,0 +1,11 @@
+namespace MediaBrowser.Dlna.PlayTo
+{
+ public enum TRANSPORTSTATE
+ {
+ STOPPED,
+ PLAYING,
+ TRANSITIONING,
+ PAUSED_PLAYBACK,
+ PAUSED
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Dlna/PlayTo/uParser.cs b/MediaBrowser.Dlna/PlayTo/uParser.cs
index a9ebd4fb0..838ddfc31 100644
--- a/MediaBrowser.Dlna/PlayTo/uParser.cs
+++ b/MediaBrowser.Dlna/PlayTo/uParser.cs
@@ -44,9 +44,4 @@ namespace MediaBrowser.Dlna.PlayTo
return UpnpContainer.Create(uItem.Element);
}
}
-
- public class uParserObject
- {
- public XElement Element { get; set; }
- }
}
diff --git a/MediaBrowser.Dlna/PlayTo/uParserObject.cs b/MediaBrowser.Dlna/PlayTo/uParserObject.cs
new file mode 100644
index 000000000..265ef7f8d
--- /dev/null
+++ b/MediaBrowser.Dlna/PlayTo/uParserObject.cs
@@ -0,0 +1,9 @@
+using System.Xml.Linq;
+
+namespace MediaBrowser.Dlna.PlayTo
+{
+ public class uParserObject
+ {
+ public XElement Element { get; set; }
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Dlna/Profiles/DefaultProfile.cs b/MediaBrowser.Dlna/Profiles/DefaultProfile.cs
index 9283f4ba4..409c646d9 100644
--- a/MediaBrowser.Dlna/Profiles/DefaultProfile.cs
+++ b/MediaBrowser.Dlna/Profiles/DefaultProfile.cs
@@ -19,8 +19,8 @@ namespace MediaBrowser.Dlna.Profiles
ModelDescription = "Media Browser";
ModelName = "Media Browser";
ModelNumber = "Media Browser";
- ModelUrl = "http://mediabrowser3.com/";
- ManufacturerUrl = "http://mediabrowser3.com/";
+ ModelUrl = "http://mediabrowser.tv/";
+ ManufacturerUrl = "http://mediabrowser.tv/";
AlbumArtPn = "JPEG_SM";
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Default.xml b/MediaBrowser.Dlna/Profiles/Xml/Default.xml
index f556e8504..f6b52a727 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Default.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Default.xml
@@ -3,11 +3,11 @@
<Name>Generic Device</Name>
<FriendlyName>Media Browser</FriendlyName>
<Manufacturer>Media Browser</Manufacturer>
- <ManufacturerUrl>http://mediabrowser3.com/</ManufacturerUrl>
+ <ManufacturerUrl>http://mediabrowser.tv/</ManufacturerUrl>
<ModelName>Media Browser</ModelName>
<ModelDescription>Media Browser</ModelDescription>
<ModelNumber>Media Browser</ModelNumber>
- <ModelUrl>http://mediabrowser3.com/</ModelUrl>
+ <ModelUrl>http://mediabrowser.tv/</ModelUrl>
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
<SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml b/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml
index 56a55ba02..22df1501d 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml
@@ -8,11 +8,11 @@
</Identification>
<FriendlyName>Media Browser</FriendlyName>
<Manufacturer>Media Browser</Manufacturer>
- <ManufacturerUrl>http://mediabrowser3.com/</ManufacturerUrl>
+ <ManufacturerUrl>http://mediabrowser.tv/</ManufacturerUrl>
<ModelName>Media Browser</ModelName>
<ModelDescription>Media Browser</ModelDescription>
<ModelNumber>Media Browser</ModelNumber>
- <ModelUrl>http://mediabrowser3.com/</ModelUrl>
+ <ModelUrl>http://mediabrowser.tv/</ModelUrl>
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
<SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml b/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml
index f449d5dee..49d45687f 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml
@@ -9,11 +9,11 @@
</Identification>
<FriendlyName>Media Browser</FriendlyName>
<Manufacturer>Media Browser</Manufacturer>
- <ManufacturerUrl>http://mediabrowser3.com/</ManufacturerUrl>
+ <ManufacturerUrl>http://mediabrowser.tv/</ManufacturerUrl>
<ModelName>Media Browser</ModelName>
<ModelDescription>Media Browser</ModelDescription>
<ModelNumber>Media Browser</ModelNumber>
- <ModelUrl>http://mediabrowser3.com/</ModelUrl>
+ <ModelUrl>http://mediabrowser.tv/</ModelUrl>
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
<SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml b/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml
index 9c2fb22e8..5476159f0 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml
@@ -7,11 +7,11 @@
</Identification>
<FriendlyName>Media Browser</FriendlyName>
<Manufacturer>Media Browser</Manufacturer>
- <ManufacturerUrl>http://mediabrowser3.com/</ManufacturerUrl>
+ <ManufacturerUrl>http://mediabrowser.tv/</ManufacturerUrl>
<ModelName>Media Browser</ModelName>
<ModelDescription>Media Browser</ModelDescription>
<ModelNumber>Media Browser</ModelNumber>
- <ModelUrl>http://mediabrowser3.com/</ModelUrl>
+ <ModelUrl>http://mediabrowser.tv/</ModelUrl>
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
<SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml b/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml
index bc661d439..2a54860b6 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml
@@ -10,11 +10,11 @@
</Identification>
<FriendlyName>Media Browser</FriendlyName>
<Manufacturer>Media Browser</Manufacturer>
- <ManufacturerUrl>http://mediabrowser3.com/</ManufacturerUrl>
+ <ManufacturerUrl>http://mediabrowser.tv/</ManufacturerUrl>
<ModelName>Media Browser</ModelName>
<ModelDescription>Media Browser</ModelDescription>
<ModelNumber>Media Browser</ModelNumber>
- <ModelUrl>http://mediabrowser3.com/</ModelUrl>
+ <ModelUrl>http://mediabrowser.tv/</ModelUrl>
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
<SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml b/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml
index 7b281abd1..a35f9b413 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml
@@ -9,11 +9,11 @@
</Identification>
<FriendlyName>Media Browser</FriendlyName>
<Manufacturer>Media Browser</Manufacturer>
- <ManufacturerUrl>http://mediabrowser3.com/</ManufacturerUrl>
+ <ManufacturerUrl>http://mediabrowser.tv/</ManufacturerUrl>
<ModelName>Media Browser</ModelName>
<ModelDescription>Media Browser</ModelDescription>
<ModelNumber>Media Browser</ModelNumber>
- <ModelUrl>http://mediabrowser3.com/</ModelUrl>
+ <ModelUrl>http://mediabrowser.tv/</ModelUrl>
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<EnableAlbumArtInDidl>true</EnableAlbumArtInDidl>
<SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
index 352299e0f..3a7e99eaa 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
@@ -9,11 +9,11 @@
</Identification>
<FriendlyName>Media Browser</FriendlyName>
<Manufacturer>Microsoft Corporation</Manufacturer>
- <ManufacturerUrl>http://mediabrowser3.com/</ManufacturerUrl>
+ <ManufacturerUrl>http://mediabrowser.tv/</ManufacturerUrl>
<ModelName>Windows Media Player Sharing</ModelName>
<ModelDescription>Media Browser</ModelDescription>
<ModelNumber>3.0</ModelNumber>
- <ModelUrl>http://mediabrowser3.com/</ModelUrl>
+ <ModelUrl>http://mediabrowser.tv/</ModelUrl>
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
<SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
index af35b5f1a..61b5d1a05 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
@@ -11,11 +11,11 @@
</Identification>
<FriendlyName>Media Browser</FriendlyName>
<Manufacturer>Microsoft Corporation</Manufacturer>
- <ManufacturerUrl>http://mediabrowser3.com/</ManufacturerUrl>
+ <ManufacturerUrl>http://mediabrowser.tv/</ManufacturerUrl>
<ModelName>Windows Media Player Sharing</ModelName>
<ModelDescription>Media Browser</ModelDescription>
<ModelNumber>3.0</ModelNumber>
- <ModelUrl>http://mediabrowser3.com/</ModelUrl>
+ <ModelUrl>http://mediabrowser.tv/</ModelUrl>
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
<SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml
index f870ac1b4..04768020c 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml
@@ -10,11 +10,11 @@
</Identification>
<FriendlyName>Media Browser</FriendlyName>
<Manufacturer>Media Browser</Manufacturer>
- <ManufacturerUrl>http://mediabrowser3.com/</ManufacturerUrl>
+ <ManufacturerUrl>http://mediabrowser.tv/</ManufacturerUrl>
<ModelName>Media Browser</ModelName>
<ModelDescription>Media Browser</ModelDescription>
<ModelNumber>Media Browser</ModelNumber>
- <ModelUrl>http://mediabrowser3.com/</ModelUrl>
+ <ModelUrl>http://mediabrowser.tv/</ModelUrl>
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
<SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml b/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml
index 3605003e1..5c28c4e38 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml
@@ -10,11 +10,11 @@
</Identification>
<FriendlyName>Media Browser</FriendlyName>
<Manufacturer>Media Browser</Manufacturer>
- <ManufacturerUrl>http://mediabrowser3.com/</ManufacturerUrl>
+ <ManufacturerUrl>http://mediabrowser.tv/</ManufacturerUrl>
<ModelName>Media Browser</ModelName>
<ModelDescription>Media Browser</ModelDescription>
<ModelNumber>Media Browser</ModelNumber>
- <ModelUrl>http://mediabrowser3.com/</ModelUrl>
+ <ModelUrl>http://mediabrowser.tv/</ModelUrl>
<IgnoreTranscodeByteRangeRequests>true</IgnoreTranscodeByteRangeRequests>
<EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
<SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml b/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml
index bbe2d5bcf..fc8d7692d 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml
@@ -8,11 +8,11 @@
</Identification>
<FriendlyName>Media Browser</FriendlyName>
<Manufacturer>Media Browser</Manufacturer>
- <ManufacturerUrl>http://mediabrowser3.com/</ManufacturerUrl>
+ <ManufacturerUrl>http://mediabrowser.tv/</ManufacturerUrl>
<ModelName>Media Browser</ModelName>
<ModelDescription>Media Browser</ModelDescription>
<ModelNumber>Media Browser</ModelNumber>
- <ModelUrl>http://mediabrowser3.com/</ModelUrl>
+ <ModelUrl>http://mediabrowser.tv/</ModelUrl>
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
<SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
diff --git a/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml b/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml
index 0b7e10c01..1d1b2375e 100644
--- a/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml
+++ b/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml
@@ -9,11 +9,11 @@
</Identification>
<FriendlyName>Media Browser</FriendlyName>
<Manufacturer>Media Browser</Manufacturer>
- <ManufacturerUrl>http://mediabrowser3.com/</ManufacturerUrl>
+ <ManufacturerUrl>http://mediabrowser.tv/</ManufacturerUrl>
<ModelName>Media Browser</ModelName>
<ModelDescription>Media Browser</ModelDescription>
<ModelNumber>Media Browser</ModelNumber>
- <ModelUrl>http://mediabrowser3.com/</ModelUrl>
+ <ModelUrl>http://mediabrowser.tv/</ModelUrl>
<IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
<EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
<SupportedMediaTypes>Audio</SupportedMediaTypes>
diff --git a/MediaBrowser.Model/Dlna/CodecProfile.cs b/MediaBrowser.Model/Dlna/CodecProfile.cs
index 61eb2f639..3e67b49f9 100644
--- a/MediaBrowser.Model/Dlna/CodecProfile.cs
+++ b/MediaBrowser.Model/Dlna/CodecProfile.cs
@@ -22,7 +22,12 @@ namespace MediaBrowser.Model.Dlna
public List<string> GetCodecs()
{
- return (Codec ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
+ List<string> list = new List<string>();
+ foreach (string i in (Codec ?? string.Empty).Split(','))
+ {
+ if (!string.IsNullOrEmpty(i)) list.Add(i);
+ }
+ return list;
}
public bool ContainsCodec(string codec)
diff --git a/MediaBrowser.Model/Dlna/ContainerProfile.cs b/MediaBrowser.Model/Dlna/ContainerProfile.cs
index 3a5fe3bd5..931194dd3 100644
--- a/MediaBrowser.Model/Dlna/ContainerProfile.cs
+++ b/MediaBrowser.Model/Dlna/ContainerProfile.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Linq;
using System.Xml.Serialization;
namespace MediaBrowser.Model.Dlna
@@ -20,7 +19,12 @@ namespace MediaBrowser.Model.Dlna
public List<string> GetContainers()
{
- return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
+ List<string> list = new List<string>();
+ foreach (string i in (Container ?? string.Empty).Split(','))
+ {
+ if (!string.IsNullOrEmpty(i)) list.Add(i);
+ }
+ return list;
}
}
}
diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs
index e0b682e4a..2b2453a23 100644
--- a/MediaBrowser.Model/Dlna/DeviceProfile.cs
+++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs
@@ -105,7 +105,12 @@ namespace MediaBrowser.Model.Dlna
public List<string> GetSupportedMediaTypes()
{
- return (SupportedMediaTypes ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
+ List<string> list = new List<string>();
+ foreach (string i in (SupportedMediaTypes ?? string.Empty).Split(','))
+ {
+ if (!string.IsNullOrEmpty(i)) list.Add(i);
+ }
+ return list;
}
public TranscodingProfile GetAudioTranscodingProfile(string container, string audioCodec)
diff --git a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
index 5cfcafca4..183299425 100644
--- a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
+++ b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Linq;
using System.Xml.Serialization;
namespace MediaBrowser.Model.Dlna
@@ -20,17 +19,32 @@ namespace MediaBrowser.Model.Dlna
public List<string> GetContainers()
{
- return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
+ List<string> list = new List<string>();
+ foreach (string i in (Container ?? string.Empty).Split(','))
+ {
+ if (!string.IsNullOrEmpty(i)) list.Add(i);
+ }
+ return list;
}
public List<string> GetAudioCodecs()
{
- return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
+ List<string> list = new List<string>();
+ foreach (string i in (AudioCodec ?? string.Empty).Split(','))
+ {
+ if (!string.IsNullOrEmpty(i)) list.Add(i);
+ }
+ return list;
}
public List<string> GetVideoCodecs()
{
- return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
+ List<string> list = new List<string>();
+ foreach (string i in (VideoCodec ?? string.Empty).Split(','))
+ {
+ if (!string.IsNullOrEmpty(i)) list.Add(i);
+ }
+ return list;
}
}
}
diff --git a/MediaBrowser.Model/Dlna/ResponseProfile.cs b/MediaBrowser.Model/Dlna/ResponseProfile.cs
index e84095ffe..c1735f3b7 100644
--- a/MediaBrowser.Model/Dlna/ResponseProfile.cs
+++ b/MediaBrowser.Model/Dlna/ResponseProfile.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Linq;
using System.Xml.Serialization;
namespace MediaBrowser.Model.Dlna
@@ -33,17 +32,32 @@ namespace MediaBrowser.Model.Dlna
public List<string> GetContainers()
{
- return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
+ List<string> list = new List<string>();
+ foreach (string i in (Container ?? string.Empty).Split(','))
+ {
+ if (!string.IsNullOrEmpty(i)) list.Add(i);
+ }
+ return list;
}
-
+
public List<string> GetAudioCodecs()
{
- return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
+ List<string> list = new List<string>();
+ foreach (string i in (AudioCodec ?? string.Empty).Split(','))
+ {
+ if (!string.IsNullOrEmpty(i)) list.Add(i);
+ }
+ return list;
}
public List<string> GetVideoCodecs()
{
- return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
+ List<string> list = new List<string>();
+ foreach (string i in (VideoCodec ?? string.Empty).Split(','))
+ {
+ if (!string.IsNullOrEmpty(i)) list.Add(i);
+ }
+ return list;
}
}
}
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index 02cee0dce..9acec20aa 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -24,12 +24,17 @@ namespace MediaBrowser.Model.Dlna
// Avoid implicitly captured closure
string mediaSourceId = options.MediaSourceId;
- mediaSources = mediaSources
- .Where(i => string.Equals(i.Id, mediaSourceId, StringComparison.OrdinalIgnoreCase))
- .ToList();
+ mediaSources = new List<MediaSourceInfo>();
+ foreach (MediaSourceInfo i in mediaSources)
+ {
+ if (string.Equals(i.Id, mediaSourceId, StringComparison.OrdinalIgnoreCase))
+ mediaSources.Add(i);
+ }
}
- List<StreamInfo> streams = mediaSources.Select(i => BuildAudioItem(i, options)).ToList();
+ List<StreamInfo> streams = new List<StreamInfo>();
+ foreach (MediaSourceInfo i in mediaSources)
+ streams.Add(BuildAudioItem(i, options));
foreach (StreamInfo stream in streams)
{
@@ -52,12 +57,17 @@ namespace MediaBrowser.Model.Dlna
// Avoid implicitly captured closure
string mediaSourceId = options.MediaSourceId;
- mediaSources = mediaSources
- .Where(i => string.Equals(i.Id, mediaSourceId, StringComparison.OrdinalIgnoreCase))
- .ToList();
+ mediaSources = new List<MediaSourceInfo>();
+ foreach (MediaSourceInfo i in mediaSources)
+ {
+ if (string.Equals(i.Id, mediaSourceId, StringComparison.OrdinalIgnoreCase))
+ mediaSources.Add(i);
+ }
}
- List<StreamInfo> streams = mediaSources.Select(i => BuildVideoItem(i, options)).ToList();
+ List<StreamInfo> streams = new List<StreamInfo>();
+ foreach (MediaSourceInfo i in mediaSources)
+ streams.Add(BuildVideoItem(i, options));
foreach (StreamInfo stream in streams)
{
@@ -72,8 +82,19 @@ namespace MediaBrowser.Model.Dlna
{
// Grab the first one that can be direct streamed
// If that doesn't produce anything, just take the first
- return streams.FirstOrDefault(i => i.IsDirectStream) ??
- streams.FirstOrDefault();
+ foreach (StreamInfo i in streams)
+ {
+ if (i.IsDirectStream)
+ {
+ return i;
+ }
+ }
+
+ foreach (StreamInfo stream in streams)
+ {
+ return stream;
+ }
+ return null;
}
private StreamInfo BuildAudioItem(MediaSourceInfo item, AudioOptions options)
@@ -191,8 +212,15 @@ namespace MediaBrowser.Model.Dlna
}
// Can't direct play, find the transcoding profile
- TranscodingProfile transcodingProfile = options.Profile.TranscodingProfiles
- .FirstOrDefault(i => i.Type == playlistItem.MediaType);
+ TranscodingProfile transcodingProfile = null;
+ foreach (TranscodingProfile i in options.Profile.TranscodingProfiles)
+ {
+ if (i.Type == playlistItem.MediaType)
+ {
+ transcodingProfile = i;
+ break;
+ }
+ }
if (transcodingProfile != null)
{
@@ -200,7 +228,7 @@ namespace MediaBrowser.Model.Dlna
playlistItem.Container = transcodingProfile.Container;
playlistItem.EstimateContentLength = transcodingProfile.EstimateContentLength;
playlistItem.TranscodeSeekInfo = transcodingProfile.TranscodeSeekInfo;
- playlistItem.AudioCodec = transcodingProfile.AudioCodec.Split(',').FirstOrDefault();
+ playlistItem.AudioCodec = transcodingProfile.AudioCodec.Split(',')[0];
playlistItem.VideoCodec = transcodingProfile.VideoCodec;
playlistItem.Protocol = transcodingProfile.Protocol;
playlistItem.AudioStreamIndex = options.AudioStreamIndex;
@@ -261,8 +289,15 @@ namespace MediaBrowser.Model.Dlna
MediaStream audioStream)
{
// See if it can be direct played
- DirectPlayProfile directPlay = profile.DirectPlayProfiles
- .FirstOrDefault(i => i.Type == DlnaProfileType.Video && IsVideoDirectPlaySupported(i, mediaSource, videoStream, audioStream));
+ DirectPlayProfile directPlay = null;
+ foreach (DirectPlayProfile i in profile.DirectPlayProfiles)
+ {
+ if (i.Type == DlnaProfileType.Video && IsVideoDirectPlaySupported(i, mediaSource, videoStream, audioStream))
+ {
+ directPlay = i;
+ break;
+ }
+ }
if (directPlay == null)
{
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index 9af3689b2..ba3005950 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -1,11 +1,10 @@
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
+using MediaBrowser.Model.MediaInfo;
using System;
using System.Collections.Generic;
using System.Globalization;
-using System.Linq;
-using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.Model.Dlna
{
@@ -134,14 +133,23 @@ namespace MediaBrowser.Model.Dlna
{
if (MediaSource != null)
{
- IEnumerable<MediaStream> audioStreams = MediaSource.MediaStreams.Where(i => i.Type == MediaStreamType.Audio);
-
if (AudioStreamIndex.HasValue)
{
- return audioStreams.FirstOrDefault(i => i.Index == AudioStreamIndex.Value);
+ foreach (MediaStream i in MediaSource.MediaStreams)
+ {
+ if (i.Index == AudioStreamIndex.Value && i.Type == MediaStreamType.Audio)
+ return i;
+ }
+ return null;
+ }
+
+ foreach (MediaStream stream in MediaSource.MediaStreams)
+ {
+ if (stream.Type == MediaStreamType.Audio)
+ return stream;
}
- return audioStreams.FirstOrDefault();
+ return null;
}
return null;
@@ -157,8 +165,12 @@ namespace MediaBrowser.Model.Dlna
{
if (MediaSource != null)
{
- return MediaSource.MediaStreams
- .FirstOrDefault(i => i.Type == MediaStreamType.Video && (i.Codec ?? string.Empty).IndexOf("jpeg", StringComparison.OrdinalIgnoreCase) == -1);
+ foreach (MediaStream i in MediaSource.MediaStreams)
+ {
+ if (i.Type == MediaStreamType.Video && (i.Codec ?? string.Empty).IndexOf("jpeg", StringComparison.OrdinalIgnoreCase) == -1)
+ return i;
+ }
+ return null;
}
return null;
diff --git a/MediaBrowser.Model/Dlna/TranscodingProfile.cs b/MediaBrowser.Model/Dlna/TranscodingProfile.cs
index 162d62718..bee5f2a69 100644
--- a/MediaBrowser.Model/Dlna/TranscodingProfile.cs
+++ b/MediaBrowser.Model/Dlna/TranscodingProfile.cs
@@ -35,7 +35,12 @@ namespace MediaBrowser.Model.Dlna
public List<string> GetAudioCodecs()
{
- return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
+ List<string> list = new List<string>();
+ foreach (string i in (AudioCodec ?? string.Empty).Split(','))
+ {
+ if (!string.IsNullOrEmpty(i)) list.Add(i);
+ }
+ return list;
}
}
}
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs
index 9d2de0f6d..7607ec98a 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs
@@ -138,7 +138,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
var notification = new NotificationRequest
{
- Description = "Please see mediabrowser3.com for details.",
+ Description = "Please see mediabrowser.tv for details.",
NotificationType = type
};
diff --git a/MediaBrowser.ServerApplication/Native/BrowserLauncher.cs b/MediaBrowser.ServerApplication/Native/BrowserLauncher.cs
index 39beee563..77a543ad7 100644
--- a/MediaBrowser.ServerApplication/Native/BrowserLauncher.cs
+++ b/MediaBrowser.ServerApplication/Native/BrowserLauncher.cs
@@ -45,7 +45,7 @@ namespace MediaBrowser.ServerApplication.Native
/// <param name="logger">The logger.</param>
public static void OpenCommunity(ILogger logger)
{
- OpenUrl("http://mediabrowser3.com/community", logger);
+ OpenUrl("http://mediabrowser.tv/community", logger);
}
/// <summary>