From 078277ebc29bd749045e5d109024d9d08aa8edea Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 4 Oct 2015 00:23:11 -0400 Subject: [PATCH] continue file system rework --- Emby.Drawing/Common/ImageHeader.cs | 1 + Emby.Drawing/Emby.Drawing.csproj | 7 + Emby.Drawing/GDI/DynamicImageHelpers.cs | 1 + Emby.Drawing/GDI/GDIImageEncoder.cs | 1 + .../ImageMagick/ImageMagickEncoder.cs | 1 + .../ImageMagick/PlayedIndicatorDrawer.cs | 1 + .../ImageMagick/StripCollageBuilder.cs | 1 + .../ImageMagick/UnplayedCountIndicator.cs | 1 + Emby.Drawing/ImageProcessor.cs | 1 + Emby.Drawing/packages.config | 2 + MediaBrowser.Api/ApiEntryPoint.cs | 1 + MediaBrowser.Api/ConfigurationService.cs | 1 + MediaBrowser.Api/EnvironmentService.cs | 1 + MediaBrowser.Api/Images/ImageByNameService.cs | 1 + MediaBrowser.Api/Images/ImageService.cs | 1 + MediaBrowser.Api/Images/RemoteImageService.cs | 1 + MediaBrowser.Api/ItemLookupService.cs | 1 + MediaBrowser.Api/ItemRefreshService.cs | 1 + MediaBrowser.Api/Library/LibraryHelpers.cs | 1 + MediaBrowser.Api/Library/LibraryService.cs | 1 + .../Library/LibraryStructureService.cs | 1 + MediaBrowser.Api/MediaBrowser.Api.csproj | 7 + .../Playback/BaseStreamingService.cs | 1 + .../Playback/Dash/MpegDashService.cs | 1 + .../Playback/Hls/BaseHlsService.cs | 1 + .../Playback/Hls/DynamicHlsService.cs | 1 + .../Playback/Hls/VideoHlsService.cs | 1 + .../Playback/Progressive/AudioService.cs | 1 + .../BaseProgressiveStreamingService.cs | 1 + .../Progressive/ProgressiveStreamWriter.cs | 1 + .../Playback/Progressive/VideoService.cs | 1 + MediaBrowser.Api/Subtitles/SubtitleService.cs | 1 + MediaBrowser.Api/System/SystemService.cs | 1 + MediaBrowser.Api/VideosService.cs | 1 + MediaBrowser.Api/packages.config | 2 + .../Archiving/ZipClient.cs | 1 + .../BaseApplicationHost.cs | 1 + .../Devices/DeviceId.cs | 1 + .../HttpClientManager/HttpClientManager.cs | 1 + .../IO/CommonFileSystem.cs | 559 ------------------ ...MediaBrowser.Common.Implementations.csproj | 8 +- .../ScheduledTasks/ScheduledTaskWorker.cs | 1 + .../ScheduledTasks/TaskManager.cs | 1 + .../Tasks/DeleteCacheFileTask.cs | 1 + .../ScheduledTasks/Tasks/DeleteLogFileTask.cs | 1 + .../Serialization/JsonSerializer.cs | 1 + .../Serialization/XmlSerializer.cs | 1 + .../Updates/InstallationManager.cs | 1 + .../packages.config | 2 + MediaBrowser.Common/IO/FileSystemMetadata.cs | 32 - MediaBrowser.Common/IO/IFileSystem.cs | 291 --------- .../MediaBrowser.Common.csproj | 2 - .../Entities/AggregateFolder.cs | 1 + MediaBrowser.Controller/Entities/BaseItem.cs | 1 + .../Entities/CollectionFolder.cs | 1 + MediaBrowser.Controller/Entities/Folder.cs | 1 + .../Entities/IHasImages.cs | 1 + .../Entities/Movies/Movie.cs | 1 + MediaBrowser.Controller/Entities/Video.cs | 1 + MediaBrowser.Controller/IO/FileData.cs | 1 + .../Library/ILibraryManager.cs | 1 + .../Library/ItemResolveArgs.cs | 1 + .../MediaBrowser.Controller.csproj | 7 + .../MediaEncoding/MediaEncoderHelpers.cs | 1 + .../Providers/DirectoryService.cs | 1 + .../Providers/IDirectoryService.cs | 1 + .../Providers/LocalImageInfo.cs | 1 + .../Providers/MetadataRefreshOptions.cs | 1 + .../Resolvers/IItemResolver.cs | 1 + MediaBrowser.Controller/packages.config | 2 + MediaBrowser.Dlna/DlnaManager.cs | 1 + MediaBrowser.Dlna/MediaBrowser.Dlna.csproj | 12 + MediaBrowser.Dlna/packages.config | 5 + MediaBrowser.LocalMetadata/BaseXmlProvider.cs | 1 + .../Images/CollectionFolderImageProvider.cs | 1 + .../Images/EpisodeLocalImageProvider.cs | 1 + .../Images/ImagesByNameImageProvider.cs | 1 + .../InternalMetadataFolderImageProvider.cs | 1 + .../Images/LocalImageProvider.cs | 1 + .../MediaBrowser.LocalMetadata.csproj | 13 +- .../Parsers/EpisodeXmlParser.cs | 1 + .../Providers/BoxSetXmlProvider.cs | 1 + .../Providers/EpisodeXmlProvider.cs | 1 + .../Providers/FolderXmlProvider.cs | 1 + .../Providers/GameSystemXmlProvider.cs | 1 + .../Providers/GameXmlProvider.cs | 1 + .../Providers/MovieXmlProvider.cs | 1 + .../Providers/MusicVideoXmlProvider.cs | 1 + .../Providers/PersonXmlProvider.cs | 1 + .../Providers/PlaylistXmlProvider.cs | 1 + .../Providers/SeasonXmlProvider.cs | 1 + .../Providers/SeriesXmlProvider.cs | 1 + .../Providers/VideoXmlProvider.cs | 1 + .../Savers/BoxSetXmlSaver.cs | 1 + .../Savers/EpisodeXmlSaver.cs | 1 + .../Savers/FolderXmlSaver.cs | 1 + .../Savers/GameSystemXmlSaver.cs | 1 + .../Savers/GameXmlSaver.cs | 1 + .../Savers/MovieXmlSaver.cs | 1 + .../Savers/PersonXmlSaver.cs | 1 + .../Savers/PlaylistXmlSaver.cs | 1 + .../Savers/SeriesXmlSaver.cs | 1 + .../Savers/XmlSaverHelpers.cs | 1 + MediaBrowser.LocalMetadata/packages.config | 5 + .../EncodingConfigurationFactory.cs | 1 + .../Encoder/AudioEncoder.cs | 1 + .../Encoder/BaseEncoder.cs | 1 + .../Encoder/MediaEncoder.cs | 1 + .../Encoder/VideoEncoder.cs | 1 + .../MediaBrowser.MediaEncoding.csproj | 7 + .../Probing/ProbeResultNormalizer.cs | 1 + .../Subtitles/SubtitleEncoder.cs | 1 + MediaBrowser.MediaEncoding/packages.config | 2 + .../Books/BookMetadataService.cs | 1 + .../BoxSets/BoxSetMetadataService.cs | 1 + .../BoxSets/MovieDbBoxSetProvider.cs | 1 + .../AudioChannelItemMetadataService.cs | 1 + .../Channels/ChannelMetadataService.cs | 1 + .../VideoChannelItemMetadataService.cs | 1 + .../Folders/FolderMetadataService.cs | 1 + .../Folders/UserViewMetadataService.cs | 1 + .../GameGenres/GameGenreImageProvider.cs | 1 + .../GameGenres/GameGenreMetadataService.cs | 1 + .../Games/GameMetadataService.cs | 1 + .../Games/GameSystemMetadataService.cs | 1 + .../Genres/GenreImageProvider.cs | 1 + .../Genres/GenreMetadataService.cs | 1 + .../ImagesByName/ImageUtils.cs | 1 + .../LiveTv/AudioRecordingService.cs | 1 + .../LiveTv/ChannelMetadataService.cs | 1 + .../LiveTv/ProgramMetadataService.cs | 1 + .../LiveTv/VideoRecordingService.cs | 1 + MediaBrowser.Providers/Manager/ImageSaver.cs | 1 + .../Manager/ItemImageProvider.cs | 1 + .../Manager/MetadataService.cs | 1 + .../Manager/ProviderManager.cs | 1 + .../MediaBrowser.Providers.csproj | 7 + .../MediaInfo/AudioImageProvider.cs | 1 + .../MediaInfo/FFProbeProvider.cs | 1 + .../MediaInfo/FFProbeVideoInfo.cs | 1 + .../MediaInfo/SubtitleResolver.cs | 1 + .../MediaInfo/VideoImageProvider.cs | 1 + .../Movies/FanArtMovieUpdatesPostScanTask.cs | 1 + .../Movies/FanartMovieImageProvider.cs | 1 + .../Movies/GenericMovieDbInfo.cs | 1 + .../Movies/MovieDbProvider.cs | 1 + .../Movies/MovieMetadataService.cs | 1 + .../Movies/MovieUpdatesPrescanTask.cs | 1 + .../Music/AlbumMetadataService.cs | 1 + .../Music/ArtistMetadataService.cs | 1 + .../Music/AudioDbAlbumProvider.cs | 1 + .../Music/AudioDbArtistProvider.cs | 1 + .../Music/AudioMetadataService.cs | 1 + .../Music/FanArtAlbumProvider.cs | 1 + .../Music/FanArtArtistProvider.cs | 1 + .../Music/FanArtUpdatesPostScanTask.cs | 1 + .../Music/MusicVideoMetadataService.cs | 1 + .../MusicGenres/MusicGenreImageProvider.cs | 1 + .../MusicGenres/MusicGenreMetadataService.cs | 1 + .../People/MovieDbPersonProvider.cs | 1 + .../People/PersonMetadataService.cs | 1 + .../Photos/PhotoAlbumMetadataService.cs | 1 + .../Photos/PhotoMetadataService.cs | 1 + .../Playlists/PlaylistMetadataService.cs | 1 + .../Studios/StudioMetadataService.cs | 1 + .../Studios/StudiosImageProvider.cs | 1 + .../Subtitles/SubtitleManager.cs | 1 + .../TV/DummySeasonProvider.cs | 1 + .../TV/EpisodeMetadataService.cs | 1 + .../TV/FanArtSeasonProvider.cs | 1 + .../TV/FanArtTvUpdatesPostScanTask.cs | 1 + .../TV/FanartSeriesProvider.cs | 1 + .../TV/MissingEpisodeProvider.cs | 1 + .../TV/MovieDbEpisodeImageProvider.cs | 1 + .../TV/MovieDbSeasonProvider.cs | 1 + .../TV/MovieDbSeriesProvider.cs | 1 + .../TV/SeasonMetadataService.cs | 1 + .../TV/SeriesMetadataService.cs | 1 + .../TV/SeriesPostScanTask.cs | 1 + .../TV/TvdbEpisodeImageProvider.cs | 1 + .../TV/TvdbEpisodeProvider.cs | 1 + MediaBrowser.Providers/TV/TvdbPrescanTask.cs | 1 + .../TV/TvdbSeasonImageProvider.cs | 1 + .../TV/TvdbSeriesImageProvider.cs | 1 + .../TV/TvdbSeriesProvider.cs | 1 + .../Users/UserMetadataService.cs | 1 + .../Videos/VideoMetadataService.cs | 1 + .../Years/YearMetadataService.cs | 1 + MediaBrowser.Providers/packages.config | 2 + .../Channels/ChannelManager.cs | 1 + .../Collections/CollectionImageProvider.cs | 1 + .../Collections/CollectionManager.cs | 1 + .../Collections/CollectionsDynamicFolder.cs | 1 + .../ServerConfigurationManager.cs | 1 + .../Connect/ConnectEntryPoint.cs | 1 + .../Connect/ConnectManager.cs | 1 + .../Devices/CameraUploadsFolder.cs | 1 + .../Devices/DeviceManager.cs | 1 + .../Devices/DeviceRepository.cs | 1 + .../Dto/DtoService.cs | 1 + .../Notifications/RemoteNotifications.cs | 1 + .../FileOrganization/EpisodeFileOrganizer.cs | 1 + .../FileOrganizationService.cs | 1 + .../OrganizerScheduledTask.cs | 1 + .../FileOrganization/TvFolderOrganizer.cs | 1 + .../HttpServer/HttpResultFactory.cs | 1 + .../IO/LibraryMonitor.cs | 1 + .../Intros/DefaultIntroProvider.cs | 1 + .../Library/CoreResolutionIgnoreRule.cs | 1 + .../Library/LibraryManager.cs | 1 + .../Library/MediaSourceManager.cs | 1 + .../Library/ResolverHelper.cs | 1 + .../Resolvers/Audio/MusicAlbumResolver.cs | 1 + .../Resolvers/Audio/MusicArtistResolver.cs | 1 + .../Library/Resolvers/Movies/MovieResolver.cs | 1 + .../Resolvers/SpecialFolderResolver.cs | 1 + .../Library/Resolvers/TV/SeriesResolver.cs | 1 + .../Library/UserManager.cs | 1 + .../Library/Validators/PeopleValidator.cs | 1 + .../LiveTv/EmbyTV/EmbyTV.cs | 1 + .../LiveTv/EmbyTV/ItemDataProvider.cs | 1 + .../LiveTv/EmbyTV/SeriesTimerManager.cs | 1 + .../LiveTv/EmbyTV/TimerManager.cs | 1 + .../LiveTv/LiveTvManager.cs | 1 + .../LiveTv/TunerHosts/M3UTunerHost.cs | 1 + .../Localization/LocalizationManager.cs | 1 + ...MediaBrowser.Server.Implementations.csproj | 4 + .../MediaEncoder/EncodingManager.cs | 1 + .../News/NewsEntryPoint.cs | 1 + .../Persistence/CleanDatabaseScheduledTask.cs | 1 + .../Photos/BaseDynamicImageProvider.cs | 1 + .../Photos/PhotoAlbumImageProvider.cs | 1 + .../Playlists/ManualPlaylistsFolder.cs | 1 + .../Playlists/PlaylistImageProvider.cs | 1 + .../Playlists/PlaylistManager.cs | 1 + .../ScheduledTasks/ChapterImagesTask.cs | 1 + .../ScheduledTasks/RefreshIntrosTask.cs | 1 + .../Sync/MediaSync.cs | 1 + .../Sync/MultiProviderSync.cs | 1 + .../Sync/ServerSyncScheduledTask.cs | 1 + .../Sync/SyncConvertScheduledTask.cs | 1 + .../Sync/SyncJobProcessor.cs | 1 + .../Sync/SyncManager.cs | 1 + .../Sync/TargetDataProvider.cs | 1 + .../CollectionFolderImageProvider.cs | 1 + .../UserViews/DynamicImageProvider.cs | 1 + .../packages.config | 1 + .../MediaBrowser.Server.Mono.csproj | 7 + MediaBrowser.Server.Mono/Program.cs | 5 +- MediaBrowser.Server.Mono/packages.config | 2 + .../ApplicationHost.cs | 1 + .../FFMpeg/FFMpegDownloader.cs | 1 + .../FFMpeg/FFmpegValidator.cs | 1 + .../MbLinkShortcutHandler.cs | 53 ++ .../MediaBrowser.Server.Startup.Common.csproj | 8 + .../Migrations/DeleteDlnaProfiles.cs | 1 + .../Migrations/DeprecatePlugins.cs | 1 + .../Migrations/MigrateUserFolders.cs | 1 + .../packages.config | 2 + MediaBrowser.ServerApplication/MainStartup.cs | 5 +- .../MediaBrowser.ServerApplication.csproj | 8 +- .../Native/Autorun.cs | 1 + .../Native/NativeFileSystem.cs | 419 ------------- .../Native/WindowsApp.cs | 1 + .../packages.config | 2 + .../Api/DashboardService.cs | 1 + .../Api/PackageCreator.cs | 1 + .../MediaBrowser.WebDashboard.csproj | 7 + MediaBrowser.WebDashboard/packages.config | 2 + .../MediaBrowser.XbmcMetadata.csproj | 12 + .../Providers/AlbumNfoProvider.cs | 1 + .../Providers/ArtistNfoProvider.cs | 1 + .../Providers/BaseNfoProvider.cs | 1 + .../Providers/BaseVideoNfoProvider.cs | 1 + .../Providers/EpisodeNfoProvider.cs | 1 + .../Providers/MovieNfoProvider.cs | 3 +- .../Providers/SeasonNfoProvider.cs | 1 + .../Providers/SeriesNfoProvider.cs | 1 + .../Savers/AlbumNfoSaver.cs | 1 + .../Savers/ArtistNfoSaver.cs | 1 + .../Savers/BaseNfoSaver.cs | 1 + .../Savers/EpisodeNfoSaver.cs | 1 + .../Savers/MovieNfoSaver.cs | 1 + .../Savers/SeasonNfoSaver.cs | 1 + .../Savers/SeriesNfoSaver.cs | 1 + MediaBrowser.XbmcMetadata/packages.config | 5 + 286 files changed, 459 insertions(+), 1309 deletions(-) delete mode 100644 MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs delete mode 100644 MediaBrowser.Common/IO/FileSystemMetadata.cs delete mode 100644 MediaBrowser.Common/IO/IFileSystem.cs create mode 100644 MediaBrowser.Dlna/packages.config create mode 100644 MediaBrowser.LocalMetadata/packages.config create mode 100644 MediaBrowser.Server.Startup.Common/MbLinkShortcutHandler.cs delete mode 100644 MediaBrowser.ServerApplication/Native/NativeFileSystem.cs create mode 100644 MediaBrowser.XbmcMetadata/packages.config diff --git a/Emby.Drawing/Common/ImageHeader.cs b/Emby.Drawing/Common/ImageHeader.cs index 59df5c04f4..266dcdfb8e 100644 --- a/Emby.Drawing/Common/ImageHeader.cs +++ b/Emby.Drawing/Common/ImageHeader.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using CommonIO; namespace Emby.Drawing.Common { diff --git a/Emby.Drawing/Emby.Drawing.csproj b/Emby.Drawing/Emby.Drawing.csproj index 800756ee9b..c93538d614 100644 --- a/Emby.Drawing/Emby.Drawing.csproj +++ b/Emby.Drawing/Emby.Drawing.csproj @@ -32,10 +32,17 @@ 4 + + False + ..\packages\CommonIO.1.0.0.3\lib\net45\CommonIO.dll + False ..\packages\ImageMagickSharp.1.0.0.16\lib\net45\ImageMagickSharp.dll + + ..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll + ..\packages\taglib.2.1.0.0\lib\policy.2.0.taglib-sharp.dll diff --git a/Emby.Drawing/GDI/DynamicImageHelpers.cs b/Emby.Drawing/GDI/DynamicImageHelpers.cs index b4a63b31e2..5cedf820db 100644 --- a/Emby.Drawing/GDI/DynamicImageHelpers.cs +++ b/Emby.Drawing/GDI/DynamicImageHelpers.cs @@ -4,6 +4,7 @@ using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.IO; +using CommonIO; namespace Emby.Drawing.GDI { diff --git a/Emby.Drawing/GDI/GDIImageEncoder.cs b/Emby.Drawing/GDI/GDIImageEncoder.cs index 1eabce74e0..6d09986623 100644 --- a/Emby.Drawing/GDI/GDIImageEncoder.cs +++ b/Emby.Drawing/GDI/GDIImageEncoder.cs @@ -8,6 +8,7 @@ using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.IO; using System.Linq; +using CommonIO; using ImageFormat = MediaBrowser.Model.Drawing.ImageFormat; namespace Emby.Drawing.GDI diff --git a/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs b/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs index 2f8577acc7..146ee2d3fd 100644 --- a/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs +++ b/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs @@ -8,6 +8,7 @@ using MediaBrowser.Model.Logging; using System; using System.IO; using System.Linq; +using CommonIO; using MediaBrowser.Common.IO; namespace Emby.Drawing.ImageMagick diff --git a/Emby.Drawing/ImageMagick/PlayedIndicatorDrawer.cs b/Emby.Drawing/ImageMagick/PlayedIndicatorDrawer.cs index b5912788fa..0870b37670 100644 --- a/Emby.Drawing/ImageMagick/PlayedIndicatorDrawer.cs +++ b/Emby.Drawing/ImageMagick/PlayedIndicatorDrawer.cs @@ -5,6 +5,7 @@ using MediaBrowser.Model.Drawing; using System; using System.IO; using System.Threading.Tasks; +using CommonIO; using MediaBrowser.Common.IO; namespace Emby.Drawing.ImageMagick diff --git a/Emby.Drawing/ImageMagick/StripCollageBuilder.cs b/Emby.Drawing/ImageMagick/StripCollageBuilder.cs index 92eb1cd597..b096a49991 100644 --- a/Emby.Drawing/ImageMagick/StripCollageBuilder.cs +++ b/Emby.Drawing/ImageMagick/StripCollageBuilder.cs @@ -2,6 +2,7 @@ using MediaBrowser.Common.Configuration; using System; using System.Collections.Generic; +using CommonIO; using MediaBrowser.Common.IO; namespace Emby.Drawing.ImageMagick diff --git a/Emby.Drawing/ImageMagick/UnplayedCountIndicator.cs b/Emby.Drawing/ImageMagick/UnplayedCountIndicator.cs index 92601313a5..d3d9c1e7a0 100644 --- a/Emby.Drawing/ImageMagick/UnplayedCountIndicator.cs +++ b/Emby.Drawing/ImageMagick/UnplayedCountIndicator.cs @@ -3,6 +3,7 @@ using MediaBrowser.Common.Configuration; using MediaBrowser.Common.IO; using MediaBrowser.Model.Drawing; using System.Globalization; +using CommonIO; namespace Emby.Drawing.ImageMagick { diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs index 3e5dca9b7f..4eecaacedb 100644 --- a/Emby.Drawing/ImageProcessor.cs +++ b/Emby.Drawing/ImageProcessor.cs @@ -16,6 +16,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; using Emby.Drawing.Common; namespace Emby.Drawing diff --git a/Emby.Drawing/packages.config b/Emby.Drawing/packages.config index acbd2ee3ac..bf2f4ff743 100644 --- a/Emby.Drawing/packages.config +++ b/Emby.Drawing/packages.config @@ -1,4 +1,6 @@  + + \ No newline at end of file diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs index 3faa6e63b4..7f4db5a89f 100644 --- a/MediaBrowser.Api/ApiEntryPoint.cs +++ b/MediaBrowser.Api/ApiEntryPoint.cs @@ -15,6 +15,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Api { diff --git a/MediaBrowser.Api/ConfigurationService.cs b/MediaBrowser.Api/ConfigurationService.cs index f266180a49..f33a30892a 100644 --- a/MediaBrowser.Api/ConfigurationService.cs +++ b/MediaBrowser.Api/ConfigurationService.cs @@ -11,6 +11,7 @@ using ServiceStack.Web; using System.Collections.Generic; using System.IO; using System.Linq; +using CommonIO; namespace MediaBrowser.Api { diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.cs index 81b326da8f..3a31fc1d26 100644 --- a/MediaBrowser.Api/EnvironmentService.cs +++ b/MediaBrowser.Api/EnvironmentService.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; +using CommonIO; namespace MediaBrowser.Api { diff --git a/MediaBrowser.Api/Images/ImageByNameService.cs b/MediaBrowser.Api/Images/ImageByNameService.cs index a6e1af516c..1e0ca34387 100644 --- a/MediaBrowser.Api/Images/ImageByNameService.cs +++ b/MediaBrowser.Api/Images/ImageByNameService.cs @@ -9,6 +9,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using CommonIO; namespace MediaBrowser.Api.Images { diff --git a/MediaBrowser.Api/Images/ImageService.cs b/MediaBrowser.Api/Images/ImageService.cs index b8ea621375..d264b896d2 100644 --- a/MediaBrowser.Api/Images/ImageService.cs +++ b/MediaBrowser.Api/Images/ImageService.cs @@ -17,6 +17,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; using MimeTypes = MediaBrowser.Model.Net.MimeTypes; namespace MediaBrowser.Api.Images diff --git a/MediaBrowser.Api/Images/RemoteImageService.cs b/MediaBrowser.Api/Images/RemoteImageService.cs index c67ef96c96..9683632b24 100644 --- a/MediaBrowser.Api/Images/RemoteImageService.cs +++ b/MediaBrowser.Api/Images/RemoteImageService.cs @@ -16,6 +16,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Api.Images { diff --git a/MediaBrowser.Api/ItemLookupService.cs b/MediaBrowser.Api/ItemLookupService.cs index 9f7f57155b..f453036d74 100644 --- a/MediaBrowser.Api/ItemLookupService.cs +++ b/MediaBrowser.Api/ItemLookupService.cs @@ -16,6 +16,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Api { diff --git a/MediaBrowser.Api/ItemRefreshService.cs b/MediaBrowser.Api/ItemRefreshService.cs index 1e74b36923..af1f1c90ad 100644 --- a/MediaBrowser.Api/ItemRefreshService.cs +++ b/MediaBrowser.Api/ItemRefreshService.cs @@ -4,6 +4,7 @@ using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Providers; using ServiceStack; using System.Threading; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Api diff --git a/MediaBrowser.Api/Library/LibraryHelpers.cs b/MediaBrowser.Api/Library/LibraryHelpers.cs index 877321b777..c18c90b200 100644 --- a/MediaBrowser.Api/Library/LibraryHelpers.cs +++ b/MediaBrowser.Api/Library/LibraryHelpers.cs @@ -3,6 +3,7 @@ using MediaBrowser.Controller; using System; using System.IO; using System.Linq; +using CommonIO; namespace MediaBrowser.Api.Library { diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index 20fd1ef40a..319bc13fd2 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -27,6 +27,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Api.Library diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs index c8731637c3..42c6ef6e5a 100644 --- a/MediaBrowser.Api/Library/LibraryStructureService.cs +++ b/MediaBrowser.Api/Library/LibraryStructureService.cs @@ -10,6 +10,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Api.Library { diff --git a/MediaBrowser.Api/MediaBrowser.Api.csproj b/MediaBrowser.Api/MediaBrowser.Api.csproj index 901dd11e2a..9e70fc5f3e 100644 --- a/MediaBrowser.Api/MediaBrowser.Api.csproj +++ b/MediaBrowser.Api/MediaBrowser.Api.csproj @@ -46,6 +46,13 @@ Always + + False + ..\packages\CommonIO.1.0.0.3\lib\net45\CommonIO.dll + + + ..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll + diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 8e5061d62a..4cf97d48b9 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -23,6 +23,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Api.Playback { diff --git a/MediaBrowser.Api/Playback/Dash/MpegDashService.cs b/MediaBrowser.Api/Playback/Dash/MpegDashService.cs index 5a36b0aa25..49d3db110b 100644 --- a/MediaBrowser.Api/Playback/Dash/MpegDashService.cs +++ b/MediaBrowser.Api/Playback/Dash/MpegDashService.cs @@ -17,6 +17,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; using MimeTypes = MediaBrowser.Model.Net.MimeTypes; namespace MediaBrowser.Api.Playback.Dash diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs index a9a9610a97..60412159c6 100644 --- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs @@ -15,6 +15,7 @@ using System.IO; using System.Text; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Api.Playback.Hls { diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs index 39bdee6991..6ca2677e76 100644 --- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs @@ -20,6 +20,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; +using CommonIO; using MimeTypes = MediaBrowser.Model.Net.MimeTypes; namespace MediaBrowser.Api.Playback.Hls diff --git a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs index 2d1abf7e9d..c5392b38fe 100644 --- a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs @@ -8,6 +8,7 @@ using MediaBrowser.Model.IO; using MediaBrowser.Model.Serialization; using ServiceStack; using System; +using CommonIO; namespace MediaBrowser.Api.Playback.Hls { diff --git a/MediaBrowser.Api/Playback/Progressive/AudioService.cs b/MediaBrowser.Api/Playback/Progressive/AudioService.cs index 67a9cab58f..ada4761c75 100644 --- a/MediaBrowser.Api/Playback/Progressive/AudioService.cs +++ b/MediaBrowser.Api/Playback/Progressive/AudioService.cs @@ -11,6 +11,7 @@ using MediaBrowser.Model.IO; using MediaBrowser.Model.Serialization; using ServiceStack; using System.Collections.Generic; +using CommonIO; namespace MediaBrowser.Api.Playback.Progressive { diff --git a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs index aa0cda133b..61c3e9aa8f 100644 --- a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs +++ b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs @@ -17,6 +17,7 @@ using System.Globalization; using System.IO; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Api.Playback.Progressive { diff --git a/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs b/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs index adedd94616..2719b1faf5 100644 --- a/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs +++ b/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Api.Playback.Progressive { diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.cs index 1dfb433879..d79040dd4c 100644 --- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs +++ b/MediaBrowser.Api/Playback/Progressive/VideoService.cs @@ -11,6 +11,7 @@ using MediaBrowser.Model.Serialization; using ServiceStack; using System; using System.IO; +using CommonIO; namespace MediaBrowser.Api.Playback.Progressive { diff --git a/MediaBrowser.Api/Subtitles/SubtitleService.cs b/MediaBrowser.Api/Subtitles/SubtitleService.cs index 0bfe7354d6..37034751d8 100644 --- a/MediaBrowser.Api/Subtitles/SubtitleService.cs +++ b/MediaBrowser.Api/Subtitles/SubtitleService.cs @@ -15,6 +15,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; +using CommonIO; using MimeTypes = MediaBrowser.Model.Net.MimeTypes; using MediaBrowser.Common.IO; diff --git a/MediaBrowser.Api/System/SystemService.cs b/MediaBrowser.Api/System/SystemService.cs index 4ad8b3903a..a95fcb542d 100644 --- a/MediaBrowser.Api/System/SystemService.cs +++ b/MediaBrowser.Api/System/SystemService.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Api.System { diff --git a/MediaBrowser.Api/VideosService.cs b/MediaBrowser.Api/VideosService.cs index a65bee7ef7..0cffbb42c3 100644 --- a/MediaBrowser.Api/VideosService.cs +++ b/MediaBrowser.Api/VideosService.cs @@ -11,6 +11,7 @@ using System; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Api { diff --git a/MediaBrowser.Api/packages.config b/MediaBrowser.Api/packages.config index 0cdb26bd59..3070217041 100644 --- a/MediaBrowser.Api/packages.config +++ b/MediaBrowser.Api/packages.config @@ -1,4 +1,6 @@  + + \ No newline at end of file diff --git a/MediaBrowser.Common.Implementations/Archiving/ZipClient.cs b/MediaBrowser.Common.Implementations/Archiving/ZipClient.cs index 1377e9d552..0009c71937 100644 --- a/MediaBrowser.Common.Implementations/Archiving/ZipClient.cs +++ b/MediaBrowser.Common.Implementations/Archiving/ZipClient.cs @@ -7,6 +7,7 @@ using SharpCompress.Reader; using SharpCompress.Reader.Zip; using System; using System.IO; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Common.Implementations.Archiving diff --git a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs index af41635f38..97c856035c 100644 --- a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs +++ b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs @@ -30,6 +30,7 @@ using System.Reflection; using System.Text; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Common.Implementations { diff --git a/MediaBrowser.Common.Implementations/Devices/DeviceId.cs b/MediaBrowser.Common.Implementations/Devices/DeviceId.cs index 39f11fabfb..4cad3cd314 100644 --- a/MediaBrowser.Common.Implementations/Devices/DeviceId.cs +++ b/MediaBrowser.Common.Implementations/Devices/DeviceId.cs @@ -3,6 +3,7 @@ using MediaBrowser.Model.Logging; using System; using System.IO; using System.Text; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Common.Implementations.Devices diff --git a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs index 7157f63257..48d6744322 100644 --- a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs +++ b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs @@ -17,6 +17,7 @@ using System.Net.Cache; using System.Text; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Common.Implementations.HttpClientManager { diff --git a/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs b/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs deleted file mode 100644 index f13b9b1a94..0000000000 --- a/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs +++ /dev/null @@ -1,559 +0,0 @@ -using MediaBrowser.Model.Extensions; -using MediaBrowser.Common.IO; -using MediaBrowser.Model.Logging; -using System; -using System.IO; -using System.Text; -using System.Collections.Generic; -using System.Linq; - -namespace MediaBrowser.Common.Implementations.IO -{ - /// - /// Class CommonFileSystem - /// - public class CommonFileSystem : IFileSystem - { - protected ILogger Logger; - - private readonly bool _supportsAsyncFileStreams; - private char[] _invalidFileNameChars; - - public CommonFileSystem(ILogger logger, bool supportsAsyncFileStreams, bool usePresetInvalidFileNameChars) - { - Logger = logger; - _supportsAsyncFileStreams = supportsAsyncFileStreams; - - SetInvalidFileNameChars(usePresetInvalidFileNameChars); - } - - protected void SetInvalidFileNameChars(bool usePresetInvalidFileNameChars) - { - // GetInvalidFileNameChars is less restrictive in Linux/Mac than Windows, this mimic Windows behavior for mono under Linux/Mac. - - if (usePresetInvalidFileNameChars) - { - _invalidFileNameChars = new char[41] { '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', - '\x08', '\x09', '\x0A', '\x0B', '\x0C', '\x0D', '\x0E', '\x0F', '\x10', '\x11', '\x12', - '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1A', '\x1B', '\x1C', '\x1D', - '\x1E', '\x1F', '\x22', '\x3C', '\x3E', '\x7C', ':', '*', '?', '\\', '/' }; - } - else - { - _invalidFileNameChars = Path.GetInvalidFileNameChars(); - } - } - - /// - /// Determines whether the specified filename is shortcut. - /// - /// The filename. - /// true if the specified filename is shortcut; otherwise, false. - /// filename - public virtual bool IsShortcut(string filename) - { - if (string.IsNullOrEmpty(filename)) - { - throw new ArgumentNullException("filename"); - } - - var extension = Path.GetExtension(filename); - - return string.Equals(extension, ".mblink", StringComparison.OrdinalIgnoreCase); - } - - /// - /// Resolves the shortcut. - /// - /// The filename. - /// System.String. - /// filename - public virtual string ResolveShortcut(string filename) - { - if (string.IsNullOrEmpty(filename)) - { - throw new ArgumentNullException("filename"); - } - - if (string.Equals(Path.GetExtension(filename), ".mblink", StringComparison.OrdinalIgnoreCase)) - { - var path = ReadAllText(filename); - - return NormalizePath(path); - } - - return null; - } - - /// - /// Creates the shortcut. - /// - /// The shortcut path. - /// The target. - /// - /// shortcutPath - /// or - /// target - /// - public void CreateShortcut(string shortcutPath, string target) - { - if (string.IsNullOrEmpty(shortcutPath)) - { - throw new ArgumentNullException("shortcutPath"); - } - - if (string.IsNullOrEmpty(target)) - { - throw new ArgumentNullException("target"); - } - - File.WriteAllText(shortcutPath, target); - } - - /// - /// Gets the file system info. - /// - /// The path. - /// FileSystemInfo. - public FileSystemMetadata GetFileSystemInfo(string path) - { - if (string.IsNullOrEmpty(path)) - { - throw new ArgumentNullException("path"); - } - - // Take a guess to try and avoid two file system hits, but we'll double-check by calling Exists - if (Path.HasExtension(path)) - { - var fileInfo = new FileInfo(path); - - if (fileInfo.Exists) - { - return GetFileSystemMetadata(fileInfo); - } - - return GetFileSystemMetadata(new DirectoryInfo(path)); - } - else - { - var fileInfo = new DirectoryInfo(path); - - if (fileInfo.Exists) - { - return GetFileSystemMetadata(fileInfo); - } - - return GetFileSystemMetadata(new FileInfo(path)); - } - } - - public FileSystemMetadata GetFileInfo(string path) - { - if (string.IsNullOrEmpty(path)) - { - throw new ArgumentNullException("path"); - } - - var fileInfo = new FileInfo(path); - - return GetFileSystemMetadata(fileInfo); - } - - public FileSystemMetadata GetDirectoryInfo(string path) - { - if (string.IsNullOrEmpty(path)) - { - throw new ArgumentNullException("path"); - } - - var fileInfo = new DirectoryInfo(path); - - return GetFileSystemMetadata(fileInfo); - } - - private FileSystemMetadata GetFileSystemMetadata(FileSystemInfo info) - { - var result = new FileSystemMetadata(); - - result.Attributes = info.Attributes; - result.Exists = info.Exists; - result.FullName = info.FullName; - result.Extension = info.Extension; - result.Name = info.Name; - - if (result.Exists) - { - var fileInfo = info as FileInfo; - if (fileInfo != null) - { - result.Length = fileInfo.Length; - result.DirectoryName = fileInfo.DirectoryName; - } - - result.CreationTimeUtc = GetCreationTimeUtc(info); - result.LastWriteTimeUtc = GetLastWriteTimeUtc(info); - } - - return result; - } - - /// - /// The space char - /// - private const char SpaceChar = ' '; - - /// - /// Takes a filename and removes invalid characters - /// - /// The filename. - /// System.String. - /// filename - public string GetValidFilename(string filename) - { - if (string.IsNullOrEmpty(filename)) - { - throw new ArgumentNullException("filename"); - } - - var builder = new StringBuilder(filename); - - foreach (var c in _invalidFileNameChars) - { - builder = builder.Replace(c, SpaceChar); - } - - return builder.ToString(); - } - - /// - /// Gets the creation time UTC. - /// - /// The info. - /// DateTime. - public DateTime GetCreationTimeUtc(FileSystemInfo info) - { - // This could throw an error on some file systems that have dates out of range - try - { - return info.CreationTimeUtc; - } - catch (Exception ex) - { - Logger.ErrorException("Error determining CreationTimeUtc for {0}", ex, info.FullName); - return DateTime.MinValue; - } - } - - /// - /// Gets the creation time UTC. - /// - /// The path. - /// DateTime. - public DateTime GetCreationTimeUtc(string path) - { - return GetCreationTimeUtc(GetFileSystemInfo(path)); - } - - public DateTime GetCreationTimeUtc(FileSystemMetadata info) - { - return info.CreationTimeUtc; - } - - public DateTime GetLastWriteTimeUtc(FileSystemMetadata info) - { - return info.LastWriteTimeUtc; - } - - /// - /// Gets the creation time UTC. - /// - /// The info. - /// DateTime. - public DateTime GetLastWriteTimeUtc(FileSystemInfo info) - { - // This could throw an error on some file systems that have dates out of range - try - { - return info.LastWriteTimeUtc; - } - catch (Exception ex) - { - Logger.ErrorException("Error determining LastAccessTimeUtc for {0}", ex, info.FullName); - return DateTime.MinValue; - } - } - - /// - /// Gets the last write time UTC. - /// - /// The path. - /// DateTime. - public DateTime GetLastWriteTimeUtc(string path) - { - return GetLastWriteTimeUtc(GetFileSystemInfo(path)); - } - - /// - /// Gets the file stream. - /// - /// The path. - /// The mode. - /// The access. - /// The share. - /// if set to true [is asynchronous]. - /// FileStream. - public Stream GetFileStream(string path, FileMode mode, FileAccess access, FileShare share, bool isAsync = false) - { - if (_supportsAsyncFileStreams && isAsync) - { - return new FileStream(path, mode, access, share, StreamDefaults.DefaultFileStreamBufferSize, true); - } - - return new FileStream(path, mode, access, share, StreamDefaults.DefaultFileStreamBufferSize); - } - - /// - /// Swaps the files. - /// - /// The file1. - /// The file2. - public void SwapFiles(string file1, string file2) - { - if (string.IsNullOrEmpty(file1)) - { - throw new ArgumentNullException("file1"); - } - - if (string.IsNullOrEmpty(file2)) - { - throw new ArgumentNullException("file2"); - } - - var temp1 = Path.GetTempFileName(); - var temp2 = Path.GetTempFileName(); - - // Copying over will fail against hidden files - RemoveHiddenAttribute(file1); - RemoveHiddenAttribute(file2); - - CopyFile(file1, temp1, true); - CopyFile(file2, temp2, true); - - CopyFile(temp1, file2, true); - CopyFile(temp2, file1, true); - - DeleteFile(temp1); - DeleteFile(temp2); - } - - /// - /// Removes the hidden attribute. - /// - /// The path. - private void RemoveHiddenAttribute(string path) - { - if (string.IsNullOrEmpty(path)) - { - throw new ArgumentNullException("path"); - } - - var currentFile = new FileInfo(path); - - // This will fail if the file is hidden - if (currentFile.Exists) - { - if ((currentFile.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden) - { - currentFile.Attributes &= ~FileAttributes.Hidden; - } - } - } - - public bool ContainsSubPath(string parentPath, string path) - { - if (string.IsNullOrEmpty(parentPath)) - { - throw new ArgumentNullException("parentPath"); - } - - if (string.IsNullOrEmpty(path)) - { - throw new ArgumentNullException("path"); - } - - return path.IndexOf(parentPath.TrimEnd(Path.DirectorySeparatorChar) + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase) != -1; - } - - public bool IsRootPath(string path) - { - if (string.IsNullOrEmpty(path)) - { - throw new ArgumentNullException("path"); - } - - var parent = Path.GetDirectoryName(path); - - if (!string.IsNullOrEmpty(parent)) - { - return false; - } - - return true; - } - - public string NormalizePath(string path) - { - if (string.IsNullOrEmpty(path)) - { - throw new ArgumentNullException("path"); - } - - if (path.EndsWith(":\\", StringComparison.OrdinalIgnoreCase)) - { - return path; - } - - return path.TrimEnd(Path.DirectorySeparatorChar); - } - - public string GetFileNameWithoutExtension(FileSystemMetadata info) - { - if (info.IsDirectory) - { - return info.Name; - } - - return Path.GetFileNameWithoutExtension(info.FullName); - } - - public string GetFileNameWithoutExtension(string path) - { - return Path.GetFileNameWithoutExtension(path); - } - - public bool IsPathFile(string path) - { - if (string.IsNullOrWhiteSpace(path)) - { - throw new ArgumentNullException("path"); - } - - // Cannot use Path.IsPathRooted because it returns false under mono when using windows-based paths, e.g. C:\\ - - if (path.IndexOf("://", StringComparison.OrdinalIgnoreCase) != -1 && - !path.StartsWith("file://", StringComparison.OrdinalIgnoreCase)) - { - return false; - } - return true; - - //return Path.IsPathRooted(path); - } - - public void DeleteFile(string path) - { - File.Delete(path); - } - - public void DeleteDirectory(string path, bool recursive) - { - Directory.Delete(path, recursive); - } - - public void CreateDirectory(string path) - { - Directory.CreateDirectory(path); - } - - public IEnumerable GetDirectories(string path, bool recursive = false) - { - var searchOption = recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly; - - return new DirectoryInfo(path).EnumerateDirectories("*", searchOption).Select(GetFileSystemMetadata); - } - - public IEnumerable GetFiles(string path, bool recursive = false) - { - var searchOption = recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly; - - return new DirectoryInfo (path).EnumerateFiles("*", searchOption).Select(GetFileSystemMetadata); - } - - public IEnumerable GetFileSystemEntries(string path, bool recursive = false) - { - var directoryInfo = new DirectoryInfo (path); - var searchOption = recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly; - - return directoryInfo.EnumerateDirectories("*", searchOption).Select(GetFileSystemMetadata) - .Concat(directoryInfo.EnumerateFiles("*", searchOption).Select(GetFileSystemMetadata)); - } - - public Stream OpenRead(string path) - { - return File.OpenRead(path); - } - - public void CopyFile(string source, string target, bool overwrite) - { - File.Copy(source, target, overwrite); - } - - public void MoveFile(string source, string target) - { - File.Move(source, target); - } - - public void MoveDirectory(string source, string target) - { - Directory.Move(source, target); - } - - public bool DirectoryExists(string path) - { - return Directory.Exists(path); - } - - public bool FileExists(string path) - { - return File.Exists(path); - } - - public string ReadAllText(string path) - { - return File.ReadAllText(path); - } - - public void WriteAllText(string path, string text, Encoding encoding) - { - File.WriteAllText(path, text, encoding); - } - - public void WriteAllText(string path, string text) - { - File.WriteAllText(path, text); - } - - public string ReadAllText(string path, Encoding encoding) - { - return File.ReadAllText(path, encoding); - } - - public IEnumerable GetDirectoryPaths(string path, bool recursive = false) - { - var searchOption = recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly; - return Directory.EnumerateDirectories(path, "*", searchOption); - } - - public IEnumerable GetFilePaths(string path, bool recursive = false) - { - var searchOption = recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly; - return Directory.EnumerateFiles(path, "*", searchOption); - } - - public IEnumerable GetFileSystemEntryPaths(string path, bool recursive = false) - { - var searchOption = recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly; - return Directory.EnumerateFileSystemEntries(path, "*", searchOption); - } - } -} diff --git a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj index eb1122902a..a195415d04 100644 --- a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj +++ b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj @@ -48,10 +48,17 @@ Always + + False + ..\packages\CommonIO.1.0.0.3\lib\net45\CommonIO.dll + False ..\packages\NLog.4.1.1\lib\net45\NLog.dll + + ..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll + False ..\ThirdParty\SharpCompress\SharpCompress.dll @@ -81,7 +88,6 @@ - diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs index 906184c759..f2b235bd9d 100644 --- a/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs +++ b/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs @@ -12,6 +12,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Common.Implementations.ScheduledTasks diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs index 9419bdf22a..6c72441aa8 100644 --- a/MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs +++ b/MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs @@ -10,6 +10,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Common.Implementations.ScheduledTasks diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs index ec48bb5dc1..0e50f93159 100644 --- a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs +++ b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs @@ -8,6 +8,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks { diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs index ffba3d9dae..8507d31843 100644 --- a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs +++ b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs @@ -7,6 +7,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks { diff --git a/MediaBrowser.Common.Implementations/Serialization/JsonSerializer.cs b/MediaBrowser.Common.Implementations/Serialization/JsonSerializer.cs index a758a0c1e1..269294b36b 100644 --- a/MediaBrowser.Common.Implementations/Serialization/JsonSerializer.cs +++ b/MediaBrowser.Common.Implementations/Serialization/JsonSerializer.cs @@ -2,6 +2,7 @@ using MediaBrowser.Model.Serialization; using System; using System.IO; +using CommonIO; namespace MediaBrowser.Common.Implementations.Serialization { diff --git a/MediaBrowser.Common.Implementations/Serialization/XmlSerializer.cs b/MediaBrowser.Common.Implementations/Serialization/XmlSerializer.cs index 41a59fb2b4..449c23b2d3 100644 --- a/MediaBrowser.Common.Implementations/Serialization/XmlSerializer.cs +++ b/MediaBrowser.Common.Implementations/Serialization/XmlSerializer.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Concurrent; using System.IO; using System.Xml; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Common.Implementations.Serialization diff --git a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs index 12afdd8d7c..dc642a0a8f 100644 --- a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs +++ b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs @@ -19,6 +19,7 @@ using System.Linq; using System.Security.Cryptography; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Common.Implementations.Updates { diff --git a/MediaBrowser.Common.Implementations/packages.config b/MediaBrowser.Common.Implementations/packages.config index 151a3a36d2..eb48d9d673 100644 --- a/MediaBrowser.Common.Implementations/packages.config +++ b/MediaBrowser.Common.Implementations/packages.config @@ -1,5 +1,7 @@  + + diff --git a/MediaBrowser.Common/IO/FileSystemMetadata.cs b/MediaBrowser.Common/IO/FileSystemMetadata.cs deleted file mode 100644 index ba8a1b8b87..0000000000 --- a/MediaBrowser.Common/IO/FileSystemMetadata.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MediaBrowser.Common.IO -{ - public class FileSystemMetadata - { - public FileAttributes Attributes { get; set; } - - public bool Exists { get; set; } - public string FullName { get; set; } - public string Name { get; set; } - public string Extension { get; set; } - public long Length { get; set; } - public string DirectoryName { get; set; } - - public DateTime LastWriteTimeUtc { get; set; } - public DateTime CreationTimeUtc { get; set; } - - public bool IsDirectory - { - get - { - return (Attributes & FileAttributes.Directory) == FileAttributes.Directory; - } - } - } -} diff --git a/MediaBrowser.Common/IO/IFileSystem.cs b/MediaBrowser.Common/IO/IFileSystem.cs deleted file mode 100644 index e084f94ed2..0000000000 --- a/MediaBrowser.Common/IO/IFileSystem.cs +++ /dev/null @@ -1,291 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace MediaBrowser.Common.IO -{ - /// - /// Interface IFileSystem - /// - public interface IFileSystem - { - /// - /// Determines whether the specified filename is shortcut. - /// - /// The filename. - /// true if the specified filename is shortcut; otherwise, false. - bool IsShortcut(string filename); - - /// - /// Resolves the shortcut. - /// - /// The filename. - /// System.String. - string ResolveShortcut(string filename); - - /// - /// Creates the shortcut. - /// - /// The shortcut path. - /// The target. - void CreateShortcut(string shortcutPath, string target); - - /// - /// Gets the file system info. - /// - /// The path. - /// FileSystemInfo. - FileSystemMetadata GetFileSystemInfo(string path); - - /// - /// Gets the file information. - /// - /// The path. - /// FileSystemMetadata. - FileSystemMetadata GetFileInfo(string path); - - /// - /// Gets the directory information. - /// - /// The path. - /// FileSystemMetadata. - FileSystemMetadata GetDirectoryInfo(string path); - - /// - /// Gets the valid filename. - /// - /// The filename. - /// System.String. - string GetValidFilename(string filename); - - /// - /// Gets the creation time UTC. - /// - /// The information. - /// DateTime. - DateTime GetCreationTimeUtc(FileSystemMetadata info); - - /// - /// Gets the creation time UTC. - /// - /// The path. - /// DateTime. - DateTime GetCreationTimeUtc(string path); - - /// - /// Gets the last write time UTC. - /// - /// The information. - /// DateTime. - DateTime GetLastWriteTimeUtc(FileSystemMetadata info); - - /// - /// Gets the last write time UTC. - /// - /// The path. - /// DateTime. - DateTime GetLastWriteTimeUtc(string path); - - /// - /// Gets the file stream. - /// - /// The path. - /// The mode. - /// The access. - /// The share. - /// if set to true [is asynchronous]. - /// FileStream. - Stream GetFileStream(string path, FileMode mode, FileAccess access, FileShare share, bool isAsync = false); - - /// - /// Opens the read. - /// - /// The path. - /// Stream. - Stream OpenRead(String path); - - /// - /// Swaps the files. - /// - /// The file1. - /// The file2. - void SwapFiles(string file1, string file2); - - /// - /// Determines whether [contains sub path] [the specified parent path]. - /// - /// The parent path. - /// The path. - /// true if [contains sub path] [the specified parent path]; otherwise, false. - bool ContainsSubPath(string parentPath, string path); - - /// - /// Determines whether [is root path] [the specified path]. - /// - /// The path. - /// true if [is root path] [the specified path]; otherwise, false. - bool IsRootPath(string path); - - /// - /// Normalizes the path. - /// - /// The path. - /// System.String. - string NormalizePath(string path); - - /// - /// Gets the file name without extension. - /// - /// The information. - /// System.String. - string GetFileNameWithoutExtension(FileSystemMetadata info); - - /// - /// Gets the file name without extension. - /// - /// The path. - /// System.String. - string GetFileNameWithoutExtension(string path); - - /// - /// Determines whether [is path file] [the specified path]. - /// - /// The path. - /// true if [is path file] [the specified path]; otherwise, false. - bool IsPathFile(string path); - - /// - /// Deletes the file. - /// - /// The path. - void DeleteFile(string path); - - /// - /// Deletes the directory. - /// - /// The path. - /// if set to true [recursive]. - void DeleteDirectory(string path, bool recursive); - - /// - /// Gets the directories. - /// - /// The path. - /// if set to true [recursive]. - /// IEnumerable<DirectoryInfo>. - IEnumerable GetDirectories(string path, bool recursive = false); - - /// - /// Gets the files. - /// - /// The path. - /// if set to true [recursive]. - /// IEnumerable<FileInfo>. - IEnumerable GetFiles(string path, bool recursive = false); - - /// - /// Gets the file system entries. - /// - /// The path. - /// if set to true [recursive]. - /// IEnumerable<FileSystemMetadata>. - IEnumerable GetFileSystemEntries(string path, bool recursive = false); - - /// - /// Creates the directory. - /// - /// The path. - void CreateDirectory(string path); - - /// - /// Copies the file. - /// - /// The source. - /// The target. - /// if set to true [overwrite]. - void CopyFile(string source, string target, bool overwrite); - - /// - /// Moves the file. - /// - /// The source. - /// The target. - void MoveFile(string source, string target); - - /// - /// Moves the directory. - /// - /// The source. - /// The target. - void MoveDirectory(string source, string target); - - /// - /// Directories the exists. - /// - /// The path. - /// true if XXXX, false otherwise. - bool DirectoryExists(string path); - - /// - /// Files the exists. - /// - /// The path. - /// true if XXXX, false otherwise. - bool FileExists(string path); - - /// - /// Reads all text. - /// - /// The path. - /// System.String. - string ReadAllText(string path); - - /// - /// Writes all text. - /// - /// The path. - /// The text. - void WriteAllText(string path, string text); - - /// - /// Writes all text. - /// - /// The path. - /// The text. - /// The encoding. - void WriteAllText(string path, string text, Encoding encoding); - - /// - /// Reads all text. - /// - /// The path. - /// The encoding. - /// System.String. - string ReadAllText(string path, Encoding encoding); - - /// - /// Gets the directory paths. - /// - /// The path. - /// if set to true [recursive]. - /// IEnumerable<System.String>. - IEnumerable GetDirectoryPaths(string path, bool recursive = false); - - /// - /// Gets the file paths. - /// - /// The path. - /// if set to true [recursive]. - /// IEnumerable<System.String>. - IEnumerable GetFilePaths(string path, bool recursive = false); - - /// - /// Gets the file system entry paths. - /// - /// The path. - /// if set to true [recursive]. - /// IEnumerable<System.String>. - IEnumerable GetFileSystemEntryPaths(string path, bool recursive = false); - } -} diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj index 0476f3f602..b2f62dd210 100644 --- a/MediaBrowser.Common/MediaBrowser.Common.csproj +++ b/MediaBrowser.Common/MediaBrowser.Common.csproj @@ -60,8 +60,6 @@ - - diff --git a/MediaBrowser.Controller/Entities/AggregateFolder.cs b/MediaBrowser.Controller/Entities/AggregateFolder.cs index 5af02e9bb6..14f8c1617a 100644 --- a/MediaBrowser.Controller/Entities/AggregateFolder.cs +++ b/MediaBrowser.Controller/Entities/AggregateFolder.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.Serialization; +using CommonIO; using MediaBrowser.Common.IO; using MediaBrowser.Controller.Providers; diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 963f4725ad..796ba70ba3 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -23,6 +23,7 @@ using System.Linq; using System.Runtime.Serialization; using System.Threading; using System.Threading.Tasks; +using CommonIO; namespace MediaBrowser.Controller.Entities { diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs index b299929d00..946d95a0bb 100644 --- a/MediaBrowser.Controller/Entities/CollectionFolder.cs +++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs @@ -8,6 +8,7 @@ using System.Linq; using System.Runtime.Serialization; using System.Threading; using System.Threading.Tasks; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Entities diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 422c83d3ba..c3f767c0d2 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -13,6 +13,7 @@ using System.Linq; using System.Runtime.Serialization; using System.Threading; using System.Threading.Tasks; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Entities diff --git a/MediaBrowser.Controller/Entities/IHasImages.cs b/MediaBrowser.Controller/Entities/IHasImages.cs index 55c5f7e114..ef478c516a 100644 --- a/MediaBrowser.Controller/Entities/IHasImages.cs +++ b/MediaBrowser.Controller/Entities/IHasImages.cs @@ -3,6 +3,7 @@ using MediaBrowser.Model.Entities; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Entities diff --git a/MediaBrowser.Controller/Entities/Movies/Movie.cs b/MediaBrowser.Controller/Entities/Movies/Movie.cs index 8910fdbdd7..1a8148edfb 100644 --- a/MediaBrowser.Controller/Entities/Movies/Movie.cs +++ b/MediaBrowser.Controller/Entities/Movies/Movie.cs @@ -8,6 +8,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Entities.Movies diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 5f5743b1d0..45c497fcf9 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -11,6 +11,7 @@ using System.Linq; using System.Runtime.Serialization; using System.Threading; using System.Threading.Tasks; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Entities diff --git a/MediaBrowser.Controller/IO/FileData.cs b/MediaBrowser.Controller/IO/FileData.cs index 503727e140..20dfc425e3 100644 --- a/MediaBrowser.Controller/IO/FileData.cs +++ b/MediaBrowser.Controller/IO/FileData.cs @@ -5,6 +5,7 @@ using MediaBrowser.Model.Logging; using System; using System.Collections.Generic; using System.IO; +using CommonIO; namespace MediaBrowser.Controller.IO { diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index 93f291aae5..843fba0d0b 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -11,6 +11,7 @@ using System.Collections.Generic; using System.IO; using System.Threading; using System.Threading.Tasks; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Library diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.cs index 6534366911..90158942fb 100644 --- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs +++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Library diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index b20f155447..946ea34d45 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -45,9 +45,16 @@ 4 + + False + ..\packages\CommonIO.1.0.0.3\lib\net45\CommonIO.dll + ..\packages\Interfaces.IO.1.0.0.5\lib\portable-net45+sl4+wp71+win8+wpa81\Interfaces.IO.dll + + ..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll + diff --git a/MediaBrowser.Controller/MediaEncoding/MediaEncoderHelpers.cs b/MediaBrowser.Controller/MediaEncoding/MediaEncoderHelpers.cs index 6b7bddcfa0..7985ec054d 100644 --- a/MediaBrowser.Controller/MediaEncoding/MediaEncoderHelpers.cs +++ b/MediaBrowser.Controller/MediaEncoding/MediaEncoderHelpers.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.MediaEncoding diff --git a/MediaBrowser.Controller/Providers/DirectoryService.cs b/MediaBrowser.Controller/Providers/DirectoryService.cs index 6890b7a7c7..cf1c3d286d 100644 --- a/MediaBrowser.Controller/Providers/DirectoryService.cs +++ b/MediaBrowser.Controller/Providers/DirectoryService.cs @@ -4,6 +4,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.Linq; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Providers diff --git a/MediaBrowser.Controller/Providers/IDirectoryService.cs b/MediaBrowser.Controller/Providers/IDirectoryService.cs index 06507d5d2d..062a109015 100644 --- a/MediaBrowser.Controller/Providers/IDirectoryService.cs +++ b/MediaBrowser.Controller/Providers/IDirectoryService.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.IO; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Providers diff --git a/MediaBrowser.Controller/Providers/LocalImageInfo.cs b/MediaBrowser.Controller/Providers/LocalImageInfo.cs index 3b51a96f01..51916268fe 100644 --- a/MediaBrowser.Controller/Providers/LocalImageInfo.cs +++ b/MediaBrowser.Controller/Providers/LocalImageInfo.cs @@ -1,4 +1,5 @@ using System.IO; +using CommonIO; using MediaBrowser.Common.IO; using MediaBrowser.Model.Entities; diff --git a/MediaBrowser.Controller/Providers/MetadataRefreshOptions.cs b/MediaBrowser.Controller/Providers/MetadataRefreshOptions.cs index 097c613cbe..6f217eea2b 100644 --- a/MediaBrowser.Controller/Providers/MetadataRefreshOptions.cs +++ b/MediaBrowser.Controller/Providers/MetadataRefreshOptions.cs @@ -1,4 +1,5 @@ using System.Linq; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Providers diff --git a/MediaBrowser.Controller/Resolvers/IItemResolver.cs b/MediaBrowser.Controller/Resolvers/IItemResolver.cs index 660a6a87ab..f747c055e1 100644 --- a/MediaBrowser.Controller/Resolvers/IItemResolver.cs +++ b/MediaBrowser.Controller/Resolvers/IItemResolver.cs @@ -3,6 +3,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers; using System.Collections.Generic; using System.IO; +using CommonIO; using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Resolvers diff --git a/MediaBrowser.Controller/packages.config b/MediaBrowser.Controller/packages.config index c320ed9d9a..c03c15de8e 100644 --- a/MediaBrowser.Controller/packages.config +++ b/MediaBrowser.Controller/packages.config @@ -1,5 +1,7 @@  + + \ No newline at end of file diff --git a/MediaBrowser.Dlna/DlnaManager.cs b/MediaBrowser.Dlna/DlnaManager.cs index 0fd3cec89b..be49c0f893 100644 --- a/MediaBrowser.Dlna/DlnaManager.cs +++ b/MediaBrowser.Dlna/DlnaManager.cs @@ -17,6 +17,7 @@ using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; +using CommonIO; namespace MediaBrowser.Dlna { diff --git a/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj b/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj index c49cbc6548..325df86d1c 100644 --- a/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj +++ b/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj @@ -13,6 +13,8 @@ 10.0.0 2.0 v4.5 + ..\ + true true @@ -39,6 +41,13 @@ 4 + + False + ..\packages\CommonIO.1.0.0.3\lib\net45\CommonIO.dll + + + ..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll + @@ -230,6 +239,9 @@ Designer + + +