Browse Source

move usage reporter to server project

Luke Pulverenti 11 years ago
parent
commit
234dba2d9a

+ 1 - 6
MediaBrowser.Api/Playback/BaseStreamingService.cs

@@ -775,11 +775,6 @@ namespace MediaBrowser.Api.Playback
             return "copy";
             return "copy";
         }
         }
 
 
-        protected virtual bool SupportsThrottling
-        {
-            get { return false; }
-        }
-
         /// <summary>
         /// <summary>
         /// Gets the input argument.
         /// Gets the input argument.
         /// </summary>
         /// </summary>
@@ -788,7 +783,7 @@ namespace MediaBrowser.Api.Playback
         /// <returns>System.String.</returns>
         /// <returns>System.String.</returns>
         protected string GetInputArgument(string transcodingJobId, StreamState state)
         protected string GetInputArgument(string transcodingJobId, StreamState state)
         {
         {
-            if (SupportsThrottling && state.InputProtocol == MediaProtocol.File &&
+            if (state.InputProtocol == MediaProtocol.File &&
                state.RunTimeTicks.HasValue &&
                state.RunTimeTicks.HasValue &&
                state.VideoType == VideoType.VideoFile &&
                state.VideoType == VideoType.VideoFile &&
                !string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase))
                !string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase))

+ 0 - 3
MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj

@@ -96,9 +96,7 @@
     <Compile Include="ScheduledTasks\TaskManager.cs" />
     <Compile Include="ScheduledTasks\TaskManager.cs" />
     <Compile Include="ScheduledTasks\Tasks\DeleteCacheFileTask.cs" />
     <Compile Include="ScheduledTasks\Tasks\DeleteCacheFileTask.cs" />
     <Compile Include="ScheduledTasks\Tasks\DeleteLogFileTask.cs" />
     <Compile Include="ScheduledTasks\Tasks\DeleteLogFileTask.cs" />
-    <Compile Include="ScheduledTasks\Tasks\PluginUpdateTask.cs" />
     <Compile Include="ScheduledTasks\Tasks\ReloadLoggerFileTask.cs" />
     <Compile Include="ScheduledTasks\Tasks\ReloadLoggerFileTask.cs" />
-    <Compile Include="ScheduledTasks\Tasks\SystemUpdateTask.cs" />
     <Compile Include="Security\MBLicenseFile.cs" />
     <Compile Include="Security\MBLicenseFile.cs" />
     <Compile Include="Security\PluginSecurityManager.cs" />
     <Compile Include="Security\PluginSecurityManager.cs" />
     <Compile Include="Security\RegRecord.cs" />
     <Compile Include="Security\RegRecord.cs" />
@@ -106,7 +104,6 @@
     <Compile Include="Serialization\JsonSerializer.cs" />
     <Compile Include="Serialization\JsonSerializer.cs" />
     <Compile Include="Serialization\XmlSerializer.cs" />
     <Compile Include="Serialization\XmlSerializer.cs" />
     <Compile Include="Updates\InstallationManager.cs" />
     <Compile Include="Updates\InstallationManager.cs" />
-    <Compile Include="Security\UsageReporter.cs" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">
     <ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">

+ 1 - 1
MediaBrowser.Controller/Entities/UserViewBuilder.cs

@@ -392,7 +392,7 @@ namespace MediaBrowser.Controller.Entities
 
 
             var list = new List<BaseItem>();
             var list = new List<BaseItem>();
 
 
-            var category = "tv";
+            var category = "tvshows";
 
 
             list.Add(await GetUserView(category, CollectionType.TvResume, user, "0", parent).ConfigureAwait(false));
             list.Add(await GetUserView(category, CollectionType.TvResume, user, "0", parent).ConfigureAwait(false));
             list.Add(await GetUserView(category, CollectionType.TvNextUp, user, "1", parent).ConfigureAwait(false));
             list.Add(await GetUserView(category, CollectionType.TvNextUp, user, "1", parent).ConfigureAwait(false));

+ 5 - 5
MediaBrowser.Common.Implementations/Security/UsageReporter.cs → MediaBrowser.Server.Implementations/EntryPoints/UsageReporter.cs

@@ -1,11 +1,11 @@
-using MediaBrowser.Common.Net;
+using MediaBrowser.Common;
+using MediaBrowser.Common.Net;
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
-using System.Linq;
 using System.Threading;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
 
 
