diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-11 01:43:42 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-11 01:43:42 -0500 |
| commit | 06afe47ee9716cb210067f3c09cd0c97722bd1c7 (patch) | |
| tree | fa856ef38f03fa051d446bc854e8d6d4b4f24899 /Emby.Server.Implementations | |
| parent | 369d5e8f09e4e6e7e493bf2049325251942cd215 (diff) | |
update server core project
Diffstat (limited to 'Emby.Server.Implementations')
4 files changed, 110 insertions, 108 deletions
diff --git a/Emby.Server.Implementations/Collections/CollectionsDynamicFolder.cs b/Emby.Server.Implementations/Collections/CollectionsDynamicFolder.cs new file mode 100644 index 000000000..4ff33e645 --- /dev/null +++ b/Emby.Server.Implementations/Collections/CollectionsDynamicFolder.cs @@ -0,0 +1,34 @@ +using MediaBrowser.Common.Configuration; +using MediaBrowser.Controller.Entities; +using System.IO; +using MediaBrowser.Common.IO; +using MediaBrowser.Model.IO; +using MediaBrowser.Controller.Collections; +using MediaBrowser.Controller.IO; + +namespace Emby.Server.Implementations.Collections +{ + public class CollectionsDynamicFolder : IVirtualFolderCreator + { + private readonly IApplicationPaths _appPaths; + private readonly IFileSystem _fileSystem; + + public CollectionsDynamicFolder(IApplicationPaths appPaths, IFileSystem fileSystem) + { + _appPaths = appPaths; + _fileSystem = fileSystem; + } + + public BasePluginFolder GetFolder() + { + var path = Path.Combine(_appPaths.DataPath, "collections"); + + _fileSystem.CreateDirectory(path); + + return new ManualCollectionsFolder + { + Path = path + }; + } + } +} diff --git a/Emby.Server.Implementations/Devices/CameraUploadsDynamicFolder.cs b/Emby.Server.Implementations/Devices/CameraUploadsDynamicFolder.cs new file mode 100644 index 000000000..e2d5d0272 --- /dev/null +++ b/Emby.Server.Implementations/Devices/CameraUploadsDynamicFolder.cs @@ -0,0 +1,41 @@ +using MediaBrowser.Common.Configuration; +using MediaBrowser.Controller.Entities; +using System; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using MediaBrowser.Common.IO; +using MediaBrowser.Controller.IO; +using MediaBrowser.Model.IO; +using MediaBrowser.Controller.Providers; +using MediaBrowser.Model.Serialization; +using MediaBrowser.Server.Implementations.Devices; + +namespace Emby.Server.Implementations.Devices +{ + public class CameraUploadsDynamicFolder : IVirtualFolderCreator + { + private readonly IApplicationPaths _appPaths; + private readonly IFileSystem _fileSystem; + + public CameraUploadsDynamicFolder(IApplicationPaths appPaths, IFileSystem fileSystem) + { + _appPaths = appPaths; + _fileSystem = fileSystem; + } + + public BasePluginFolder GetFolder() + { + var path = Path.Combine(_appPaths.DataPath, "camerauploads"); + + _fileSystem.CreateDirectory(path); + + return new CameraUploadsFolder + { + Path = path + }; + } + } + +} diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index cb15eca52..438edf212 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -43,11 +43,13 @@ <Compile Include="Channels\RefreshChannelsScheduledTask.cs" /> <Compile Include="Collections\CollectionImageProvider.cs" /> <Compile Include="Collections\CollectionManager.cs" /> + <Compile Include="Collections\CollectionsDynamicFolder.cs" /> <Compile Include="Connect\ConnectData.cs" /> <Compile Include="Connect\ConnectEntryPoint.cs" /> <Compile Include="Connect\ConnectManager.cs" /> <Compile Include="Connect\Responses.cs" /> <Compile Include="Connect\Validator.cs" /> + <Compile Include="Devices\CameraUploadsDynamicFolder.cs" /> <Compile Include="Devices\DeviceManager.cs" /> <Compile Include="Dto\DtoService.cs" /> <Compile Include="EntryPoints\AutomaticRestartEntryPoint.cs" /> @@ -175,6 +177,7 @@ <Compile Include="Photos\PhotoAlbumImageProvider.cs" /> <Compile Include="Playlists\PlaylistImageProvider.cs" /> <Compile Include="Playlists\PlaylistManager.cs" /> + <Compile Include="Playlists\PlaylistsDynamicFolder.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="ScheduledTasks\ChapterImagesTask.cs" /> <Compile Include="ScheduledTasks\PeopleValidationTask.cs" /> @@ -291,114 +294,6 @@ </Reference> </ItemGroup> <ItemGroup> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\backbone-min.js"> - <Link>swagger-ui\lib\backbone-min.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\handlebars-2.0.0.js"> - <Link>swagger-ui\lib\handlebars-2.0.0.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\highlight.7.3.pack.js"> - <Link>swagger-ui\lib\highlight.7.3.pack.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\jquery-1.8.0.min.js"> - <Link>swagger-ui\lib\jquery-1.8.0.min.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\jquery.ba-bbq.min.js"> - <Link>swagger-ui\lib\jquery.ba-bbq.min.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\jquery.slideto.min.js"> - <Link>swagger-ui\lib\jquery.slideto.min.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\jquery.wiggle.min.js"> - <Link>swagger-ui\lib\jquery.wiggle.min.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\marked.js"> - <Link>swagger-ui\lib\marked.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\shred.bundle.js"> - <Link>swagger-ui\lib\shred.bundle.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\swagger-client.js"> - <Link>swagger-ui\lib\swagger-client.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\swagger-oauth.js"> - <Link>swagger-ui\lib\swagger-oauth.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\underscore-min.js"> - <Link>swagger-ui\lib\underscore-min.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\o2c.html"> - <Link>swagger-ui\o2c.html</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\patch.js"> - <Link>swagger-ui\patch.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\swagger-ui.js"> - <Link>swagger-ui\swagger-ui.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\swagger-ui.min.js"> - <Link>swagger-ui\swagger-ui.min.js</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\fonts\droid-sans-v6-latin-700.eot"> - <Link>swagger-ui\fonts\droid-sans-v6-latin-700.eot</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\fonts\droid-sans-v6-latin-700.ttf"> - <Link>swagger-ui\fonts\droid-sans-v6-latin-700.ttf</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\fonts\droid-sans-v6-latin-700.woff"> - <Link>swagger-ui\fonts\droid-sans-v6-latin-700.woff</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\fonts\droid-sans-v6-latin-700.woff2"> - <Link>swagger-ui\fonts\droid-sans-v6-latin-700.woff2</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\fonts\droid-sans-v6-latin-regular.eot"> - <Link>swagger-ui\fonts\droid-sans-v6-latin-regular.eot</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\fonts\droid-sans-v6-latin-regular.ttf"> - <Link>swagger-ui\fonts\droid-sans-v6-latin-regular.ttf</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\fonts\droid-sans-v6-latin-regular.woff"> - <Link>swagger-ui\fonts\droid-sans-v6-latin-regular.woff</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\fonts\droid-sans-v6-latin-regular.woff2"> - <Link>swagger-ui\fonts\droid-sans-v6-latin-regular.woff2</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\css\reset.css"> - <Link>swagger-ui\css\reset.css</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\css\screen.css"> - <Link>swagger-ui\css\screen.css</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="..\ThirdParty\ServiceStack\swagger-ui\css\typography.css"> - <Link>swagger-ui\css\typography.css</Link> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> <EmbeddedResource Include="Localization\Core\ar.json" /> <EmbeddedResource Include="Localization\Core\bg-BG.json" /> <EmbeddedResource Include="Localization\Core\ca.json" /> diff --git a/Emby.Server.Implementations/Playlists/PlaylistsDynamicFolder.cs b/Emby.Server.Implementations/Playlists/PlaylistsDynamicFolder.cs new file mode 100644 index 000000000..dacc937e1 --- /dev/null +++ b/Emby.Server.Implementations/Playlists/PlaylistsDynamicFolder.cs @@ -0,0 +1,32 @@ +using System.IO; +using MediaBrowser.Common.Configuration; +using MediaBrowser.Controller.Entities; +using MediaBrowser.Model.IO; +using MediaBrowser.Server.Implementations.Playlists; + +namespace Emby.Server.Implementations.Playlists +{ + public class PlaylistsDynamicFolder : IVirtualFolderCreator + { + private readonly IApplicationPaths _appPaths; + private readonly IFileSystem _fileSystem; + + public PlaylistsDynamicFolder(IApplicationPaths appPaths, IFileSystem fileSystem) + { + _appPaths = appPaths; + _fileSystem = fileSystem; + } + + public BasePluginFolder GetFolder() + { + var path = Path.Combine(_appPaths.DataPath, "playlists"); + + _fileSystem.CreateDirectory(path); + + return new PlaylistsFolder + { + Path = path + }; + } + } +} |