-namespace MediaBrowser.Common.Implementations.Security
+namespace MediaBrowser.Server.Implementations.EntryPoints
 {
 {
     public class UsageReporter
     public class UsageReporter
     {
     {
@@ -37,7 +37,7 @@ namespace MediaBrowser.Common.Implementations.Security
                 { "isservice", _applicationHost.IsRunningAsService.ToString().ToLower()}
                 { "isservice", _applicationHost.IsRunningAsService.ToString().ToLower()}
             };
             };
 
 
-            return _httpClient.Post(Constants.Constants.MbAdminUrl + "service/registration/ping", data, cancellationToken);
+            return _httpClient.Post(Common.Constants.Constants.MbAdminUrl + "service/registration/ping", data, cancellationToken);
         }
         }
 
 
         public Task ReportAppUsage(ClientInfo app, CancellationToken cancellationToken)
         public Task ReportAppUsage(ClientInfo app, CancellationToken cancellationToken)
@@ -59,7 +59,7 @@ namespace MediaBrowser.Common.Implementations.Security
                 { "platform", app.DeviceName }, 
                 { "platform", app.DeviceName }, 
             };
             };
 
 
-            return _httpClient.Post(Constants.Constants.MbAdminUrl + "service/registration/ping", data, cancellationToken);
+            return _httpClient.Post(Common.Constants.Constants.MbAdminUrl + "service/registration/ping", data, cancellationToken);
         }
         }
     }
     }
 
 

+ 3 - 2
MediaBrowser.Server.Implementations/Library/LibraryManager.cs

@@ -1485,9 +1485,10 @@ namespace MediaBrowser.Server.Implementations.Library
 
 
             var item = GetItemById(id) as UserView;
             var item = GetItemById(id) as UserView;
 
 
-            if (item == null || !string.Equals(item.Path, path, StringComparison.OrdinalIgnoreCase))
+            if (item == null || 
+                !string.Equals(item.Path, path, StringComparison.OrdinalIgnoreCase))
             {
             {
-                Directory.CreateDirectory(Path.GetDirectoryName(path));
+                Directory.CreateDirectory(path);
 
 
                 item = new UserView
                 item = new UserView
                 {
                 {

+ 3 - 0
MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj

@@ -135,6 +135,7 @@
     <Compile Include="EntryPoints\RefreshUsersMetadata.cs" />
     <Compile Include="EntryPoints\RefreshUsersMetadata.cs" />
     <Compile Include="EntryPoints\UsageEntryPoint.cs" />
     <Compile Include="EntryPoints\UsageEntryPoint.cs" />
     <Compile Include="Connect\ConnectEntryPoint.cs" />
     <Compile Include="Connect\ConnectEntryPoint.cs" />
+    <Compile Include="EntryPoints\UsageReporter.cs" />
     <Compile Include="FileOrganization\EpisodeFileOrganizer.cs" />
     <Compile Include="FileOrganization\EpisodeFileOrganizer.cs" />
     <Compile Include="FileOrganization\Extensions.cs" />
     <Compile Include="FileOrganization\Extensions.cs" />
     <Compile Include="FileOrganization\FileOrganizationService.cs" />
     <Compile Include="FileOrganization\FileOrganizationService.cs" />
@@ -240,8 +241,10 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="ScheduledTasks\PeopleValidationTask.cs" />
     <Compile Include="ScheduledTasks\PeopleValidationTask.cs" />
     <Compile Include="ScheduledTasks\ChapterImagesTask.cs" />
     <Compile Include="ScheduledTasks\ChapterImagesTask.cs" />
+    <Compile Include="ScheduledTasks\PluginUpdateTask.cs" />
     <Compile Include="ScheduledTasks\RefreshIntrosTask.cs" />
     <Compile Include="ScheduledTasks\RefreshIntrosTask.cs" />
     <Compile Include="ScheduledTasks\RefreshMediaLibraryTask.cs" />
     <Compile Include="ScheduledTasks\RefreshMediaLibraryTask.cs" />
+    <Compile Include="ScheduledTasks\SystemUpdateTask.cs" />
     <Compile Include="Security\AuthenticationException.cs" />
     <Compile Include="Security\AuthenticationException.cs" />
     <Compile Include="Security\AuthenticationRepository.cs" />
     <Compile Include="Security\AuthenticationRepository.cs" />
     <Compile Include="Security\EncryptionManager.cs" />
     <Compile Include="Security\EncryptionManager.cs" />

+ 3 - 2
MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs → MediaBrowser.Server.Implementations/ScheduledTasks/PluginUpdateTask.cs

@@ -1,4 +1,5 @@
-using MediaBrowser.Common.ScheduledTasks;
+using MediaBrowser.Common;
+using MediaBrowser.Common.ScheduledTasks;
 using MediaBrowser.Common.Updates;
 using MediaBrowser.Common.Updates;
 using MediaBrowser.Model.Logging;
 using MediaBrowser.Model.Logging;
 using MediaBrowser.Model.Net;
 using MediaBrowser.Model.Net;
@@ -9,7 +10,7 @@ using System.Linq;
 using System.Threading;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
 
 
-namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
+namespace MediaBrowser.Server.Implementations.ScheduledTasks
 {
 {
     /// <summary>
     /// <summary>
     /// Plugin Update Task
     /// Plugin Update Task

+ 3 - 2
MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/SystemUpdateTask.cs → MediaBrowser.Server.Implementations/ScheduledTasks/SystemUpdateTask.cs

@@ -1,4 +1,5 @@
-using MediaBrowser.Common.Configuration;
+using MediaBrowser.Common;
+using MediaBrowser.Common.Configuration;
 using MediaBrowser.Common.ScheduledTasks;
 using MediaBrowser.Common.ScheduledTasks;
 using MediaBrowser.Model.Logging;
 using MediaBrowser.Model.Logging;
 using System;
 using System;
@@ -6,7 +7,7 @@ using System.Collections.Generic;
 using System.Threading;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
 
 
-namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
+namespace MediaBrowser.Server.Implementations.ScheduledTasks
 {
 {
     /// <summary>
     /// <summary>
     /// Plugin Update Task
     /// Plugin Update Task

+ 2 - 2
Nuget/MediaBrowser.Common.Internal.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
 <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
     <metadata>
     <metadata>
         <id>MediaBrowser.Common.Internal</id>
         <id>MediaBrowser.Common.Internal</id>
-        <version>3.0.431</version>
+        <version>3.0.433</version>
         <title>MediaBrowser.Common.Internal</title>
         <title>MediaBrowser.Common.Internal</title>
         <authors>Luke</authors>
         <authors>Luke</authors>
         <owners>ebr,Luke,scottisafool</owners>
         <owners>ebr,Luke,scottisafool</owners>
@@ -12,7 +12,7 @@
         <description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
         <description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
         <copyright>Copyright © Media Browser 2013</copyright>
         <copyright>Copyright © Media Browser 2013</copyright>
         <dependencies>
         <dependencies>
-            <dependency id="MediaBrowser.Common" version="3.0.431" />
+            <dependency id="MediaBrowser.Common" version="3.0.433" />
             <dependency id="NLog" version="3.1.0.0" />
             <dependency id="NLog" version="3.1.0.0" />
             <dependency id="SimpleInjector" version="2.5.2" />
             <dependency id="SimpleInjector" version="2.5.2" />
             <dependency id="sharpcompress" version="0.10.2" />
             <dependency id="sharpcompress" version="0.10.2" />

+ 1 - 1
Nuget/MediaBrowser.Common.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
 <package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
     <metadata>
     <metadata>
         <id>MediaBrowser.Common</id>
         <id>MediaBrowser.Common</id>
-        <version>3.0.431</version>
+        <version>3.0.433</version>
         <title>MediaBrowser.Common</title>
         <title>MediaBrowser.Common</title>
         <authors>Media Browser Team</authors>
         <authors>Media Browser Team</authors>
         <owners>ebr,Luke,scottisafool</owners>
         <owners>ebr,Luke,scottisafool</owners>

+ 1 - 1
Nuget/MediaBrowser.Model.Signed.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
 <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
     <metadata>
     <metadata>
         <id>MediaBrowser.Model.Signed</id>
         <id>MediaBrowser.Model.Signed</id>
-        <version>3.0.431</version>
+        <version>3.0.433</version>
         <title>MediaBrowser.Model - Signed Edition</title>
         <title>MediaBrowser.Model - Signed Edition</title>
         <authors>Media Browser Team</authors>
         <authors>Media Browser Team</authors>
         <owners>ebr,Luke,scottisafool</owners>
         <owners>ebr,Luke,scottisafool</owners>

+ 2 - 2
Nuget/MediaBrowser.Server.Core.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
 <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
     <metadata>
     <metadata>
         <id>MediaBrowser.Server.Core</id>
         <id>MediaBrowser.Server.Core</id>
-        <version>3.0.431</version>
+        <version>3.0.433</version>
         <title>Media Browser.Server.Core</title>
         <title>Media Browser.Server.Core</title>
         <authors>Media Browser Team</authors>
         <authors>Media Browser Team</authors>
         <owners>ebr,Luke,scottisafool</owners>
         <owners>ebr,Luke,scottisafool</owners>
@@ -12,7 +12,7 @@
         <description>Contains core components required to build plugins for Media Browser Server.</description>
         <description>Contains core components required to build plugins for Media Browser Server.</description>
         <copyright>Copyright © Media Browser 2013</copyright>
         <copyright>Copyright © Media Browser 2013</copyright>
         <dependencies>
         <dependencies>
-            <dependency id="MediaBrowser.Common" version="3.0.431" />
+            <dependency id="MediaBrowser.Common" version="3.0.433" />
         </dependencies>
         </dependencies>
     </metadata>
     </metadata>
     <files>
     <files>