diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-11-03 19:59:50 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-03 19:59:50 -0400 |
| commit | c53745548ac2130f4cfbbe0d7a2804c36c8ae4eb (patch) | |
| tree | 6ee298ebb5470c4f3bcbef8d814a0354901469c4 | |
| parent | 338b04a0c58729ec70aed89924ea6bd12422872b (diff) | |
| parent | 405a5f69c5967b4d919b5fe91396f12cb83e8aa8 (diff) | |
Merge pull request #2267 from MediaBrowser/dev
Dev
| -rw-r--r-- | Emby.Common.Implementations/BaseApplicationHost.cs | 2 | ||||
| -rw-r--r-- | Emby.Common.Implementations/Cryptography/CryptographyProvider.cs | 17 | ||||
| -rw-r--r-- | Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs | 20 | ||||
| -rw-r--r-- | Emby.Common.Implementations/Reflection/AssemblyInfo.cs (renamed from MediaBrowser.Server.Implementations/Reflection/AssemblyInfo.cs) | 6 | ||||
| -rw-r--r-- | Emby.Common.Implementations/TextEncoding/TextEncoding.cs (renamed from MediaBrowser.Server.Implementations/TextEncoding/TextEncoding.cs) | 5 | ||||
| -rw-r--r-- | Emby.Common.Implementations/Xml/XmlReaderSettingsFactory.cs (renamed from MediaBrowser.Server.Implementations/Xml/XmlReaderSettingsFactory.cs) | 4 | ||||
| -rw-r--r-- | Emby.Common.Implementations/project.json | 28 | ||||
| -rw-r--r-- | Emby.Dlna/DlnaManager.cs | 6 | ||||
| -rw-r--r-- | Emby.Photos/Emby.Photos.csproj | 3 | ||||
| -rw-r--r-- | Emby.Photos/Properties/AssemblyInfo.cs | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Activity/ActivityManager.cs (renamed from MediaBrowser.Server.Implementations/Activity/ActivityManager.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Branding/BrandingConfigurationFactory.cs (renamed from MediaBrowser.Server.Implementations/Branding/BrandingConfigurationFactory.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Channels/ChannelConfigurations.cs (renamed from MediaBrowser.Server.Implementations/Channels/ChannelConfigurations.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Channels/ChannelDynamicMediaSourceProvider.cs (renamed from MediaBrowser.Server.Implementations/Channels/ChannelDynamicMediaSourceProvider.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Channels/ChannelImageProvider.cs (renamed from MediaBrowser.Server.Implementations/Channels/ChannelImageProvider.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Channels/ChannelManager.cs (renamed from MediaBrowser.Server.Implementations/Channels/ChannelManager.cs) | 16 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Channels/ChannelPostScanTask.cs (renamed from MediaBrowser.Server.Implementations/Channels/ChannelPostScanTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs (renamed from MediaBrowser.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Collections/CollectionImageProvider.cs (renamed from MediaBrowser.Server.Implementations/Collections/CollectionImageProvider.cs) | 6 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Collections/CollectionManager.cs (renamed from MediaBrowser.Server.Implementations/Collections/CollectionManager.cs) | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Devices/DeviceManager.cs (renamed from MediaBrowser.Server.Implementations/Devices/DeviceManager.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Dto/DtoService.cs (renamed from MediaBrowser.Server.Implementations/Dto/DtoService.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Emby.Server.Implementations.csproj | 249 | ||||
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs) | 11 | ||||
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs) | 15 | ||||
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/LoadRegistrations.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/LoadRegistrations.cs) | 12 | ||||
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/RecordingNotifier.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs) | 10 | ||||
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/RefreshUsersMetadata.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/RefreshUsersMetadata.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/ServerEventNotifier.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/UsageEntryPoint.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/UsageReporter.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/UsageReporter.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs) | 11 | ||||
| -rw-r--r-- | Emby.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs (renamed from MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs) | 27 | ||||
| -rw-r--r-- | Emby.Server.Implementations/FileOrganization/Extensions.cs (renamed from MediaBrowser.Server.Implementations/FileOrganization/Extensions.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs (renamed from MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/FileOrganization/FileOrganizationService.cs (renamed from MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/FileOrganization/NameUtils.cs (renamed from MediaBrowser.Server.Implementations/FileOrganization/NameUtils.cs) | 21 | ||||
| -rw-r--r-- | Emby.Server.Implementations/FileOrganization/OrganizerScheduledTask.cs (renamed from MediaBrowser.Server.Implementations/FileOrganization/OrganizerScheduledTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/FileOrganization/TvFolderOrganizer.cs (renamed from MediaBrowser.Server.Implementations/FileOrganization/TvFolderOrganizer.cs) | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/IO/ThrottledStream.cs (renamed from MediaBrowser.Server.Implementations/IO/ThrottledStream.cs) | 7 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs (renamed from MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs) | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Intros/DefaultIntroProvider.cs (renamed from MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs) | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs (renamed from MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs (renamed from MediaBrowser.Server.Implementations/Library/LibraryManager.cs) | 55 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/LocalTrailerPostScanTask.cs (renamed from MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/MediaSourceManager.cs (renamed from MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs) | 11 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/MusicManager.cs (renamed from MediaBrowser.Server.Implementations/Library/MusicManager.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/PathExtensions.cs (renamed from MediaBrowser.Server.Implementations/Library/PathExtensions.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/ResolverHelper.cs (renamed from MediaBrowser.Server.Implementations/Library/ResolverHelper.cs) | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs) | 8 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs) | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs) | 8 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/FolderResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/FolderResolver.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/ItemResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/ItemResolver.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/Movies/BoxSetResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/Movies/BoxSetResolver.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs) | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/PlaylistResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/PlaylistResolver.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/SpecialFolderResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/SpecialFolderResolver.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs) | 6 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/VideoResolver.cs (renamed from MediaBrowser.Server.Implementations/Library/Resolvers/VideoResolver.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/SearchEngine.cs (renamed from MediaBrowser.Server.Implementations/Library/SearchEngine.cs) | 9 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/UserDataManager.cs (renamed from MediaBrowser.Server.Implementations/Library/UserDataManager.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/UserManager.cs (renamed from MediaBrowser.Server.Implementations/Library/UserManager.cs) | 54 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/UserViewManager.cs (renamed from MediaBrowser.Server.Implementations/Library/UserViewManager.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/ArtistsPostScanTask.cs (renamed from MediaBrowser.Server.Implementations/Library/Validators/ArtistsPostScanTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs (renamed from MediaBrowser.Server.Implementations/Library/Validators/ArtistsValidator.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/GameGenresPostScanTask.cs (renamed from MediaBrowser.Server.Implementations/Library/Validators/GameGenresPostScanTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/GameGenresValidator.cs (renamed from MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/GenresPostScanTask.cs (renamed from MediaBrowser.Server.Implementations/Library/Validators/GenresPostScanTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/GenresValidator.cs (renamed from MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/MusicGenresPostScanTask.cs (renamed from MediaBrowser.Server.Implementations/Library/Validators/MusicGenresPostScanTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/MusicGenresValidator.cs (renamed from MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/PeopleValidator.cs (renamed from MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/StudiosPostScanTask.cs (renamed from MediaBrowser.Server.Implementations/Library/Validators/StudiosPostScanTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/StudiosValidator.cs (renamed from MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/YearsPostScanTask.cs (renamed from MediaBrowser.Server.Implementations/Library/Validators/YearsPostScanTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/ChannelImageProvider.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/ChannelImageProvider.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs) | 104 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTVRegistration.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTVRegistration.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs) | 39 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs) | 5 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs) | 13 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs) | 9 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs) | 31 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/LiveStreamHelper.cs) | 6 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/LiveTvManager.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs) | 65 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs) | 6 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/ProgramImageProvider.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/ProgramImageProvider.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/RecordingImageProvider.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/RecordingImageProvider.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunDiscovery.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunDiscovery.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs) | 6 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunLiveStream.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunLiveStream.cs) | 10 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs) | 3 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/TunerHosts/QueueStream.cs (renamed from MediaBrowser.Server.Implementations/LiveTv/TunerHosts/QueueStream.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Logging/PatternsLogger.cs | 63 | ||||
| -rw-r--r-- | Emby.Server.Implementations/MediaEncoder/EncodingManager.cs (renamed from MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs) | 8 | ||||
| -rw-r--r-- | Emby.Server.Implementations/News/NewsEntryPoint.cs | 260 | ||||
| -rw-r--r-- | Emby.Server.Implementations/News/NewsService.cs (renamed from MediaBrowser.Server.Implementations/News/NewsService.cs) | 6 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Notifications/CoreNotificationTypes.cs (renamed from MediaBrowser.Server.Implementations/Notifications/CoreNotificationTypes.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Notifications/IConfigurableNotificationService.cs (renamed from MediaBrowser.Server.Implementations/Notifications/IConfigurableNotificationService.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Notifications/InternalNotificationService.cs (renamed from MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Notifications/NotificationConfigurationFactory.cs (renamed from MediaBrowser.Server.Implementations/Notifications/NotificationConfigurationFactory.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Notifications/NotificationManager.cs (renamed from MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Notifications/Notifications.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs) | 11 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Notifications/WebSocketNotifier.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/Notifications/WebSocketNotifier.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Persistence/CleanDatabaseScheduledTask.cs (renamed from MediaBrowser.Server.Implementations/Persistence/CleanDatabaseScheduledTask.cs) | 9 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Photos/PhotoAlbumImageProvider.cs (renamed from MediaBrowser.Server.Implementations/Photos/PhotoAlbumImageProvider.cs) | 5 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs (renamed from MediaBrowser.Server.Implementations/Playlists/PlaylistImageProvider.cs) | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Playlists/PlaylistManager.cs (renamed from MediaBrowser.Server.Implementations/Playlists/PlaylistManager.cs) | 9 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Properties/AssemblyInfo.cs | 30 | ||||
| -rw-r--r-- | Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs (renamed from MediaBrowser.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs) | 13 | ||||
| -rw-r--r-- | Emby.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs (renamed from MediaBrowser.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/ScheduledTasks/PluginUpdateTask.cs (renamed from MediaBrowser.Server.Implementations/ScheduledTasks/PluginUpdateTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/ScheduledTasks/RefreshIntrosTask.cs (renamed from MediaBrowser.Server.Implementations/ScheduledTasks/RefreshIntrosTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs (renamed from MediaBrowser.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs) | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/ScheduledTasks/SystemUpdateTask.cs (renamed from MediaBrowser.Server.Implementations/ScheduledTasks/SystemUpdateTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/ServerManager/ServerManager.cs (renamed from MediaBrowser.Server.Implementations/ServerManager/ServerManager.cs) | 22 | ||||
| -rw-r--r-- | Emby.Server.Implementations/ServerManager/WebSocketConnection.cs (renamed from MediaBrowser.Server.Implementations/ServerManager/WebSocketConnection.cs) | 11 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Session/HttpSessionController.cs (renamed from MediaBrowser.Server.Implementations/Session/HttpSessionController.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Session/SessionManager.cs (renamed from MediaBrowser.Server.Implementations/Session/SessionManager.cs) | 11 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Session/SessionWebSocketListener.cs (renamed from MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Session/WebSocketController.cs (renamed from MediaBrowser.Server.Implementations/Session/WebSocketController.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/AirTimeComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/AirTimeComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/AlbumArtistComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/AlbumArtistComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/AlbumComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/AlbumComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/AlphanumComparator.cs (renamed from MediaBrowser.Server.Implementations/Sorting/AlphanumComparator.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/ArtistComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/ArtistComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/BudgetComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/BudgetComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/CommunityRatingComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/CriticRatingComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/CriticRatingComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/DateCreatedComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/DateCreatedComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/DatePlayedComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/DatePlayedComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/GameSystemComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/GameSystemComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/IsFolderComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/IsFolderComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/IsPlayedComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/IsPlayedComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/IsUnplayedComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/MetascoreComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/MetascoreComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/NameComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/NameComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/OfficialRatingComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/PlayCountComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/PlayersComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/PlayersComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/PremiereDateComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/PremiereDateComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/ProductionYearComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/ProductionYearComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/RandomComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/RandomComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/RevenueComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/RevenueComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/RuntimeComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/RuntimeComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/SeriesSortNameComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/SortNameComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/SortNameComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/StartDateComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/StartDateComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/StudioComparer.cs (renamed from MediaBrowser.Server.Implementations/Sorting/StudioComparer.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/AppSyncProvider.cs (renamed from MediaBrowser.Server.Implementations/Sync/AppSyncProvider.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/CloudSyncProfile.cs (renamed from MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/IHasSyncQuality.cs (renamed from MediaBrowser.Server.Implementations/Sync/IHasSyncQuality.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/MediaSync.cs (renamed from MediaBrowser.Server.Implementations/Sync/MediaSync.cs) | 20 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/MultiProviderSync.cs (renamed from MediaBrowser.Server.Implementations/Sync/MultiProviderSync.cs) | 9 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/ServerSyncScheduledTask.cs (renamed from MediaBrowser.Server.Implementations/Sync/ServerSyncScheduledTask.cs) | 9 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/SyncConfig.cs (renamed from MediaBrowser.Server.Implementations/Sync/SyncConfig.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/SyncConvertScheduledTask.cs (renamed from MediaBrowser.Server.Implementations/Sync/SyncConvertScheduledTask.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/SyncHelper.cs (renamed from MediaBrowser.Server.Implementations/Sync/SyncHelper.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/SyncJobOptions.cs (renamed from MediaBrowser.Server.Implementations/Sync/SyncJobOptions.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/SyncJobProcessor.cs (renamed from MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/SyncManager.cs (renamed from MediaBrowser.Server.Implementations/Sync/SyncManager.cs) | 11 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/SyncNotificationEntryPoint.cs (renamed from MediaBrowser.Server.Implementations/Sync/SyncNotificationEntryPoint.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/SyncRegistrationInfo.cs (renamed from MediaBrowser.Server.Implementations/Sync/SyncRegistrationInfo.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/SyncedMediaSourceProvider.cs (renamed from MediaBrowser.Server.Implementations/Sync/SyncedMediaSourceProvider.cs) | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sync/TargetDataProvider.cs (renamed from MediaBrowser.Server.Implementations/Sync/TargetDataProvider.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/TV/SeriesPostScanTask.cs (renamed from MediaBrowser.Server.Implementations/TV/SeriesPostScanTask.cs) | 11 | ||||
| -rw-r--r-- | Emby.Server.Implementations/TV/TVSeriesManager.cs (renamed from MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Updates/InstallationManager.cs (renamed from MediaBrowser.Server.Implementations/Updates/InstallationManager.cs) | 26 | ||||
| -rw-r--r-- | Emby.Server.Implementations/UserViews/CollectionFolderImageProvider.cs (renamed from MediaBrowser.Server.Implementations/UserViews/CollectionFolderImageProvider.cs) | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/UserViews/DynamicImageProvider.cs (renamed from MediaBrowser.Server.Implementations/UserViews/DynamicImageProvider.cs) | 6 | ||||
| -rw-r--r-- | Emby.Server.Implementations/project.json | 11 | ||||
| -rw-r--r-- | Emby.Server.sln | 9 | ||||
| -rw-r--r-- | MediaBrowser.Common/Net/HttpRequestOptions.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Common/Properties/AssemblyInfo.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Common/Updates/IInstallationManager.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaBrowser.Controller.csproj | 4 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Properties/AssemblyInfo.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Controller/packages.config | 3 | ||||
| -rw-r--r-- | MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs | 19 | ||||
| -rw-r--r-- | MediaBrowser.LocalMetadata/Parsers/BoxSetXmlParser.cs | 19 | ||||
| -rw-r--r-- | MediaBrowser.LocalMetadata/Parsers/PlaylistXmlParser.cs | 38 | ||||
| -rw-r--r-- | MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Cryptography/ICryptographyProvider.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Mono.sln | 41 | ||||
| -rw-r--r-- | MediaBrowser.Providers/TV/MissingEpisodeProvider.cs | 14 | ||||
| -rw-r--r-- | MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs | 128 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/IO/FileRefresher.cs | 22 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs | 11 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpHost.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj | 595 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/News/NewsEntryPoint.cs | 170 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/packages.config | 5 | ||||
| -rw-r--r-- | MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj | 4 | ||||
| -rw-r--r-- | MediaBrowser.Server.Mono/packages.config | 2 | ||||
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/ApplicationHost.cs | 54 | ||||
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj | 13 | ||||
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/Threading/PeriodicTimer.cs (renamed from MediaBrowser.Server.Implementations/Threading/PeriodicTimer.cs) | 6 | ||||
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/packages.config | 3 | ||||
| -rw-r--r-- | MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj | 4 | ||||
| -rw-r--r-- | MediaBrowser.ServerApplication/packages.config | 2 | ||||
| -rw-r--r-- | MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj | 5 | ||||
| -rw-r--r-- | MediaBrowser.XbmcMetadata/packages.config | 1 | ||||
| -rw-r--r-- | MediaBrowser.sln | 163 | ||||
| -rw-r--r-- | Mono.Nat/Mono.Nat.xproj | 2 | ||||
| -rw-r--r-- | Mono.Nat/Properties/AssemblyInfo.cs | 3 | ||||
| -rw-r--r-- | Nuget/MediaBrowser.Common.nuspec | 7 |
231 files changed, 1786 insertions, 1382 deletions
diff --git a/Emby.Common.Implementations/BaseApplicationHost.cs b/Emby.Common.Implementations/BaseApplicationHost.cs index 897557efd..e1f7ef08a 100644 --- a/Emby.Common.Implementations/BaseApplicationHost.cs +++ b/Emby.Common.Implementations/BaseApplicationHost.cs @@ -549,6 +549,8 @@ return null; TimerFactory = new TimerFactory(); RegisterSingleInstance(TimerFactory); + RegisterSingleInstance(CryptographyProvider); + return Task.FromResult(true); } diff --git a/Emby.Common.Implementations/Cryptography/CryptographyProvider.cs b/Emby.Common.Implementations/Cryptography/CryptographyProvider.cs index 5ece28dc6..7b8d95b96 100644 --- a/Emby.Common.Implementations/Cryptography/CryptographyProvider.cs +++ b/Emby.Common.Implementations/Cryptography/CryptographyProvider.cs @@ -19,6 +19,15 @@ namespace Emby.Common.Implementations.Cryptography return provider.ComputeHash(Encoding.Unicode.GetBytes(str)); } } + + public byte[] GetSHA1Bytes(byte[] bytes) + { + using (var provider = SHA1.Create()) + { + return provider.ComputeHash(bytes); + } + } + public byte[] GetMD5Bytes(Stream str) { using (var provider = MD5.Create()) @@ -26,5 +35,13 @@ namespace Emby.Common.Implementations.Cryptography return provider.ComputeHash(str); } } + + public byte[] GetMD5Bytes(byte[] bytes) + { + using (var provider = MD5.Create()) + { + return provider.ComputeHash(bytes); + } + } } } diff --git a/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs index 4c034fa6a..85fcb556f 100644 --- a/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs +++ b/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs @@ -169,9 +169,23 @@ namespace Emby.Common.Implementations.HttpClientManager AddRequestHeaders(httpWebRequest, options); #if NET46 - httpWebRequest.AutomaticDecompression = options.EnableHttpCompression ? - (options.DecompressionMethod ?? DecompressionMethods.Deflate) : - DecompressionMethods.None; + if (options.EnableHttpCompression) + { + if (options.DecompressionMethod.HasValue) + { + httpWebRequest.AutomaticDecompression = options.DecompressionMethod.Value == CompressionMethod.Gzip + ? DecompressionMethods.GZip + : DecompressionMethods.Deflate; + } + else + { + httpWebRequest.AutomaticDecompression = DecompressionMethods.Deflate; + } + } + else + { + httpWebRequest.AutomaticDecompression = DecompressionMethods.None; + } #endif } diff --git a/MediaBrowser.Server.Implementations/Reflection/AssemblyInfo.cs b/Emby.Common.Implementations/Reflection/AssemblyInfo.cs index ec25e7951..820856da5 100644 --- a/MediaBrowser.Server.Implementations/Reflection/AssemblyInfo.cs +++ b/Emby.Common.Implementations/Reflection/AssemblyInfo.cs @@ -1,14 +1,18 @@ using System; using System.IO; using MediaBrowser.Model.Reflection; +using System.Reflection; -namespace MediaBrowser.Server.Implementations.Reflection +namespace Emby.Common.Implementations.Reflection { public class AssemblyInfo : IAssemblyInfo { public Stream GetManifestResourceStream(Type type, string resource) { +#if NET46 return type.Assembly.GetManifestResourceStream(resource); +#endif + return type.GetTypeInfo().Assembly.GetManifestResourceStream(resource); } } } diff --git a/MediaBrowser.Server.Implementations/TextEncoding/TextEncoding.cs b/Emby.Common.Implementations/TextEncoding/TextEncoding.cs index 4c047b7d5..35b869e43 100644 --- a/MediaBrowser.Server.Implementations/TextEncoding/TextEncoding.cs +++ b/Emby.Common.Implementations/TextEncoding/TextEncoding.cs @@ -2,7 +2,7 @@ using MediaBrowser.Model.IO; using MediaBrowser.Model.TextEncoding; -namespace MediaBrowser.Server.Implementations.TextEncoding +namespace Emby.Common.Implementations.TextEncoding { public class TextEncoding : IEncoding { @@ -42,8 +42,7 @@ namespace MediaBrowser.Server.Implementations.TextEncoding if (buffer[0] == 0x2b && buffer[1] == 0x2f && buffer[2] == 0x76) return Encoding.UTF7; - // It's ok - anything aside from utf is ok since that's what we're looking for - return Encoding.Default; + return null; } } } diff --git a/MediaBrowser.Server.Implementations/Xml/XmlReaderSettingsFactory.cs b/Emby.Common.Implementations/Xml/XmlReaderSettingsFactory.cs index ae7018ad4..806290cf4 100644 --- a/MediaBrowser.Server.Implementations/Xml/XmlReaderSettingsFactory.cs +++ b/Emby.Common.Implementations/Xml/XmlReaderSettingsFactory.cs @@ -1,7 +1,7 @@ using System.Xml; using MediaBrowser.Model.Xml; -namespace MediaBrowser.Server.Implementations.Xml +namespace Emby.Common.Implementations.Xml { public class XmlReaderSettingsFactory : IXmlReaderSettingsFactory { @@ -11,7 +11,9 @@ namespace MediaBrowser.Server.Implementations.Xml if (!enableValidation) { +#if NET46 settings.ValidationType = ValidationType.None; +#endif } return settings; diff --git a/Emby.Common.Implementations/project.json b/Emby.Common.Implementations/project.json index a65b86345..dc96f5726 100644 --- a/Emby.Common.Implementations/project.json +++ b/Emby.Common.Implementations/project.json @@ -23,27 +23,20 @@ "System.Xml.Serialization": "4.0.0.0" }, "dependencies": { - "MediaBrowser.Common": { - "target": "project" - }, + "SimpleInjector": "3.2.4", + "NLog": "4.4.0-betaV15", "MediaBrowser.Model": { "target": "project" }, - "SimpleInjector": "3.2.4", - "NLog": "4.4.0-betaV15" - } + "MediaBrowser.Common": { + "target": "project" + } } }, "netstandard1.6": { "imports": "dnxcore50", "dependencies": { "NETStandard.Library": "1.6.0", - "MediaBrowser.Common": { - "target": "project" - }, - "MediaBrowser.Model": { - "target": "project" - }, - "System.IO.FileSystem.DriveInfo": "4.0.0", + "System.IO.FileSystem.DriveInfo": "4.0.0", "System.Diagnostics.Process": "4.1.0", "System.Threading.Timer": "4.0.1", "System.Net.Requests": "4.0.11", @@ -58,8 +51,13 @@ "System.Reflection.Primitives": "4.0.1", "System.Runtime.Loader": "4.0.0", "SimpleInjector": "3.2.4", - "NLog": "4.4.0-betaV15" - } + "NLog": "4.4.0-betaV15", + "MediaBrowser.Model": { + "target": "project" + }, + "MediaBrowser.Common": { + "target": "project" + } } } } } diff --git a/Emby.Dlna/DlnaManager.cs b/Emby.Dlna/DlnaManager.cs index c5798a5d1..c348e658c 100644 --- a/Emby.Dlna/DlnaManager.cs +++ b/Emby.Dlna/DlnaManager.cs @@ -560,17 +560,19 @@ namespace Emby.Dlna ? ImageFormat.Png : ImageFormat.Jpg; + var resource = GetType().Namespace + ".Images." + filename.ToLower(); + #if NET46 return new ImageStream { Format = format, - Stream = GetType().Assembly.GetManifestResourceStream("MediaBrowser.Dlna.Images." + filename.ToLower()) + Stream = GetType().Assembly.GetManifestResourceStream(resource) }; #elif NETSTANDARD1_6 return new ImageStream { Format = format, - Stream = GetType().GetTypeInfo().Assembly.GetManifestResourceStream("MediaBrowser.Dlna.Images." + filename.ToLower()) + Stream = GetType().GetTypeInfo().Assembly.GetManifestResourceStream(resource) }; #endif throw new NotImplementedException(); diff --git a/Emby.Photos/Emby.Photos.csproj b/Emby.Photos/Emby.Photos.csproj index ed126a41c..21631aeb5 100644 --- a/Emby.Photos/Emby.Photos.csproj +++ b/Emby.Photos/Emby.Photos.csproj @@ -37,6 +37,9 @@ </Reference> </ItemGroup> <ItemGroup> + <Compile Include="..\SharedVersion.cs"> + <Link>Properties\SharedVersion.cs</Link> + </Compile> <Compile Include="PhotoProvider.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> diff --git a/Emby.Photos/Properties/AssemblyInfo.cs b/Emby.Photos/Properties/AssemblyInfo.cs index abef142ef..49ac83345 100644 --- a/Emby.Photos/Properties/AssemblyInfo.cs +++ b/Emby.Photos/Properties/AssemblyInfo.cs @@ -31,6 +31,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +// [assembly: AssemblyVersion("1.0.*")]
\ No newline at end of file diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs index 51f5f57b3..11fd3a872 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs +++ b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs @@ -19,7 +19,7 @@ using System.Linq; using System.Text; using MediaBrowser.Model.Globalization; -namespace MediaBrowser.Server.Implementations.EntryPoints +namespace Emby.Server.Implementations.Activity { public class ActivityLogEntryPoint : IServerEntryPoint { diff --git a/MediaBrowser.Server.Implementations/Activity/ActivityManager.cs b/Emby.Server.Implementations/Activity/ActivityManager.cs index 2af9395c3..b6095f082 100644 --- a/MediaBrowser.Server.Implementations/Activity/ActivityManager.cs +++ b/Emby.Server.Implementations/Activity/ActivityManager.cs @@ -8,7 +8,7 @@ using System; using System.Linq; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.Activity +namespace Emby.Server.Implementations.Activity { public class ActivityManager : IActivityManager { diff --git a/MediaBrowser.Server.Implementations/Branding/BrandingConfigurationFactory.cs b/Emby.Server.Implementations/Branding/BrandingConfigurationFactory.cs index d6cd3424b..a29f55f16 100644 --- a/MediaBrowser.Server.Implementations/Branding/BrandingConfigurationFactory.cs +++ b/Emby.Server.Implementations/Branding/BrandingConfigurationFactory.cs @@ -2,7 +2,7 @@ using MediaBrowser.Model.Branding; using System.Collections.Generic; -namespace MediaBrowser.Server.Implementations.Branding +namespace Emby.Server.Implementations.Branding { public class BrandingConfigurationFactory : IConfigurationFactory { diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelConfigurations.cs b/Emby.Server.Implementations/Channels/ChannelConfigurations.cs index 9dfb0404e..ef0973e7f 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelConfigurations.cs +++ b/Emby.Server.Implementations/Channels/ChannelConfigurations.cs @@ -2,7 +2,7 @@ using MediaBrowser.Model.Configuration; using System.Collections.Generic; -namespace MediaBrowser.Server.Implementations.Channels +namespace Emby.Server.Implementations.Channels { public static class ChannelConfigurationExtension { diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelDynamicMediaSourceProvider.cs b/Emby.Server.Implementations/Channels/ChannelDynamicMediaSourceProvider.cs index fae78b9bc..98011ddd4 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelDynamicMediaSourceProvider.cs +++ b/Emby.Server.Implementations/Channels/ChannelDynamicMediaSourceProvider.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.Channels +namespace Emby.Server.Implementations.Channels { public class ChannelDynamicMediaSourceProvider : IMediaSourceProvider { diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelImageProvider.cs b/Emby.Server.Implementations/Channels/ChannelImageProvider.cs index c98f71ce2..f892b1e62 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelImageProvider.cs +++ b/Emby.Server.Implementations/Channels/ChannelImageProvider.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.Channels +namespace Emby.Server.Implementations.Channels { public class ChannelImageProvider : IDynamicImageProvider, IHasItemChangeMonitor { diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index 300973ce1..2ce880c93 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -31,7 +31,7 @@ using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.IO; using MediaBrowser.Model.Globalization; -namespace MediaBrowser.Server.Implementations.Channels +namespace Emby.Server.Implementations.Channels { public class ChannelManager : IChannelManager { @@ -410,7 +410,7 @@ namespace MediaBrowser.Server.Implementations.Channels } } } - catch (DirectoryNotFoundException) + catch (IOException) { } @@ -781,7 +781,7 @@ namespace MediaBrowser.Server.Implementations.Channels { } - catch (DirectoryNotFoundException) + catch (IOException) { } @@ -801,7 +801,7 @@ namespace MediaBrowser.Server.Implementations.Channels { } - catch (DirectoryNotFoundException) + catch (IOException) { } @@ -943,7 +943,7 @@ namespace MediaBrowser.Server.Implementations.Channels { } - catch (DirectoryNotFoundException) + catch (IOException) { } @@ -963,7 +963,7 @@ namespace MediaBrowser.Server.Implementations.Channels { } - catch (DirectoryNotFoundException) + catch (IOException) { } @@ -1104,7 +1104,7 @@ namespace MediaBrowser.Server.Implementations.Channels { } - catch (DirectoryNotFoundException) + catch (IOException) { } @@ -1127,7 +1127,7 @@ namespace MediaBrowser.Server.Implementations.Channels { } - catch (DirectoryNotFoundException) + catch (IOException) { } diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelPostScanTask.cs b/Emby.Server.Implementations/Channels/ChannelPostScanTask.cs index afb842c1c..aef06bd1d 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelPostScanTask.cs +++ b/Emby.Server.Implementations/Channels/ChannelPostScanTask.cs @@ -11,7 +11,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Extensions; -namespace MediaBrowser.Server.Implementations.Channels +namespace Emby.Server.Implementations.Channels { public class ChannelPostScanTask { diff --git a/MediaBrowser.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs index 8bcb3cda9..d5ec86445 100644 --- a/MediaBrowser.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs +++ b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.Channels +namespace Emby.Server.Implementations.Channels { class RefreshChannelsScheduledTask : IScheduledTask { diff --git a/MediaBrowser.Server.Implementations/Collections/CollectionImageProvider.cs b/Emby.Server.Implementations/Collections/CollectionImageProvider.cs index d70d4b9e6..b82d4e44e 100644 --- a/MediaBrowser.Server.Implementations/Collections/CollectionImageProvider.cs +++ b/Emby.Server.Implementations/Collections/CollectionImageProvider.cs @@ -6,16 +6,14 @@ using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -using MediaBrowser.Server.Implementations.Photos; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; +using Emby.Server.Implementations.Images; using MediaBrowser.Model.IO; using MediaBrowser.Model.Extensions; -namespace MediaBrowser.Server.Implementations.Collections +namespace Emby.Server.Implementations.Collections { public class CollectionImageProvider : BaseDynamicImageProvider<BoxSet> { diff --git a/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs index f074fd812..d0bd76c35 100644 --- a/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs +++ b/Emby.Server.Implementations/Collections/CollectionManager.cs @@ -11,11 +11,9 @@ 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; -namespace MediaBrowser.Server.Implementations.Collections +namespace Emby.Server.Implementations.Collections { public class CollectionManager : ICollectionManager { diff --git a/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs b/Emby.Server.Implementations/Devices/DeviceManager.cs index e2e59df08..cdf636e22 100644 --- a/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs +++ b/Emby.Server.Implementations/Devices/DeviceManager.cs @@ -21,7 +21,7 @@ using MediaBrowser.Model.IO; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.IO; -namespace MediaBrowser.Server.Implementations.Devices +namespace Emby.Server.Implementations.Devices { public class DeviceManager : IDeviceManager { diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index a06656b21..85549439b 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -29,7 +29,7 @@ using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; using MediaBrowser.Model.Extensions; -namespace MediaBrowser.Server.Implementations.Dto +namespace Emby.Server.Implementations.Dto { public class DtoService : IDtoService { diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj new file mode 100644 index 000000000..7eb6a67d4 --- /dev/null +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -0,0 +1,249 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{E383961B-9356-4D5D-8233-9A1079D03055}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Emby.Server.Implementations</RootNamespace> + <AssemblyName>Emby.Server.Implementations</AssemblyName> + <DefaultLanguage>en-US</DefaultLanguage> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <TargetFrameworkProfile>Profile7</TargetFrameworkProfile> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <!-- A reference to the entire .NET Framework is automatically included --> + <None Include="project.json" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Activity\ActivityLogEntryPoint.cs" /> + <Compile Include="Activity\ActivityManager.cs" /> + <Compile Include="Branding\BrandingConfigurationFactory.cs" /> + <Compile Include="Channels\ChannelConfigurations.cs" /> + <Compile Include="Channels\ChannelDynamicMediaSourceProvider.cs" /> + <Compile Include="Channels\ChannelImageProvider.cs" /> + <Compile Include="Channels\ChannelManager.cs" /> + <Compile Include="Channels\ChannelPostScanTask.cs" /> + <Compile Include="Channels\RefreshChannelsScheduledTask.cs" /> + <Compile Include="Collections\CollectionImageProvider.cs" /> + <Compile Include="Collections\CollectionManager.cs" /> + <Compile Include="Devices\DeviceManager.cs" /> + <Compile Include="Dto\DtoService.cs" /> + <Compile Include="EntryPoints\AutomaticRestartEntryPoint.cs" /> + <Compile Include="EntryPoints\LibraryChangedNotifier.cs" /> + <Compile Include="EntryPoints\LoadRegistrations.cs" /> + <Compile Include="EntryPoints\RecordingNotifier.cs" /> + <Compile Include="EntryPoints\RefreshUsersMetadata.cs" /> + <Compile Include="EntryPoints\ServerEventNotifier.cs" /> + <Compile Include="EntryPoints\UsageEntryPoint.cs" /> + <Compile Include="EntryPoints\UsageReporter.cs" /> + <Compile Include="EntryPoints\UserDataChangeNotifier.cs" /> + <Compile Include="FileOrganization\EpisodeFileOrganizer.cs" /> + <Compile Include="FileOrganization\Extensions.cs" /> + <Compile Include="FileOrganization\FileOrganizationNotifier.cs" /> + <Compile Include="FileOrganization\FileOrganizationService.cs" /> + <Compile Include="FileOrganization\NameUtils.cs" /> + <Compile Include="FileOrganization\OrganizerScheduledTask.cs" /> + <Compile Include="FileOrganization\TvFolderOrganizer.cs" /> + <Compile Include="Images\BaseDynamicImageProvider.cs" /> + <Compile Include="Intros\DefaultIntroProvider.cs" /> + <Compile Include="IO\ThrottledStream.cs" /> + <Compile Include="Library\CoreResolutionIgnoreRule.cs" /> + <Compile Include="Library\LibraryManager.cs" /> + <Compile Include="Library\LocalTrailerPostScanTask.cs" /> + <Compile Include="Library\MediaSourceManager.cs" /> + <Compile Include="Library\MusicManager.cs" /> + <Compile Include="Library\PathExtensions.cs" /> + <Compile Include="Library\ResolverHelper.cs" /> + <Compile Include="Library\Resolvers\Audio\AudioResolver.cs" /> + <Compile Include="Library\Resolvers\Audio\MusicAlbumResolver.cs" /> + <Compile Include="Library\Resolvers\Audio\MusicArtistResolver.cs" /> + <Compile Include="Library\Resolvers\BaseVideoResolver.cs" /> + <Compile Include="Library\Resolvers\FolderResolver.cs" /> + <Compile Include="Library\Resolvers\ItemResolver.cs" /> + <Compile Include="Library\Resolvers\Movies\BoxSetResolver.cs" /> + <Compile Include="Library\Resolvers\Movies\MovieResolver.cs" /> + <Compile Include="Library\Resolvers\PhotoAlbumResolver.cs" /> + <Compile Include="Library\Resolvers\PhotoResolver.cs" /> + <Compile Include="Library\Resolvers\PlaylistResolver.cs" /> + <Compile Include="Library\Resolvers\SpecialFolderResolver.cs" /> + <Compile Include="Library\Resolvers\TV\EpisodeResolver.cs" /> + <Compile Include="Library\Resolvers\TV\SeasonResolver.cs" /> + <Compile Include="Library\Resolvers\TV\SeriesResolver.cs" /> + <Compile Include="Library\Resolvers\VideoResolver.cs" /> + <Compile Include="Library\SearchEngine.cs" /> + <Compile Include="Library\UserDataManager.cs" /> + <Compile Include="Library\UserManager.cs" /> + <Compile Include="Library\UserViewManager.cs" /> + <Compile Include="Library\Validators\ArtistsPostScanTask.cs" /> + <Compile Include="Library\Validators\ArtistsValidator.cs" /> + <Compile Include="Library\Validators\GameGenresPostScanTask.cs" /> + <Compile Include="Library\Validators\GameGenresValidator.cs" /> + <Compile Include="Library\Validators\GenresPostScanTask.cs" /> + <Compile Include="Library\Validators\GenresValidator.cs" /> + <Compile Include="Library\Validators\MusicGenresPostScanTask.cs" /> + <Compile Include="Library\Validators\MusicGenresValidator.cs" /> + <Compile Include="Library\Validators\PeopleValidator.cs" /> + <Compile Include="Library\Validators\StudiosPostScanTask.cs" /> + <Compile Include="Library\Validators\StudiosValidator.cs" /> + <Compile Include="Library\Validators\YearsPostScanTask.cs" /> + <Compile Include="LiveTv\ChannelImageProvider.cs" /> + <Compile Include="LiveTv\EmbyTV\DirectRecorder.cs" /> + <Compile Include="LiveTv\EmbyTV\EmbyTV.cs" /> + <Compile Include="LiveTv\EmbyTV\EmbyTVRegistration.cs" /> + <Compile Include="LiveTv\EmbyTV\EncodedRecorder.cs" /> + <Compile Include="LiveTv\EmbyTV\EntryPoint.cs" /> + <Compile Include="LiveTv\EmbyTV\IRecorder.cs" /> + <Compile Include="LiveTv\EmbyTV\ItemDataProvider.cs" /> + <Compile Include="LiveTv\EmbyTV\RecordingHelper.cs" /> + <Compile Include="LiveTv\EmbyTV\SeriesTimerManager.cs" /> + <Compile Include="LiveTv\EmbyTV\TimerManager.cs" /> + <Compile Include="LiveTv\Listings\SchedulesDirect.cs" /> + <Compile Include="LiveTv\Listings\XmlTvListingsProvider.cs" /> + <Compile Include="LiveTv\LiveStreamHelper.cs" /> + <Compile Include="LiveTv\LiveTvConfigurationFactory.cs" /> + <Compile Include="LiveTv\LiveTvDtoService.cs" /> + <Compile Include="LiveTv\LiveTvManager.cs" /> + <Compile Include="LiveTv\LiveTvMediaSourceProvider.cs" /> + <Compile Include="LiveTv\ProgramImageProvider.cs" /> + <Compile Include="LiveTv\RecordingImageProvider.cs" /> + <Compile Include="LiveTv\RefreshChannelsScheduledTask.cs" /> + <Compile Include="LiveTv\TunerHosts\BaseTunerHost.cs" /> + <Compile Include="LiveTv\TunerHosts\HdHomerun\HdHomerunDiscovery.cs" /> + <Compile Include="LiveTv\TunerHosts\HdHomerun\HdHomerunHost.cs" /> + <Compile Include="LiveTv\TunerHosts\HdHomerun\HdHomerunLiveStream.cs" /> + <Compile Include="LiveTv\TunerHosts\M3uParser.cs" /> + <Compile Include="LiveTv\TunerHosts\M3UTunerHost.cs" /> + <Compile Include="LiveTv\TunerHosts\MulticastStream.cs" /> + <Compile Include="LiveTv\TunerHosts\QueueStream.cs" /> + <Compile Include="Logging\PatternsLogger.cs" /> + <Compile Include="MediaEncoder\EncodingManager.cs" /> + <Compile Include="News\NewsEntryPoint.cs" /> + <Compile Include="News\NewsService.cs" /> + <Compile Include="Notifications\CoreNotificationTypes.cs" /> + <Compile Include="Notifications\IConfigurableNotificationService.cs" /> + <Compile Include="Notifications\InternalNotificationService.cs" /> + <Compile Include="Notifications\NotificationConfigurationFactory.cs" /> + <Compile Include="Notifications\NotificationManager.cs" /> + <Compile Include="Notifications\Notifications.cs" /> + <Compile Include="Notifications\WebSocketNotifier.cs" /> + <Compile Include="Persistence\CleanDatabaseScheduledTask.cs" /> + <Compile Include="Photos\PhotoAlbumImageProvider.cs" /> + <Compile Include="Playlists\PlaylistImageProvider.cs" /> + <Compile Include="Playlists\PlaylistManager.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="ScheduledTasks\ChapterImagesTask.cs" /> + <Compile Include="ScheduledTasks\PeopleValidationTask.cs" /> + <Compile Include="ScheduledTasks\PluginUpdateTask.cs" /> + <Compile Include="ScheduledTasks\RefreshIntrosTask.cs" /> + <Compile Include="ScheduledTasks\RefreshMediaLibraryTask.cs" /> + <Compile Include="ScheduledTasks\SystemUpdateTask.cs" /> + <Compile Include="ServerManager\ServerManager.cs" /> + <Compile Include="ServerManager\WebSocketConnection.cs" /> + <Compile Include="Session\HttpSessionController.cs" /> + <Compile Include="Session\SessionManager.cs" /> + <Compile Include="Session\SessionWebSocketListener.cs" /> + <Compile Include="Session\WebSocketController.cs" /> + <Compile Include="Sorting\AiredEpisodeOrderComparer.cs" /> + <Compile Include="Sorting\AirTimeComparer.cs" /> + <Compile Include="Sorting\AlbumArtistComparer.cs" /> + <Compile Include="Sorting\AlbumComparer.cs" /> + <Compile Include="Sorting\AlphanumComparator.cs" /> + <Compile Include="Sorting\ArtistComparer.cs" /> + <Compile Include="Sorting\BudgetComparer.cs" /> + <Compile Include="Sorting\CommunityRatingComparer.cs" /> + <Compile Include="Sorting\CriticRatingComparer.cs" /> + <Compile Include="Sorting\DateCreatedComparer.cs" /> + <Compile Include="Sorting\DateLastMediaAddedComparer.cs" /> + <Compile Include="Sorting\DatePlayedComparer.cs" /> + <Compile Include="Sorting\GameSystemComparer.cs" /> + <Compile Include="Sorting\IsFavoriteOrLikeComparer.cs" /> + <Compile Include="Sorting\IsFolderComparer.cs" /> + <Compile Include="Sorting\IsPlayedComparer.cs" /> + <Compile Include="Sorting\IsUnplayedComparer.cs" /> + <Compile Include="Sorting\MetascoreComparer.cs" /> + <Compile Include="Sorting\NameComparer.cs" /> + <Compile Include="Sorting\OfficialRatingComparer.cs" /> + <Compile Include="Sorting\PlayCountComparer.cs" /> + <Compile Include="Sorting\PlayersComparer.cs" /> + <Compile Include="Sorting\PremiereDateComparer.cs" /> + <Compile Include="Sorting\ProductionYearComparer.cs" /> + <Compile Include="Sorting\RandomComparer.cs" /> + <Compile Include="Sorting\RevenueComparer.cs" /> + <Compile Include="Sorting\RuntimeComparer.cs" /> + <Compile Include="Sorting\SeriesSortNameComparer.cs" /> + <Compile Include="Sorting\SortNameComparer.cs" /> + <Compile Include="Sorting\StartDateComparer.cs" /> + <Compile Include="Sorting\StudioComparer.cs" /> + <Compile Include="Sync\AppSyncProvider.cs" /> + <Compile Include="Sync\CloudSyncProfile.cs" /> + <Compile Include="Sync\IHasSyncQuality.cs" /> + <Compile Include="Sync\MediaSync.cs" /> + <Compile Include="Sync\MultiProviderSync.cs" /> + <Compile Include="Sync\ServerSyncScheduledTask.cs" /> + <Compile Include="Sync\SyncConfig.cs" /> + <Compile Include="Sync\SyncConvertScheduledTask.cs" /> + <Compile Include="Sync\SyncedMediaSourceProvider.cs" /> + <Compile Include="Sync\SyncHelper.cs" /> + <Compile Include="Sync\SyncJobOptions.cs" /> + <Compile Include="Sync\SyncJobProcessor.cs" /> + <Compile Include="Sync\SyncManager.cs" /> + <Compile Include="Sync\SyncNotificationEntryPoint.cs" /> + <Compile Include="Sync\SyncRegistrationInfo.cs" /> + <Compile Include="Sync\TargetDataProvider.cs" /> + <Compile Include="TV\SeriesPostScanTask.cs" /> + <Compile Include="TV\TVSeriesManager.cs" /> + <Compile Include="Updates\InstallationManager.cs" /> + <Compile Include="UserViews\CollectionFolderImageProvider.cs" /> + <Compile Include="UserViews\DynamicImageProvider.cs" /> + </ItemGroup> + <ItemGroup /> + <ItemGroup> + <ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj"> + <Project>{9142eefa-7570-41e1-bfcc-468bb571af2f}</Project> + <Name>MediaBrowser.Common</Name> + </ProjectReference> + <ProjectReference Include="..\MediaBrowser.Controller\MediaBrowser.Controller.csproj"> + <Project>{17e1f4e6-8abd-4fe5-9ecf-43d4b6087ba2}</Project> + <Name>MediaBrowser.Controller</Name> + </ProjectReference> + <ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj"> + <Project>{7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b}</Project> + <Name>MediaBrowser.Model</Name> + </ProjectReference> + <ProjectReference Include="..\MediaBrowser.Providers\MediaBrowser.Providers.csproj"> + <Project>{442b5058-dcaf-4263-bb6a-f21e31120a1b}</Project> + <Name>MediaBrowser.Providers</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project>
\ No newline at end of file diff --git a/MediaBrowser.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs index 1067e052d..38708648f 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs +++ b/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs @@ -10,8 +10,9 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Model.LiveTv; +using MediaBrowser.Model.Threading; -namespace MediaBrowser.Server.Implementations.EntryPoints +namespace Emby.Server.Implementations.EntryPoints { public class AutomaticRestartEntryPoint : IServerEntryPoint { @@ -21,10 +22,11 @@ namespace MediaBrowser.Server.Implementations.EntryPoints private readonly ISessionManager _sessionManager; private readonly IServerConfigurationManager _config; private readonly ILiveTvManager _liveTvManager; + private readonly ITimerFactory _timerFactory; - private Timer _timer; + private ITimer _timer; - public AutomaticRestartEntryPoint(IServerApplicationHost appHost, ILogger logger, ITaskManager iTaskManager, ISessionManager sessionManager, IServerConfigurationManager config, ILiveTvManager liveTvManager) + public AutomaticRestartEntryPoint(IServerApplicationHost appHost, ILogger logger, ITaskManager iTaskManager, ISessionManager sessionManager, IServerConfigurationManager config, ILiveTvManager liveTvManager, ITimerFactory timerFactory) { _appHost = appHost; _logger = logger; @@ -32,6 +34,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints _sessionManager = sessionManager; _config = config; _liveTvManager = liveTvManager; + _timerFactory = timerFactory; } public void Run() @@ -48,7 +51,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints if (_appHost.HasPendingRestart) { - _timer = new Timer(TimerCallback, null, TimeSpan.FromMinutes(10), TimeSpan.FromMinutes(10)); + _timer = _timerFactory.Create(TimerCallback, null, TimeSpan.FromMinutes(10), TimeSpan.FromMinutes(10)); } } diff --git a/MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs b/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs index 9f06a9860..91142f928 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs +++ b/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs @@ -10,8 +10,9 @@ using System.Linq; using System.Threading; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Model.Extensions; +using MediaBrowser.Model.Threading; -namespace MediaBrowser.Server.Implementations.EntryPoints +namespace Emby.Server.Implementations.EntryPoints { public class LibraryChangedNotifier : IServerEntryPoint { @@ -23,6 +24,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints private readonly ISessionManager _sessionManager; private readonly IUserManager _userManager; private readonly ILogger _logger; + private readonly ITimerFactory _timerFactory; /// <summary> /// The _library changed sync lock @@ -40,19 +42,20 @@ namespace MediaBrowser.Server.Implementations.EntryPoints /// Gets or sets the library update timer. /// </summary> /// <value>The library update timer.</value> - private Timer LibraryUpdateTimer { get; set; } + private ITimer LibraryUpdateTimer { get; set; } /// <summary> /// The library update duration /// </summary> private const int LibraryUpdateDuration = 5000; - public LibraryChangedNotifier(ILibraryManager libraryManager, ISessionManager sessionManager, IUserManager userManager, ILogger logger) + public LibraryChangedNotifier(ILibraryManager libraryManager, ISessionManager sessionManager, IUserManager userManager, ILogger logger, ITimerFactory timerFactory) { _libraryManager = libraryManager; _sessionManager = sessionManager; _userManager = userManager; _logger = logger; + _timerFactory = timerFactory; } public void Run() @@ -79,7 +82,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints { if (LibraryUpdateTimer == null) { - LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, LibraryUpdateDuration, + LibraryUpdateTimer = _timerFactory.Create(LibraryUpdateTimerCallback, null, LibraryUpdateDuration, Timeout.Infinite); } else @@ -112,7 +115,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints { if (LibraryUpdateTimer == null) { - LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, LibraryUpdateDuration, + LibraryUpdateTimer = _timerFactory.Create(LibraryUpdateTimerCallback, null, LibraryUpdateDuration, Timeout.Infinite); } else @@ -140,7 +143,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints { if (LibraryUpdateTimer == null) { - LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, LibraryUpdateDuration, + LibraryUpdateTimer = _timerFactory.Create(LibraryUpdateTimerCallback, null, LibraryUpdateDuration, Timeout.Infinite); } else diff --git a/MediaBrowser.Server.Implementations/EntryPoints/LoadRegistrations.cs b/Emby.Server.Implementations/EntryPoints/LoadRegistrations.cs index 47f22cae6..0203b5192 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/LoadRegistrations.cs +++ b/Emby.Server.Implementations/EntryPoints/LoadRegistrations.cs @@ -3,9 +3,9 @@ using MediaBrowser.Controller.Plugins; using MediaBrowser.Model.Logging; using System; using System.Threading.Tasks; -using MediaBrowser.Server.Implementations.Threading; +using MediaBrowser.Model.Threading; -namespace MediaBrowser.Server.Implementations.EntryPoints +namespace Emby.Server.Implementations.EntryPoints { /// <summary> /// Class LoadRegistrations @@ -22,16 +22,18 @@ namespace MediaBrowser.Server.Implementations.EntryPoints /// </summary> private readonly ILogger _logger; - private PeriodicTimer _timer; + private ITimer _timer; + private readonly ITimerFactory _timerFactory; /// <summary> /// Initializes a new instance of the <see cref="LoadRegistrations" /> class. /// </summary> /// <param name="securityManager">The security manager.</param> /// <param name="logManager">The log manager.</param> - public LoadRegistrations(ISecurityManager securityManager, ILogManager logManager) + public LoadRegistrations(ISecurityManager securityManager, ILogManager logManager, ITimerFactory timerFactory) { _securityManager = securityManager; + _timerFactory = timerFactory; _logger = logManager.GetLogger("Registration Loader"); } @@ -41,7 +43,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints /// </summary> public void Run() { - _timer = new PeriodicTimer(s => LoadAllRegistrations(), null, TimeSpan.FromMilliseconds(100), TimeSpan.FromHours(12)); + _timer = _timerFactory.Create(s => LoadAllRegistrations(), null, TimeSpan.FromMilliseconds(100), TimeSpan.FromHours(12)); } private async Task LoadAllRegistrations() diff --git a/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs b/Emby.Server.Implementations/EntryPoints/RecordingNotifier.cs index 414fda400..b674fc39b 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs +++ b/Emby.Server.Implementations/EntryPoints/RecordingNotifier.cs @@ -7,7 +7,7 @@ using MediaBrowser.Controller.Plugins; using MediaBrowser.Controller.Session; using MediaBrowser.Model.Logging; -namespace MediaBrowser.Server.Implementations.EntryPoints +namespace Emby.Server.Implementations.EntryPoints { public class RecordingNotifier : IServerEntryPoint { @@ -32,22 +32,22 @@ namespace MediaBrowser.Server.Implementations.EntryPoints _liveTvManager.SeriesTimerCreated += _liveTvManager_SeriesTimerCreated; } - private void _liveTvManager_SeriesTimerCreated(object sender, Model.Events.GenericEventArgs<TimerEventInfo> e) + private void _liveTvManager_SeriesTimerCreated(object sender, MediaBrowser.Model.Events.GenericEventArgs<TimerEventInfo> e) { SendMessage("SeriesTimerCreated", e.Argument); } - private void _liveTvManager_TimerCreated(object sender, Model.Events.GenericEventArgs<TimerEventInfo> e) + private void _liveTvManager_TimerCreated(object sender, MediaBrowser.Model.Events.GenericEventArgs<TimerEventInfo> e) { SendMessage("TimerCreated", e.Argument); } - private void _liveTvManager_SeriesTimerCancelled(object sender, Model.Events.GenericEventArgs<TimerEventInfo> e) + private void _liveTvManager_SeriesTimerCancelled(object sender, MediaBrowser.Model.Events.GenericEventArgs<TimerEventInfo> e) { SendMessage("SeriesTimerCancelled", e.Argument); } - private void _liveTvManager_TimerCancelled(object sender, Model.Events.GenericEventArgs<TimerEventInfo> e) + private void _liveTvManager_TimerCancelled(object sender, MediaBrowser.Model.Events.GenericEventArgs<TimerEventInfo> e) { SendMessage("TimerCancelled", e.Argument); } diff --git a/MediaBrowser.Server.Implementations/EntryPoints/RefreshUsersMetadata.cs b/Emby.Server.Implementations/EntryPoints/RefreshUsersMetadata.cs index a0b7ff515..77de849a1 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/RefreshUsersMetadata.cs +++ b/Emby.Server.Implementations/EntryPoints/RefreshUsersMetadata.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Plugins; using System.Threading; -namespace MediaBrowser.Server.Implementations.EntryPoints +namespace Emby.Server.Implementations.EntryPoints { /// <summary> /// Class RefreshUsersMetadata diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ServerEventNotifier.cs b/Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs index 0da48a2d8..4d640bc95 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/ServerEventNotifier.cs +++ b/Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs @@ -14,7 +14,7 @@ using System.Collections.Generic; using System.Threading; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.EntryPoints +namespace Emby.Server.Implementations.EntryPoints { /// <summary> /// Class WebSocketEvents diff --git a/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/UsageEntryPoint.cs index d14bd4368..1b897ca29 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs +++ b/Emby.Server.Implementations/EntryPoints/UsageEntryPoint.cs @@ -12,7 +12,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Configuration; -namespace MediaBrowser.Server.Implementations.EntryPoints +namespace Emby.Server.Implementations.EntryPoints { /// <summary> /// Class UsageEntryPoint diff --git a/MediaBrowser.Server.Implementations/EntryPoints/UsageReporter.cs b/Emby.Server.Implementations/EntryPoints/UsageReporter.cs index e445300e4..be848acb7 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/UsageReporter.cs +++ b/Emby.Server.Implementations/EntryPoints/UsageReporter.cs @@ -10,7 +10,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Logging; -namespace MediaBrowser.Server.Implementations.EntryPoints +namespace Emby.Server.Implementations.EntryPoints { public class UsageReporter { diff --git a/MediaBrowser.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs b/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs index 8262048b1..b93410180 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs +++ b/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs @@ -11,8 +11,9 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Extensions; +using MediaBrowser.Model.Threading; -namespace MediaBrowser.Server.Implementations.EntryPoints +namespace Emby.Server.Implementations.EntryPoints { class UserDataChangeNotifier : IServerEntryPoint { @@ -22,17 +23,19 @@ namespace MediaBrowser.Server.Implementations.EntryPoints private readonly IUserManager _userManager; private readonly object _syncLock = new object(); - private Timer UpdateTimer { get; set; } + private ITimer UpdateTimer { get; set; } + private readonly ITimerFactory _timerFactory; private const int UpdateDuration = 500; private readonly Dictionary<Guid, List<IHasUserData>> _changedItems = new Dictionary<Guid, List<IHasUserData>>(); - public UserDataChangeNotifier(IUserDataManager userDataManager, ISessionManager sessionManager, ILogger logger, IUserManager userManager) + public UserDataChangeNotifier(IUserDataManager userDataManager, ISessionManager sessionManager, ILogger logger, IUserManager userManager, ITimerFactory timerFactory) { _userDataManager = userDataManager; _sessionManager = sessionManager; _logger = logger; _userManager = userManager; + _timerFactory = timerFactory; } public void Run() @@ -51,7 +54,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints { if (UpdateTimer == null) { - UpdateTimer = new Timer(UpdateTimerCallback, null, UpdateDuration, + UpdateTimer = _timerFactory.Create(UpdateTimerCallback, null, UpdateDuration, Timeout.Infinite); } else diff --git a/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs b/Emby.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs index 19592bc4e..3f4ede478 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs +++ b/Emby.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs @@ -7,8 +7,6 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.FileOrganization; using MediaBrowser.Model.Logging; -using MediaBrowser.Server.Implementations.Library; -using MediaBrowser.Server.Implementations.Logging; using System; using System.Collections.Generic; using System.Globalization; @@ -16,11 +14,16 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Emby.Server.Implementations.Library; +using Emby.Server.Implementations.Logging; using MediaBrowser.Common.IO; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; +using MediaBrowser.Naming.TV; +using EpisodeInfo = MediaBrowser.Controller.Providers.EpisodeInfo; -namespace MediaBrowser.Server.Implementations.FileOrganization +namespace Emby.Server.Implementations.FileOrganization { public class EpisodeFileOrganizer { @@ -55,7 +58,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization OriginalPath = path, OriginalFileName = Path.GetFileName(path), Type = FileOrganizerType.Episode, - FileSize = new FileInfo(path).Length + FileSize = _fileSystem.GetFileInfo(path).Length }; try @@ -68,10 +71,10 @@ namespace MediaBrowser.Server.Implementations.FileOrganization } var namingOptions = ((LibraryManager)_libraryManager).GetNamingOptions(); - var resolver = new Naming.TV.EpisodeResolver(namingOptions, new PatternsLogger()); + var resolver = new EpisodeResolver(namingOptions, new PatternsLogger()); var episodeInfo = resolver.Resolve(path, false) ?? - new Naming.TV.EpisodeInfo(); + new MediaBrowser.Naming.TV.EpisodeInfo(); var seriesName = episodeInfo.SeriesName; @@ -505,7 +508,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization episodePaths.AddRange(filesOfOtherExtensions); } - catch (DirectoryNotFoundException) + catch (IOException) { // No big deal. Maybe the season folder doesn't already exist. } @@ -575,7 +578,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization result.ExtractedName = nameWithoutYear; result.ExtractedYear = yearInName; - var series = _libraryManager.GetItemList(new Controller.Entities.InternalItemsQuery + var series = _libraryManager.GetItemList(new InternalItemsQuery { IncludeItemTypes = new[] { typeof(Series).Name }, Recursive = true @@ -593,7 +596,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization if (info != null) { - series = _libraryManager.GetItemList(new Controller.Entities.InternalItemsQuery + series = _libraryManager.GetItemList(new InternalItemsQuery { IncludeItemTypes = new[] { typeof(Series).Name }, Recursive = true, @@ -808,8 +811,8 @@ namespace MediaBrowser.Server.Implementations.FileOrganization { try { - var sourceFileInfo = new FileInfo(sourcePath); - var destinationFileInfo = new FileInfo(newPath); + var sourceFileInfo = _fileSystem.GetFileInfo(sourcePath); + var destinationFileInfo = _fileSystem.GetFileInfo(newPath); if (sourceFileInfo.Length == destinationFileInfo.Length) { @@ -820,7 +823,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization { return false; } - catch (DirectoryNotFoundException) + catch (IOException) { return false; } diff --git a/MediaBrowser.Server.Implementations/FileOrganization/Extensions.cs b/Emby.Server.Implementations/FileOrganization/Extensions.cs index c560152db..506bc0327 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/Extensions.cs +++ b/Emby.Server.Implementations/FileOrganization/Extensions.cs @@ -2,7 +2,7 @@ using MediaBrowser.Model.FileOrganization; using System.Collections.Generic; -namespace MediaBrowser.Server.Implementations.FileOrganization +namespace Emby.Server.Implementations.FileOrganization { public static class ConfigurationExtension { diff --git a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs b/Emby.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs index 141dcf9b4..2a0176547 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs +++ b/Emby.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs @@ -8,7 +8,7 @@ using System; using System.Threading; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.FileOrganization +namespace Emby.Server.Implementations.FileOrganization { /// <summary> /// Class SessionInfoWebSocketListener diff --git a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs b/Emby.Server.Implementations/FileOrganization/FileOrganizationService.cs index de33c39e6..4094e6b9b 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs +++ b/Emby.Server.Implementations/FileOrganization/FileOrganizationService.cs @@ -21,7 +21,7 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.FileOrganization +namespace Emby.Server.Implementations.FileOrganization { public class FileOrganizationService : IFileOrganizationService { diff --git a/MediaBrowser.Server.Implementations/FileOrganization/NameUtils.cs b/Emby.Server.Implementations/FileOrganization/NameUtils.cs index 624133d4f..eb22ca4ea 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/NameUtils.cs +++ b/Emby.Server.Implementations/FileOrganization/NameUtils.cs @@ -2,10 +2,9 @@ using MediaBrowser.Controller.Entities; using System; using System.Globalization; -using System.Linq; -using System.Text; +using MediaBrowser.Controller.Extensions; -namespace MediaBrowser.Server.Implementations.FileOrganization +namespace Emby.Server.Implementations.FileOrganization { public static class NameUtils { @@ -54,7 +53,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization private static string GetComparableName(string name) { - name = RemoveDiacritics(name); + name = name.RemoveDiacritics(); name = " " + name + " "; @@ -78,19 +77,5 @@ namespace MediaBrowser.Server.Implementations.FileOrganization return name.Trim(); } - - /// <summary> - /// Removes the diacritics. - /// </summary> - /// <param name="text">The text.</param> - /// <returns>System.String.</returns> - private static string RemoveDiacritics(string text) - { - return String.Concat( - text.Normalize(NormalizationForm.FormD) - .Where(ch => CharUnicodeInfo.GetUnicodeCategory(ch) != - UnicodeCategory.NonSpacingMark) - ).Normalize(NormalizationForm.FormC); - } } } diff --git a/MediaBrowser.Server.Implementations/FileOrganization/OrganizerScheduledTask.cs b/Emby.Server.Implementations/FileOrganization/OrganizerScheduledTask.cs index ca41db80c..5be7ba7ad 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/OrganizerScheduledTask.cs +++ b/Emby.Server.Implementations/FileOrganization/OrganizerScheduledTask.cs @@ -13,7 +13,7 @@ using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.FileOrganization +namespace Emby.Server.Implementations.FileOrganization { public class OrganizerScheduledTask : IScheduledTask, IConfigurableScheduledTask { diff --git a/MediaBrowser.Server.Implementations/FileOrganization/TvFolderOrganizer.cs b/Emby.Server.Implementations/FileOrganization/TvFolderOrganizer.cs index d83aee25b..2850c3a61 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/TvFolderOrganizer.cs +++ b/Emby.Server.Implementations/FileOrganization/TvFolderOrganizer.cs @@ -14,7 +14,7 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.FileOrganization +namespace Emby.Server.Implementations.FileOrganization { public class TvFolderOrganizer { @@ -191,7 +191,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization _fileSystem.DeleteDirectory(path, false); } catch (UnauthorizedAccessException) { } - catch (DirectoryNotFoundException) { } + catch (IOException) { } } } catch (UnauthorizedAccessException) { } diff --git a/MediaBrowser.Server.Implementations/IO/ThrottledStream.cs b/Emby.Server.Implementations/IO/ThrottledStream.cs index 538812dc0..81760b639 100644 --- a/MediaBrowser.Server.Implementations/IO/ThrottledStream.cs +++ b/Emby.Server.Implementations/IO/ThrottledStream.cs @@ -3,7 +3,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.IO +namespace Emby.Server.Implementations.IO { /// <summary> /// Class for streaming data with throttling support. @@ -326,9 +326,10 @@ namespace MediaBrowser.Server.Implementations.IO try { // The time to sleep is more then a millisecond, so sleep. - Thread.Sleep(toSleep); + var task = Task.Delay(toSleep); + Task.WaitAll(task); } - catch (ThreadAbortException) + catch { // Eatup ThreadAbortException. } diff --git a/MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs b/Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs index 0dd7672bc..224cd056a 100644 --- a/MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs +++ b/Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs @@ -18,7 +18,7 @@ using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.IO; using MediaBrowser.Model.Configuration; -namespace MediaBrowser.Server.Implementations.Photos +namespace Emby.Server.Implementations.Images { public abstract class BaseDynamicImageProvider<T> : IHasItemChangeMonitor, IForcedProvider, ICustomMetadataProvider<T>, IHasOrder where T : IHasMetadata @@ -353,7 +353,7 @@ namespace MediaBrowser.Server.Implementations.Photos var ext = Path.GetExtension(image); var outputPath = Path.ChangeExtension(outputPathWithoutExtension, ext); - File.Copy(image, outputPath); + FileSystem.CopyFile(image, outputPath, true); return outputPath; } diff --git a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs b/Emby.Server.Implementations/Intros/DefaultIntroProvider.cs index 72a63c547..180f6aba7 100644 --- a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs +++ b/Emby.Server.Implementations/Intros/DefaultIntroProvider.cs @@ -11,13 +11,11 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Globalization; -namespace MediaBrowser.Server.Implementations.Intros +namespace Emby.Server.Implementations.Intros { public class DefaultIntroProvider : IIntroProvider { diff --git a/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs index f20d87c4b..2e69cd2ef 100644 --- a/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs +++ b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs @@ -10,7 +10,7 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { /// <summary> /// Provides the core resolver ignore rules diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 18feaa849..7ae00d94c 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -18,9 +18,6 @@ using MediaBrowser.Naming.Audio; using MediaBrowser.Naming.Common; using MediaBrowser.Naming.TV; using MediaBrowser.Naming.Video; -using MediaBrowser.Server.Implementations.Library.Validators; -using MediaBrowser.Server.Implementations.Logging; -using MediaBrowser.Server.Implementations.ScheduledTasks; using System; using System.Collections.Concurrent; using System.Collections.Generic; @@ -30,6 +27,10 @@ using System.Linq; using System.Net; using System.Threading; using System.Threading.Tasks; +using Emby.Server.Implementations.Library.Resolvers; +using Emby.Server.Implementations.Library.Validators; +using Emby.Server.Implementations.Logging; +using Emby.Server.Implementations.ScheduledTasks; using MediaBrowser.Model.IO; using MediaBrowser.Controller.Channels; using MediaBrowser.Model.Channels; @@ -37,14 +38,13 @@ using MediaBrowser.Model.Dto; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Library; using MediaBrowser.Model.Net; -using MediaBrowser.Server.Implementations.Library.Resolvers; using SortOrder = MediaBrowser.Model.Entities.SortOrder; using VideoResolver = MediaBrowser.Naming.Video.VideoResolver; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.IO; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { /// <summary> /// Class LibraryManager @@ -403,7 +403,7 @@ namespace MediaBrowser.Server.Implementations.Library { _fileSystem.DeleteDirectory(metadataPath, true); } - catch (DirectoryNotFoundException) + catch (IOException) { } @@ -1189,7 +1189,8 @@ namespace MediaBrowser.Server.Implementations.Library { Name = Path.GetFileName(dir), - Locations = Directory.EnumerateFiles(dir, "*.mblink", SearchOption.TopDirectoryOnly) + Locations = _fileSystem.GetFilePaths(dir, false) + .Where(i => string.Equals(ShortcutFileExtension, Path.GetExtension(i), StringComparison.OrdinalIgnoreCase)) .Select(_fileSystem.ResolveShortcut) .OrderBy(i => i) .ToList(), @@ -2302,11 +2303,11 @@ namespace MediaBrowser.Server.Implementations.Library var episodeInfo = locationType == LocationType.FileSystem || locationType == LocationType.Offline ? resolver.Resolve(episode.Path, isFolder) : - new Naming.TV.EpisodeInfo(); + new MediaBrowser.Naming.TV.EpisodeInfo(); if (episodeInfo == null) { - episodeInfo = new Naming.TV.EpisodeInfo(); + episodeInfo = new MediaBrowser.Naming.TV.EpisodeInfo(); } var changed = false; @@ -2787,10 +2788,7 @@ namespace MediaBrowser.Server.Implementations.Library { var path = Path.Combine(virtualFolderPath, collectionType + ".collection"); - using (File.Create(path)) - { - - } + _fileSystem.WriteAllBytes(path, new byte[] {}); } CollectionFolder.SaveLibraryOptions(virtualFolderPath, options); @@ -2827,21 +2825,20 @@ namespace MediaBrowser.Server.Implementations.Library private bool ValidateNetworkPath(string path) { - if (Environment.OSVersion.Platform == PlatformID.Win32NT) - { - // We can't validate protocol-based paths, so just allow them - if (path.IndexOf("://", StringComparison.OrdinalIgnoreCase) == -1) - { - return Directory.Exists(path); - } - } + //if (Environment.OSVersion.Platform == PlatformID.Win32NT) + //{ + // // We can't validate protocol-based paths, so just allow them + // if (path.IndexOf("://", StringComparison.OrdinalIgnoreCase) == -1) + // { + // return _fileSystem.DirectoryExists(path); + // } + //} // Without native support for unc, we cannot validate this when running under mono return true; } private const string ShortcutFileExtension = ".mblink"; - private const string ShortcutFileSearch = "*" + ShortcutFileExtension; public void AddMediaPath(string virtualFolderName, MediaPathInfo pathInfo) { AddMediaPathInternal(virtualFolderName, pathInfo, true); @@ -2863,12 +2860,12 @@ namespace MediaBrowser.Server.Implementations.Library if (!_fileSystem.DirectoryExists(path)) { - throw new DirectoryNotFoundException("The path does not exist."); + throw new FileNotFoundException("The path does not exist."); } if (!string.IsNullOrWhiteSpace(pathInfo.NetworkPath) && !ValidateNetworkPath(pathInfo.NetworkPath)) { - throw new DirectoryNotFoundException("The network path does not exist."); + throw new FileNotFoundException("The network path does not exist."); } var rootFolderPath = ConfigurationManager.ApplicationPaths.DefaultUserViewsPath; @@ -2911,7 +2908,7 @@ namespace MediaBrowser.Server.Implementations.Library if (!string.IsNullOrWhiteSpace(pathInfo.NetworkPath) && !ValidateNetworkPath(pathInfo.NetworkPath)) { - throw new DirectoryNotFoundException("The network path does not exist."); + throw new FileNotFoundException("The network path does not exist."); } var rootFolderPath = ConfigurationManager.ApplicationPaths.DefaultUserViewsPath; @@ -2973,7 +2970,7 @@ namespace MediaBrowser.Server.Implementations.Library if (!_fileSystem.DirectoryExists(path)) { - throw new DirectoryNotFoundException("The media folder does not exist"); + throw new FileNotFoundException("The media folder does not exist"); } _libraryMonitorFactory().Stop(); @@ -3044,10 +3041,12 @@ namespace MediaBrowser.Server.Implementations.Library if (!_fileSystem.DirectoryExists(virtualFolderPath)) { - throw new DirectoryNotFoundException(string.Format("The media collection {0} does not exist", virtualFolderName)); + throw new FileNotFoundException(string.Format("The media collection {0} does not exist", virtualFolderName)); } - var shortcut = Directory.EnumerateFiles(virtualFolderPath, ShortcutFileSearch, SearchOption.AllDirectories).FirstOrDefault(f => _fileSystem.ResolveShortcut(f).Equals(mediaPath, StringComparison.OrdinalIgnoreCase)); + var shortcut = _fileSystem.GetFilePaths(virtualFolderPath, true) + .Where(i => string.Equals(ShortcutFileExtension, Path.GetExtension(i), StringComparison.OrdinalIgnoreCase)) + .FirstOrDefault(f => _fileSystem.ResolveShortcut(f).Equals(mediaPath, StringComparison.OrdinalIgnoreCase)); if (!string.IsNullOrEmpty(shortcut)) { diff --git a/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs b/Emby.Server.Implementations/Library/LocalTrailerPostScanTask.cs index 78107b82d..7424ed5e5 100644 --- a/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs +++ b/Emby.Server.Implementations/Library/LocalTrailerPostScanTask.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Entities.TV; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { public class LocalTrailerPostScanTask : ILibraryPostScanTask { diff --git a/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs b/Emby.Server.Implementations/Library/MediaSourceManager.cs index 0f1931dda..93c406ebc 100644 --- a/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs +++ b/Emby.Server.Implementations/Library/MediaSourceManager.cs @@ -18,8 +18,9 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; using MediaBrowser.Model.Configuration; +using MediaBrowser.Model.Threading; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { public class MediaSourceManager : IMediaSourceManager, IDisposable { @@ -32,8 +33,9 @@ namespace MediaBrowser.Server.Implementations.Library private IMediaSourceProvider[] _providers; private readonly ILogger _logger; private readonly IUserDataManager _userDataManager; + private readonly ITimerFactory _timerFactory; - public MediaSourceManager(IItemRepository itemRepo, IUserManager userManager, ILibraryManager libraryManager, ILogger logger, IJsonSerializer jsonSerializer, IFileSystem fileSystem, IUserDataManager userDataManager) + public MediaSourceManager(IItemRepository itemRepo, IUserManager userManager, ILibraryManager libraryManager, ILogger logger, IJsonSerializer jsonSerializer, IFileSystem fileSystem, IUserDataManager userDataManager, ITimerFactory timerFactory) { _itemRepo = itemRepo; _userManager = userManager; @@ -42,6 +44,7 @@ namespace MediaBrowser.Server.Implementations.Library _jsonSerializer = jsonSerializer; _fileSystem = fileSystem; _userDataManager = userDataManager; + _timerFactory = timerFactory; } public void AddParts(IEnumerable<IMediaSourceProvider> providers) @@ -551,14 +554,14 @@ namespace MediaBrowser.Server.Implementations.Library return new Tuple<IMediaSourceProvider, string>(provider, keyId); } - private Timer _closeTimer; + private ITimer _closeTimer; private readonly TimeSpan _openStreamMaxAge = TimeSpan.FromSeconds(180); private void StartCloseTimer() { StopCloseTimer(); - _closeTimer = new Timer(CloseTimerCallback, null, _openStreamMaxAge, _openStreamMaxAge); + _closeTimer = _timerFactory.Create(CloseTimerCallback, null, _openStreamMaxAge, _openStreamMaxAge); } private void StopCloseTimer() diff --git a/MediaBrowser.Server.Implementations/Library/MusicManager.cs b/Emby.Server.Implementations/Library/MusicManager.cs index 3ff434898..7669dd0bf 100644 --- a/MediaBrowser.Server.Implementations/Library/MusicManager.cs +++ b/Emby.Server.Implementations/Library/MusicManager.cs @@ -6,7 +6,7 @@ using System; using System.Collections.Generic; using System.Linq; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { public class MusicManager : IMusicManager { diff --git a/MediaBrowser.Server.Implementations/Library/PathExtensions.cs b/Emby.Server.Implementations/Library/PathExtensions.cs index 6c0e3237e..28ed2f53c 100644 --- a/MediaBrowser.Server.Implementations/Library/PathExtensions.cs +++ b/Emby.Server.Implementations/Library/PathExtensions.cs @@ -1,7 +1,7 @@ using System; using System.Text.RegularExpressions; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { public static class PathExtensions { diff --git a/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs b/Emby.Server.Implementations/Library/ResolverHelper.cs index c7d9d39b8..1d3cacc1d 100644 --- a/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs +++ b/Emby.Server.Implementations/Library/ResolverHelper.cs @@ -9,7 +9,7 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { /// <summary> /// Class ResolverHelper @@ -112,7 +112,7 @@ namespace MediaBrowser.Server.Implementations.Library /// <summary> /// The MB name regex /// </summary> - private static readonly Regex MbNameRegex = new Regex(@"(\[.*?\])", RegexOptions.Compiled); + private static readonly Regex MbNameRegex = new Regex(@"(\[.*?\])"); internal static string StripBrackets(string inputString) { diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs index 039a17100..d8805355a 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs @@ -3,12 +3,12 @@ using MediaBrowser.Controller.Resolvers; using MediaBrowser.Model.Entities; using System; -namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio +namespace Emby.Server.Implementations.Library.Resolvers.Audio { /// <summary> /// Class AudioResolver /// </summary> - public class AudioResolver : ItemResolver<Controller.Entities.Audio.Audio> + public class AudioResolver : ItemResolver<MediaBrowser.Controller.Entities.Audio.Audio> { private readonly ILibraryManager _libraryManager; @@ -31,7 +31,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio /// </summary> /// <param name="args">The args.</param> /// <returns>Entities.Audio.Audio.</returns> - protected override Controller.Entities.Audio.Audio Resolve(ItemResolveArgs args) + protected override MediaBrowser.Controller.Entities.Audio.Audio Resolve(ItemResolveArgs args) { // Return audio if the path is a file and has a matching extension @@ -57,7 +57,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio string.Equals(collectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase) || isMixed) { - return new Controller.Entities.Audio.Audio(); + return new MediaBrowser.Controller.Entities.Audio.Audio(); } } } diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs index c1ac7d68c..f8e105195 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs @@ -5,17 +5,17 @@ using MediaBrowser.Controller.Resolvers; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Logging; using MediaBrowser.Naming.Audio; -using MediaBrowser.Server.Implementations.Logging; using System; using System.Collections.Generic; using System.IO; +using Emby.Server.Implementations.Logging; using MediaBrowser.Common.IO; using MediaBrowser.Model.IO; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.IO; using MediaBrowser.Model.Configuration; -namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio +namespace Emby.Server.Implementations.Library.Resolvers.Audio { /// <summary> /// Class MusicAlbumResolver diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs index be651b9c8..2971405b9 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs @@ -11,7 +11,7 @@ using MediaBrowser.Model.IO; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.IO; -namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio +namespace Emby.Server.Implementations.Library.Resolvers.Audio { /// <summary> /// Class MusicArtistResolver diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs index 4dce16139..b7819eb68 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs @@ -2,17 +2,17 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Model.Entities; using MediaBrowser.Naming.Video; -using MediaBrowser.Server.Implementations.Logging; using System; using System.IO; +using Emby.Server.Implementations.Logging; -namespace MediaBrowser.Server.Implementations.Library.Resolvers +namespace Emby.Server.Implementations.Library.Resolvers { /// <summary> /// Resolves a Path into a Video or Video subclass /// </summary> /// <typeparam name="T"></typeparam> - public abstract class BaseVideoResolver<T> : Controller.Resolvers.ItemResolver<T> + public abstract class BaseVideoResolver<T> : MediaBrowser.Controller.Resolvers.ItemResolver<T> where T : Video, new() { protected readonly ILibraryManager LibraryManager; @@ -45,7 +45,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions(); // If the path is a file check for a matching extensions - var parser = new Naming.Video.VideoResolver(namingOptions, new PatternsLogger()); + var parser = new MediaBrowser.Naming.Video.VideoResolver(namingOptions, new PatternsLogger()); if (args.IsDirectory) { diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/FolderResolver.cs b/Emby.Server.Implementations/Library/Resolvers/FolderResolver.cs index ff07c5282..5e73baa5c 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/FolderResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/FolderResolver.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Resolvers; -namespace MediaBrowser.Server.Implementations.Library.Resolvers +namespace Emby.Server.Implementations.Library.Resolvers { /// <summary> /// Class FolderResolver diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/ItemResolver.cs b/Emby.Server.Implementations/Library/Resolvers/ItemResolver.cs index a03eda263..b4a37be5f 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/ItemResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/ItemResolver.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Resolvers; -namespace MediaBrowser.Server.Implementations.Library.Resolvers +namespace Emby.Server.Implementations.Library.Resolvers { /// <summary> /// Class ItemResolver diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/BoxSetResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Movies/BoxSetResolver.cs index e3447afc9..df441c5ed 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/BoxSetResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Movies/BoxSetResolver.cs @@ -5,7 +5,7 @@ using MediaBrowser.Model.Entities; using System; using System.IO; -namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies +namespace Emby.Server.Implementations.Library.Resolvers.Movies { /// <summary> /// Class BoxSetResolver diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs index bb1d57688..d8c8b2024 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs @@ -7,16 +7,16 @@ using MediaBrowser.Controller.Resolvers; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Extensions; using MediaBrowser.Naming.Video; -using MediaBrowser.Server.Implementations.Logging; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using Emby.Server.Implementations.Logging; using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies +namespace Emby.Server.Implementations.Library.Resolvers.Movies { /// <summary> /// Class MovieResolver diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs b/Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs index 957fafb92..3d7ede879 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs @@ -7,7 +7,7 @@ using System; using System.IO; using System.Linq; -namespace MediaBrowser.Server.Implementations.Library.Resolvers +namespace Emby.Server.Implementations.Library.Resolvers { public class PhotoAlbumResolver : FolderResolver<PhotoAlbum> { diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs index 549ad522e..df39e57ad 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs @@ -11,7 +11,7 @@ using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.IO; using MediaBrowser.Model.Configuration; -namespace MediaBrowser.Server.Implementations.Library.Resolvers +namespace Emby.Server.Implementations.Library.Resolvers { public class PhotoResolver : ItemResolver<Photo> { diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/PlaylistResolver.cs b/Emby.Server.Implementations/Library/Resolvers/PlaylistResolver.cs index a95739f22..8c59cf20f 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/PlaylistResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/PlaylistResolver.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Playlists; using System; using System.IO; -namespace MediaBrowser.Server.Implementations.Library.Resolvers +namespace Emby.Server.Implementations.Library.Resolvers { public class PlaylistResolver : FolderResolver<Playlist> { diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/SpecialFolderResolver.cs b/Emby.Server.Implementations/Library/Resolvers/SpecialFolderResolver.cs index 7a6198a00..1bec1073d 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/SpecialFolderResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/SpecialFolderResolver.cs @@ -9,7 +9,7 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.Library.Resolvers +namespace Emby.Server.Implementations.Library.Resolvers { class SpecialFolderResolver : FolderResolver<Folder> { diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs index 6edc4a009..2a4cc49b7 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs @@ -4,7 +4,7 @@ using MediaBrowser.Controller.Library; using System.Linq; using MediaBrowser.Model.Entities; -namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV +namespace Emby.Server.Implementations.Library.Resolvers.TV { /// <summary> /// Class EpisodeResolver diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs index fc4929748..c065feda1 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs @@ -4,7 +4,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Naming.Common; using MediaBrowser.Naming.TV; -namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV +namespace Emby.Server.Implementations.Library.Resolvers.TV { /// <summary> /// Class SeasonResolver diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs index 83566e2c1..44eb0e3e2 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs @@ -6,18 +6,18 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.Logging; using MediaBrowser.Naming.Common; using MediaBrowser.Naming.TV; -using MediaBrowser.Server.Implementations.Logging; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using Emby.Server.Implementations.Logging; using MediaBrowser.Common.IO; using MediaBrowser.Model.IO; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.IO; using MediaBrowser.Model.Configuration; -namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV +namespace Emby.Server.Implementations.Library.Resolvers.TV { /// <summary> /// Class SeriesResolver @@ -171,7 +171,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV .ToList(); } - var episodeResolver = new Naming.TV.EpisodeResolver(namingOptions, new PatternsLogger()); + var episodeResolver = new MediaBrowser.Naming.TV.EpisodeResolver(namingOptions, new PatternsLogger()); var episodeInfo = episodeResolver.Resolve(fullName, false, false); if (episodeInfo != null && episodeInfo.EpisodeNumber.HasValue) { diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/VideoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/VideoResolver.cs index c7f21cef1..b5e1bf5f7 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/VideoResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/VideoResolver.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Resolvers; -namespace MediaBrowser.Server.Implementations.Library.Resolvers +namespace Emby.Server.Implementations.Library.Resolvers { /// <summary> /// Resolves a Path into a Video diff --git a/MediaBrowser.Server.Implementations/Library/SearchEngine.cs b/Emby.Server.Implementations/Library/SearchEngine.cs index c266fb191..afdf65c06 100644 --- a/MediaBrowser.Server.Implementations/Library/SearchEngine.cs +++ b/Emby.Server.Implementations/Library/SearchEngine.cs @@ -1,7 +1,5 @@ -using MediaBrowser.Common.Extensions; -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; -using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Querying; @@ -11,13 +9,10 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using MediaBrowser.Controller.Extensions; -using MediaBrowser.Model.Extensions; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { /// <summary> - /// Class LuceneSearchEngine - /// http://www.codeproject.com/Articles/320219/Lucene-Net-ultra-fast-search-for-MVC-or-WebForms /// </summary> public class SearchEngine : ISearchEngine { diff --git a/MediaBrowser.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs index 9ee65a57c..c8dde1287 100644 --- a/MediaBrowser.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -13,7 +13,7 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { /// <summary> /// Class UserDataManager diff --git a/MediaBrowser.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index 794c924eb..9c1d7fdf1 100644 --- a/MediaBrowser.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -23,15 +23,13 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; -using System.Security.Cryptography; using System.Text; using System.Threading; using System.Threading.Tasks; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; +using MediaBrowser.Model.Cryptography; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { /// <summary> /// Class UserManager @@ -72,8 +70,10 @@ namespace MediaBrowser.Server.Implementations.Library private readonly Func<IConnectManager> _connectFactory; private readonly IServerApplicationHost _appHost; private readonly IFileSystem _fileSystem; + private readonly ICryptographyProvider _cryptographyProvider; + private readonly string _defaultUserName; - public UserManager(ILogger logger, IServerConfigurationManager configurationManager, IUserRepository userRepository, IXmlSerializer xmlSerializer, INetworkManager networkManager, Func<IImageProcessor> imageProcessorFactory, Func<IDtoService> dtoServiceFactory, Func<IConnectManager> connectFactory, IServerApplicationHost appHost, IJsonSerializer jsonSerializer, IFileSystem fileSystem) + public UserManager(ILogger logger, IServerConfigurationManager configurationManager, IUserRepository userRepository, IXmlSerializer xmlSerializer, INetworkManager networkManager, Func<IImageProcessor> imageProcessorFactory, Func<IDtoService> dtoServiceFactory, Func<IConnectManager> connectFactory, IServerApplicationHost appHost, IJsonSerializer jsonSerializer, IFileSystem fileSystem, ICryptographyProvider cryptographyProvider, string defaultUserName) { _logger = logger; UserRepository = userRepository; @@ -85,6 +85,8 @@ namespace MediaBrowser.Server.Implementations.Library _appHost = appHost; _jsonSerializer = jsonSerializer; _fileSystem = fileSystem; + _cryptographyProvider = cryptographyProvider; + _defaultUserName = defaultUserName; ConfigurationManager = configurationManager; Users = new List<User>(); @@ -188,7 +190,14 @@ namespace MediaBrowser.Server.Implementations.Library public bool IsValidUsername(string username) { // Usernames can contain letters (a-z), numbers (0-9), dashes (-), underscores (_), apostrophes ('), and periods (.) - return username.All(IsValidUsernameCharacter); + foreach (var currentChar in username) + { + if (!IsValidUsernameCharacter(currentChar)) + { + return false; + } + } + return true; } private bool IsValidUsernameCharacter(char i) @@ -273,8 +282,8 @@ namespace MediaBrowser.Server.Implementations.Library { user.Policy.InvalidLoginAttemptCount = newValue; - var maxCount = user.Policy.IsAdministrator ? - 3 : + var maxCount = user.Policy.IsAdministrator ? + 3 : 5; var fireLockout = false; @@ -323,13 +332,9 @@ namespace MediaBrowser.Server.Implementations.Library /// </summary> /// <param name="str">The STR.</param> /// <returns>System.String.</returns> - private static string GetSha1String(string str) + private string GetSha1String(string str) { - using (var provider = SHA1.Create()) - { - var hash = provider.ComputeHash(Encoding.UTF8.GetBytes(str)); - return BitConverter.ToString(hash).Replace("-", string.Empty); - } + return BitConverter.ToString(_cryptographyProvider.GetSHA1Bytes(Encoding.UTF8.GetBytes(str))).Replace("-", string.Empty); } /// <summary> @@ -343,7 +348,7 @@ namespace MediaBrowser.Server.Implementations.Library // There always has to be at least one user. if (users.Count == 0) { - var name = MakeValidUsername(Environment.UserName); + var name = MakeValidUsername(_defaultUserName); var user = InstantiateNewUser(name); @@ -741,9 +746,12 @@ namespace MediaBrowser.Server.Implementations.Library text.AppendLine(string.Empty); text.AppendLine(pin); text.AppendLine(string.Empty); - text.AppendLine("The pin code will expire at " + expiration.ToLocalTime().ToShortDateString() + " " + expiration.ToLocalTime().ToShortTimeString()); - _fileSystem.WriteAllText(path, text.ToString(), Encoding.UTF8); + var localExpirationTime = expiration.ToLocalTime(); + // Tuesday, 22 August 2006 06:30 AM + text.AppendLine("The pin code will expire at " + localExpirationTime.ToString("f1", CultureInfo.CurrentCulture)); + + _fileSystem.WriteAllText(path, text.ToString(), Encoding.UTF8); var result = new PasswordPinCreationResult { @@ -875,11 +883,11 @@ namespace MediaBrowser.Server.Implementations.Library return (UserPolicy)_xmlSerializer.DeserializeFromFile(typeof(UserPolicy), path); } } - catch (DirectoryNotFoundException) + catch (FileNotFoundException) { return GetDefaultPolicy(user); } - catch (FileNotFoundException) + catch (IOException) { return GetDefaultPolicy(user); } @@ -917,7 +925,7 @@ namespace MediaBrowser.Server.Implementations.Library var path = GetPolifyFilePath(user); - _fileSystem.CreateDirectory(Path.GetDirectoryName(path)); + _fileSystem.CreateDirectory(Path.GetDirectoryName(path)); lock (_policySyncLock) { @@ -970,11 +978,11 @@ namespace MediaBrowser.Server.Implementations.Library return (UserConfiguration)_xmlSerializer.DeserializeFromFile(typeof(UserConfiguration), path); } } - catch (DirectoryNotFoundException) + catch (FileNotFoundException) { return new UserConfiguration(); } - catch (FileNotFoundException) + catch (IOException) { return new UserConfiguration(); } @@ -1004,7 +1012,7 @@ namespace MediaBrowser.Server.Implementations.Library config = _jsonSerializer.DeserializeFromString<UserConfiguration>(json); } - _fileSystem.CreateDirectory(Path.GetDirectoryName(path)); + _fileSystem.CreateDirectory(Path.GetDirectoryName(path)); lock (_configSyncLock) { diff --git a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index 6a4e26ff9..b93f565a3 100644 --- a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -15,7 +15,7 @@ using System.Threading.Tasks; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Model.Globalization; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { public class UserViewManager : IUserViewManager { diff --git a/MediaBrowser.Server.Implementations/Library/Validators/ArtistsPostScanTask.cs b/Emby.Server.Implementations/Library/Validators/ArtistsPostScanTask.cs index 91b035a35..4d718dbee 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/ArtistsPostScanTask.cs +++ b/Emby.Server.Implementations/Library/Validators/ArtistsPostScanTask.cs @@ -5,7 +5,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Persistence; -namespace MediaBrowser.Server.Implementations.Library.Validators +namespace Emby.Server.Implementations.Library.Validators { /// <summary> /// Class ArtistsPostScanTask diff --git a/MediaBrowser.Server.Implementations/Library/Validators/ArtistsValidator.cs b/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs index 3dcdbeae9..643c5970e 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/ArtistsValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Persistence; -namespace MediaBrowser.Server.Implementations.Library.Validators +namespace Emby.Server.Implementations.Library.Validators { /// <summary> /// Class ArtistsValidator diff --git a/MediaBrowser.Server.Implementations/Library/Validators/GameGenresPostScanTask.cs b/Emby.Server.Implementations/Library/Validators/GameGenresPostScanTask.cs index f3891180e..ee6c4461c 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/GameGenresPostScanTask.cs +++ b/Emby.Server.Implementations/Library/Validators/GameGenresPostScanTask.cs @@ -5,7 +5,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Persistence; -namespace MediaBrowser.Server.Implementations.Library.Validators +namespace Emby.Server.Implementations.Library.Validators { /// <summary> /// Class GameGenresPostScanTask diff --git a/MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs b/Emby.Server.Implementations/Library/Validators/GameGenresValidator.cs index b06c0b3b9..b1820bb91 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/GameGenresValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/GameGenresValidator.cs @@ -7,7 +7,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Persistence; -namespace MediaBrowser.Server.Implementations.Library.Validators +namespace Emby.Server.Implementations.Library.Validators { class GameGenresValidator { diff --git a/MediaBrowser.Server.Implementations/Library/Validators/GenresPostScanTask.cs b/Emby.Server.Implementations/Library/Validators/GenresPostScanTask.cs index ed2429769..be46decfb 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/GenresPostScanTask.cs +++ b/Emby.Server.Implementations/Library/Validators/GenresPostScanTask.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using MediaBrowser.Controller.Persistence; using MediaBrowser.Model.Logging; -namespace MediaBrowser.Server.Implementations.Library.Validators +namespace Emby.Server.Implementations.Library.Validators { public class GenresPostScanTask : ILibraryPostScanTask { diff --git a/MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs b/Emby.Server.Implementations/Library/Validators/GenresValidator.cs index f35bb5136..d8956f78a 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/GenresValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/GenresValidator.cs @@ -8,7 +8,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Persistence; -namespace MediaBrowser.Server.Implementations.Library.Validators +namespace Emby.Server.Implementations.Library.Validators { class GenresValidator { diff --git a/MediaBrowser.Server.Implementations/Library/Validators/MusicGenresPostScanTask.cs b/Emby.Server.Implementations/Library/Validators/MusicGenresPostScanTask.cs index 777532ff8..cd4021548 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/MusicGenresPostScanTask.cs +++ b/Emby.Server.Implementations/Library/Validators/MusicGenresPostScanTask.cs @@ -5,7 +5,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Persistence; -namespace MediaBrowser.Server.Implementations.Library.Validators +namespace Emby.Server.Implementations.Library.Validators { /// <summary> /// Class MusicGenresPostScanTask diff --git a/MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs b/Emby.Server.Implementations/Library/Validators/MusicGenresValidator.cs index 2be99f106..983c881b7 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/MusicGenresValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/MusicGenresValidator.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Persistence; -namespace MediaBrowser.Server.Implementations.Library.Validators +namespace Emby.Server.Implementations.Library.Validators { class MusicGenresValidator { diff --git a/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs b/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs index d9a7199be..813f07fff 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs @@ -15,7 +15,7 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.Library.Validators +namespace Emby.Server.Implementations.Library.Validators { /// <summary> /// Class PeopleValidator diff --git a/MediaBrowser.Server.Implementations/Library/Validators/StudiosPostScanTask.cs b/Emby.Server.Implementations/Library/Validators/StudiosPostScanTask.cs index 77c6d5146..d23efb6d3 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/StudiosPostScanTask.cs +++ b/Emby.Server.Implementations/Library/Validators/StudiosPostScanTask.cs @@ -5,7 +5,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Persistence; -namespace MediaBrowser.Server.Implementations.Library.Validators +namespace Emby.Server.Implementations.Library.Validators { /// <summary> /// Class MusicGenresPostScanTask diff --git a/MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs b/Emby.Server.Implementations/Library/Validators/StudiosValidator.cs index a19b8158a..6faab7bb9 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/StudiosValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/StudiosValidator.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Persistence; -namespace MediaBrowser.Server.Implementations.Library.Validators +namespace Emby.Server.Implementations.Library.Validators { class StudiosValidator { diff --git a/MediaBrowser.Server.Implementations/Library/Validators/YearsPostScanTask.cs b/Emby.Server.Implementations/Library/Validators/YearsPostScanTask.cs index 164b14223..ae43c77f0 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/YearsPostScanTask.cs +++ b/Emby.Server.Implementations/Library/Validators/YearsPostScanTask.cs @@ -4,7 +4,7 @@ using System; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.Library.Validators +namespace Emby.Server.Implementations.Library.Validators { public class YearsPostScanTask : ILibraryPostScanTask { diff --git a/MediaBrowser.Server.Implementations/LiveTv/ChannelImageProvider.cs b/Emby.Server.Implementations/LiveTv/ChannelImageProvider.cs index 23560b1aa..95cefd999 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/ChannelImageProvider.cs +++ b/Emby.Server.Implementations/LiveTv/ChannelImageProvider.cs @@ -11,7 +11,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.LiveTv +namespace Emby.Server.Implementations.LiveTv { public class ChannelImageProvider : IDynamicImageProvider, IHasItemChangeMonitor { diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs index 4137ab2cf..6bb06843a 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs @@ -9,7 +9,7 @@ using MediaBrowser.Controller.IO; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Logging; -namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV +namespace Emby.Server.Implementations.LiveTv.EmbyTV { public class DirectRecorder : IRecorder { diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 397e5fc9f..b8b0cb73c 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -15,7 +15,6 @@ using MediaBrowser.Model.Events; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Serialization; -using MediaBrowser.Server.Implementations.FileOrganization; using System; using System.Collections.Concurrent; using System.Collections.Generic; @@ -35,10 +34,12 @@ using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.IO; using MediaBrowser.Model.Configuration; +using MediaBrowser.Model.Diagnostics; using MediaBrowser.Model.FileOrganization; -using Microsoft.Win32; +using MediaBrowser.Model.System; +using MediaBrowser.Model.Threading; -namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV +namespace Emby.Server.Implementations.LiveTv.EmbyTV { public class EmbyTV : ILiveTvService, ISupportsDirectStreamProvider, ISupportsNewTimerIds, IDisposable { @@ -59,6 +60,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV private readonly IProviderManager _providerManager; private readonly IFileOrganizationService _organizationService; private readonly IMediaEncoder _mediaEncoder; + private readonly IProcessFactory _processFactory; + private readonly ISystemEvents _systemEvents; public static EmbyTV Current; @@ -68,7 +71,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV private readonly ConcurrentDictionary<string, ActiveRecordingInfo> _activeRecordings = new ConcurrentDictionary<string, ActiveRecordingInfo>(StringComparer.OrdinalIgnoreCase); - public EmbyTV(IServerApplicationHost appHost, ILogger logger, IJsonSerializer jsonSerializer, IHttpClient httpClient, IServerConfigurationManager config, ILiveTvManager liveTvManager, IFileSystem fileSystem, ILibraryManager libraryManager, ILibraryMonitor libraryMonitor, IProviderManager providerManager, IFileOrganizationService organizationService, IMediaEncoder mediaEncoder) + public EmbyTV(IServerApplicationHost appHost, ILogger logger, IJsonSerializer jsonSerializer, IHttpClient httpClient, IServerConfigurationManager config, ILiveTvManager liveTvManager, IFileSystem fileSystem, ILibraryManager libraryManager, ILibraryMonitor libraryMonitor, IProviderManager providerManager, IFileOrganizationService organizationService, IMediaEncoder mediaEncoder, ITimerFactory timerFactory, IProcessFactory processFactory, ISystemEvents systemEvents) { Current = this; @@ -82,11 +85,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV _providerManager = providerManager; _organizationService = organizationService; _mediaEncoder = mediaEncoder; + _processFactory = processFactory; + _systemEvents = systemEvents; _liveTvManager = (LiveTvManager)liveTvManager; _jsonSerializer = jsonSerializer; _seriesTimerProvider = new SeriesTimerManager(fileSystem, jsonSerializer, _logger, Path.Combine(DataPath, "seriestimers")); - _timerProvider = new TimerManager(fileSystem, jsonSerializer, _logger, Path.Combine(DataPath, "timers"), _logger); + _timerProvider = new TimerManager(fileSystem, jsonSerializer, _logger, Path.Combine(DataPath, "timers"), _logger, timerFactory); _timerProvider.TimerFired += _timerProvider_TimerFired; _config.NamedConfigurationUpdated += _config_NamedConfigurationUpdated; @@ -104,10 +109,15 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV { _timerProvider.RestartTimers(); - SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged; + _systemEvents.Resume += _systemEvents_Resume; CreateRecordingFolders(); } + private void _systemEvents_Resume(object sender, EventArgs e) + { + _timerProvider.RestartTimers(); + } + private void OnRecordingFoldersChanged() { CreateRecordingFolders(); @@ -231,16 +241,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV } } - void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e) - { - _logger.Info("Power mode changed to {0}", e.Mode); - - if (e.Mode == PowerModes.Resume) - { - _timerProvider.RestartTimers(); - } - } - public string Name { get { return "Emby"; } @@ -988,7 +988,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV _liveStreamsSemaphore.Release(); } - throw new ApplicationException("Tuner not found."); + throw new Exception("Tuner not found."); } public async Task<List<MediaSourceInfo>> GetChannelStreamMediaSources(string channelId, CancellationToken cancellationToken) @@ -1031,7 +1031,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV IsInfiniteStream = true, RequiresOpening = false, RequiresClosing = false, - Protocol = Model.MediaInfo.MediaProtocol.Http, + Protocol = MediaBrowser.Model.MediaInfo.MediaProtocol.Http, BufferMs = 0 }; @@ -1353,7 +1353,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV timer.StartDate = DateTime.UtcNow.AddSeconds(retryIntervalSeconds); _timerProvider.AddOrUpdate(timer); } - else if (File.Exists(recordPath)) + else if (_fileSystem.FileExists(recordPath)) { timer.RecordingPath = recordPath; timer.Status = RecordingStatus.Completed; @@ -1409,7 +1409,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV .Where(i => i.Status == RecordingStatus.Completed && !string.IsNullOrWhiteSpace(i.RecordingPath)) .Where(i => string.Equals(i.SeriesTimerId, seriesTimerId, StringComparison.OrdinalIgnoreCase)) .OrderByDescending(i => i.EndDate) - .Where(i => File.Exists(i.RecordingPath)) + .Where(i => _fileSystem.FileExists(i.RecordingPath)) .Skip(seriesTimer.KeepUpTo - 1) .ToList(); @@ -1457,13 +1457,9 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV { try { - File.Delete(timer.RecordingPath); + _fileSystem.DeleteFile(timer.RecordingPath); } - catch (DirectoryNotFoundException) - { - - } - catch (FileNotFoundException) + catch (IOException) { } @@ -1519,7 +1515,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV if (regInfo.IsValid) { - return new EncodedRecorder(_logger, _fileSystem, _mediaEncoder, _config.ApplicationPaths, _jsonSerializer, config, _httpClient); + return new EncodedRecorder(_logger, _fileSystem, _mediaEncoder, _config.ApplicationPaths, _jsonSerializer, config, _httpClient, _processFactory); } } @@ -1528,28 +1524,28 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV private async void OnSuccessfulRecording(TimerInfo timer, string path) { - if (timer.IsProgramSeries && GetConfiguration().EnableAutoOrganize) - { - try - { - // this is to account for the library monitor holding a lock for additional time after the change is complete. - // ideally this shouldn't be hard-coded - await Task.Delay(30000).ConfigureAwait(false); - - var organize = new EpisodeFileOrganizer(_organizationService, _config, _fileSystem, _logger, _libraryManager, _libraryMonitor, _providerManager); - - var result = await organize.OrganizeEpisodeFile(path, _config.GetAutoOrganizeOptions(), false, CancellationToken.None).ConfigureAwait(false); - - if (result.Status == FileSortingStatus.Success) - { - return; - } - } - catch (Exception ex) - { - _logger.ErrorException("Error processing new recording", ex); - } - } + //if (timer.IsProgramSeries && GetConfiguration().EnableAutoOrganize) + //{ + // try + // { + // // this is to account for the library monitor holding a lock for additional time after the change is complete. + // // ideally this shouldn't be hard-coded + // await Task.Delay(30000).ConfigureAwait(false); + + // var organize = new EpisodeFileOrganizer(_organizationService, _config, _fileSystem, _logger, _libraryManager, _libraryMonitor, _providerManager); + + // var result = await organize.OrganizeEpisodeFile(path, _config.GetAutoOrganizeOptions(), false, CancellationToken.None).ConfigureAwait(false); + + // if (result.Status == FileSortingStatus.Success) + // { + // return; + // } + // } + // catch (Exception ex) + // { + // _logger.ErrorException("Error processing new recording", ex); + // } + //} } private void SaveNfo(TimerInfo timer, string recordingPath, string seriesPath) @@ -1575,7 +1571,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV { var nfoPath = Path.Combine(seriesPath, "tvshow.nfo"); - if (File.Exists(nfoPath)) + if (_fileSystem.FileExists(nfoPath)) { return; } @@ -1610,7 +1606,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV { var nfoPath = Path.ChangeExtension(recordingPath, ".nfo"); - if (File.Exists(nfoPath)) + if (_fileSystem.FileExists(nfoPath)) { return; } @@ -1931,7 +1927,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV var defaultFolder = RecordingPath; var defaultName = "Recordings"; - if (Directory.Exists(defaultFolder)) + if (_fileSystem.DirectoryExists(defaultFolder)) { list.Add(new VirtualFolderInfo { @@ -1941,7 +1937,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV } var customPath = GetConfiguration().MovieRecordingPath; - if ((!string.IsNullOrWhiteSpace(customPath) && !string.Equals(customPath, defaultFolder, StringComparison.OrdinalIgnoreCase)) && Directory.Exists(customPath)) + if ((!string.IsNullOrWhiteSpace(customPath) && !string.Equals(customPath, defaultFolder, StringComparison.OrdinalIgnoreCase)) && _fileSystem.DirectoryExists(customPath)) { list.Add(new VirtualFolderInfo { @@ -1952,7 +1948,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV } customPath = GetConfiguration().SeriesRecordingPath; - if ((!string.IsNullOrWhiteSpace(customPath) && !string.Equals(customPath, defaultFolder, StringComparison.OrdinalIgnoreCase)) && Directory.Exists(customPath)) + if ((!string.IsNullOrWhiteSpace(customPath) && !string.Equals(customPath, defaultFolder, StringComparison.OrdinalIgnoreCase)) && _fileSystem.DirectoryExists(customPath)) { list.Add(new VirtualFolderInfo { diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTVRegistration.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTVRegistration.cs index 675fca325..b339537ae 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTVRegistration.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTVRegistration.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; using MediaBrowser.Common.Security; -namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV +namespace Emby.Server.Implementations.LiveTv.EmbyTV { public class EmbyTVRegistration : IRequiresRegistration { diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs index 95c2b5ebb..93ba9c420 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs @@ -13,13 +13,14 @@ using MediaBrowser.Common.Net; using MediaBrowser.Controller; using MediaBrowser.Controller.IO; using MediaBrowser.Controller.MediaEncoding; +using MediaBrowser.Model.Diagnostics; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Serialization; -namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV +namespace Emby.Server.Implementations.LiveTv.EmbyTV { public class EncodedRecorder : IRecorder { @@ -32,11 +33,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV private bool _hasExited; private Stream _logFileStream; private string _targetPath; - private Process _process; + private IProcess _process; + private readonly IProcessFactory _processFactory; private readonly IJsonSerializer _json; private readonly TaskCompletionSource<bool> _taskCompletionSource = new TaskCompletionSource<bool>(); - public EncodedRecorder(ILogger logger, IFileSystem fileSystem, IMediaEncoder mediaEncoder, IServerApplicationPaths appPaths, IJsonSerializer json, LiveTvOptions liveTvOptions, IHttpClient httpClient) + public EncodedRecorder(ILogger logger, IFileSystem fileSystem, IMediaEncoder mediaEncoder, IServerApplicationPaths appPaths, IJsonSerializer json, LiveTvOptions liveTvOptions, IHttpClient httpClient, IProcessFactory processFactory) { _logger = logger; _fileSystem = fileSystem; @@ -45,6 +47,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV _json = json; _liveTvOptions = liveTvOptions; _httpClient = httpClient; + _processFactory = processFactory; } private string OutputFormat @@ -82,27 +85,23 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV _targetPath = targetFile; _fileSystem.CreateDirectory(Path.GetDirectoryName(targetFile)); - var process = new Process + var process = _processFactory.Create(new ProcessOptions { - StartInfo = new ProcessStartInfo - { - CreateNoWindow = true, - UseShellExecute = false, - - // Must consume both stdout and stderr or deadlocks may occur - //RedirectStandardOutput = true, - RedirectStandardError = true, - RedirectStandardInput = true, + CreateNoWindow = true, + UseShellExecute = false, - FileName = _mediaEncoder.EncoderPath, - Arguments = GetCommandLineArgs(mediaSource, inputFile, targetFile, duration), + // Must consume both stdout and stderr or deadlocks may occur + //RedirectStandardOutput = true, + RedirectStandardError = true, + RedirectStandardInput = true, - WindowStyle = ProcessWindowStyle.Hidden, - ErrorDialog = false - }, + FileName = _mediaEncoder.EncoderPath, + Arguments = GetCommandLineArgs(mediaSource, inputFile, targetFile, duration), + IsHidden = true, + ErrorDialog = false, EnableRaisingEvents = true - }; + }); _process = process; @@ -251,7 +250,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV /// <summary> /// Processes the exited. /// </summary> - private void OnFfMpegProcessExited(Process process, string inputFile) + private void OnFfMpegProcessExited(IProcess process, string inputFile) { _hasExited = true; diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs index 713cb9cd3..139cf570e 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs @@ -1,6 +1,6 @@ using MediaBrowser.Controller.Plugins; -namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV +namespace Emby.Server.Implementations.LiveTv.EmbyTV { public class EntryPoint : IServerEntryPoint { diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs index 5706b6ae9..3b5e60c4a 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs @@ -3,7 +3,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Dto; -namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV +namespace Emby.Server.Implementations.LiveTv.EmbyTV { public interface IRecorder { diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs index 9bda9c3f6..ded4f04c4 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs @@ -8,7 +8,7 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV +namespace Emby.Server.Implementations.LiveTv.EmbyTV { public class ItemDataProvider<T> where T : class @@ -54,9 +54,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV catch (FileNotFoundException) { } - catch (DirectoryNotFoundException) - { - } catch (IOException ex) { Logger.ErrorException("Error deserializing {0}", ex, jsonFile); diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs index f7b4b3fde..0ae5971bc 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs @@ -4,7 +4,7 @@ using System; using System.Globalization; using MediaBrowser.Model.LiveTv; -namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV +namespace Emby.Server.Implementations.LiveTv.EmbyTV { internal class RecordingHelper { diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs index b2a347b77..7bf6bf1ca 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs @@ -6,7 +6,7 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV +namespace Emby.Server.Implementations.LiveTv.EmbyTV { public class SeriesTimerManager : ItemDataProvider<SeriesTimerInfo> { diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs index 1e01df29d..35868d318 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs @@ -12,20 +12,23 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; using MediaBrowser.Model.LiveTv; +using MediaBrowser.Model.Threading; -namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV +namespace Emby.Server.Implementations.LiveTv.EmbyTV { public class TimerManager : ItemDataProvider<TimerInfo> { - private readonly ConcurrentDictionary<string, Timer> _timers = new ConcurrentDictionary<string, Timer>(StringComparer.OrdinalIgnoreCase); + private readonly ConcurrentDictionary<string, ITimer> _timers = new ConcurrentDictionary<string, ITimer>(StringComparer.OrdinalIgnoreCase); private readonly ILogger _logger; public event EventHandler<GenericEventArgs<TimerInfo>> TimerFired; + private readonly ITimerFactory _timerFactory; - public TimerManager(IFileSystem fileSystem, IJsonSerializer jsonSerializer, ILogger logger, string dataPath, ILogger logger1) + public TimerManager(IFileSystem fileSystem, IJsonSerializer jsonSerializer, ILogger logger, string dataPath, ILogger logger1, ITimerFactory timerFactory) : base(fileSystem, jsonSerializer, logger, dataPath, (r1, r2) => string.Equals(r1.Id, r2.Id, StringComparison.OrdinalIgnoreCase)) { _logger = logger1; + _timerFactory = timerFactory; } public void RestartTimers() @@ -126,7 +129,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV private void StartTimer(TimerInfo item, TimeSpan dueTime) { - var timer = new Timer(TimerCallback, item.Id, dueTime, TimeSpan.Zero); + var timer = _timerFactory.Create(TimerCallback, item.Id, dueTime, TimeSpan.Zero); if (_timers.TryAdd(item.Id, timer)) { @@ -141,7 +144,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV private void StopTimer(TimerInfo item) { - Timer timer; + ITimer timer; if (_timers.TryRemove(item.Id, out timer)) { timer.Dispose(); diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index d5abcf98e..7beaed338 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -16,7 +16,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.LiveTv.Listings +namespace Emby.Server.Implementations.LiveTv.Listings { public class SchedulesDirect : IListingsProvider { @@ -589,13 +589,14 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings { var imageIdString = "["; - programIds.ForEach(i => + foreach (var i in programIds) { if (!imageIdString.Contains(i.Substring(0, 10))) { imageIdString += "\"" + i.Substring(0, 10) + "\","; } - }); + } + imageIdString = imageIdString.TrimEnd(',') + "]"; var httpOptions = new HttpRequestOptions() @@ -822,7 +823,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings return root.token; } - throw new ApplicationException("Could not authenticate with Schedules Direct Error: " + root.message); + throw new Exception("Could not authenticate with Schedules Direct Error: " + root.message); } } diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs index d3549aef5..57723e3c5 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs @@ -15,21 +15,24 @@ using Emby.XmlTv.Entities; using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Configuration; +using MediaBrowser.Model.IO; using MediaBrowser.Model.Logging; -namespace MediaBrowser.Server.Implementations.LiveTv.Listings +namespace Emby.Server.Implementations.LiveTv.Listings { public class XmlTvListingsProvider : IListingsProvider { private readonly IServerConfigurationManager _config; private readonly IHttpClient _httpClient; private readonly ILogger _logger; + private readonly IFileSystem _fileSystem; - public XmlTvListingsProvider(IServerConfigurationManager config, IHttpClient httpClient, ILogger logger) + public XmlTvListingsProvider(IServerConfigurationManager config, IHttpClient httpClient, ILogger logger, IFileSystem fileSystem) { _config = config; _httpClient = httpClient; _logger = logger; + _fileSystem = fileSystem; } public string Name @@ -58,7 +61,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings var cacheFilename = DateTime.UtcNow.DayOfYear.ToString(CultureInfo.InvariantCulture) + "-" + DateTime.UtcNow.Hour.ToString(CultureInfo.InvariantCulture) + ".xml"; var cacheFile = Path.Combine(_config.ApplicationPaths.CachePath, "xmltv", cacheFilename); - if (File.Exists(cacheFile)) + if (_fileSystem.FileExists(cacheFile)) { return cacheFile; } @@ -70,7 +73,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings CancellationToken = cancellationToken, Url = path, Progress = new Progress<Double>(), - DecompressionMethod = DecompressionMethods.GZip, + DecompressionMethod = CompressionMethod.Gzip, // It's going to come back gzipped regardless of this value // So we need to make sure the decompression method is set to gzip @@ -78,13 +81,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings }).ConfigureAwait(false); - Directory.CreateDirectory(Path.GetDirectoryName(cacheFile)); + _fileSystem.CreateDirectory(Path.GetDirectoryName(cacheFile)); - using (var stream = File.OpenRead(tempFile)) + using (var stream = _fileSystem.OpenRead(tempFile)) { using (var reader = new StreamReader(stream, Encoding.UTF8)) { - using (var fileStream = File.OpenWrite(cacheFile)) + using (var fileStream = _fileSystem.GetFileStream(cacheFile, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read)) { using (var writer = new StreamWriter(fileStream)) { @@ -138,10 +141,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings IsSeries = p.Episode != null, IsRepeat = p.IsRepeat, IsPremiere = p.Premiere != null, - IsKids = p.Categories.Any(c => info.KidsCategories.Contains(c, StringComparer.InvariantCultureIgnoreCase)), - IsMovie = p.Categories.Any(c => info.MovieCategories.Contains(c, StringComparer.InvariantCultureIgnoreCase)), - IsNews = p.Categories.Any(c => info.NewsCategories.Contains(c, StringComparer.InvariantCultureIgnoreCase)), - IsSports = p.Categories.Any(c => info.SportsCategories.Contains(c, StringComparer.InvariantCultureIgnoreCase)), + IsKids = p.Categories.Any(c => info.KidsCategories.Contains(c, StringComparer.OrdinalIgnoreCase)), + IsMovie = p.Categories.Any(c => info.MovieCategories.Contains(c, StringComparer.OrdinalIgnoreCase)), + IsNews = p.Categories.Any(c => info.NewsCategories.Contains(c, StringComparer.OrdinalIgnoreCase)), + IsSports = p.Categories.Any(c => info.SportsCategories.Contains(c, StringComparer.OrdinalIgnoreCase)), ImageUrl = p.Icon != null && !String.IsNullOrEmpty(p.Icon.Source) ? p.Icon.Source : null, HasImage = p.Icon != null && !String.IsNullOrEmpty(p.Icon.Source), OfficialRating = p.Rating != null && !String.IsNullOrEmpty(p.Rating.Value) ? p.Rating.Value : null, @@ -177,7 +180,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings if (channels != null) { - channels.ForEach(c => + foreach (var c in channels) { var channelNumber = info.GetMappedChannel(c.Number); var match = results.FirstOrDefault(r => string.Equals(r.Id, channelNumber, StringComparison.OrdinalIgnoreCase)); @@ -186,14 +189,14 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings { c.ImageUrl = match.Icon.Source; } - }); + } } } public Task Validate(ListingsProviderInfo info, bool validateLogin, bool validateListings) { // Assume all urls are valid. check files for existence - if (!info.Path.StartsWith("http", StringComparison.OrdinalIgnoreCase) && !File.Exists(info.Path)) + if (!info.Path.StartsWith("http", StringComparison.OrdinalIgnoreCase) && !_fileSystem.FileExists(info.Path)) { throw new FileNotFoundException("Could not find the XmlTv file specified:", info.Path); } diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveStreamHelper.cs b/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs index 336c32bae..a338ae23a 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveStreamHelper.cs +++ b/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs @@ -8,7 +8,7 @@ using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Logging; -namespace MediaBrowser.Server.Implementations.LiveTv +namespace Emby.Server.Implementations.LiveTv { public class LiveStreamHelper { @@ -57,7 +57,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv mediaSource.RunTimeTicks = null; } - var audioStream = mediaSource.MediaStreams.FirstOrDefault(i => i.Type == Model.Entities.MediaStreamType.Audio); + var audioStream = mediaSource.MediaStreams.FirstOrDefault(i => i.Type == MediaBrowser.Model.Entities.MediaStreamType.Audio); if (audioStream == null || audioStream.Index == -1) { @@ -68,7 +68,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv mediaSource.DefaultAudioStreamIndex = audioStream.Index; } - var videoStream = mediaSource.MediaStreams.FirstOrDefault(i => i.Type == Model.Entities.MediaStreamType.Video); + var videoStream = mediaSource.MediaStreams.FirstOrDefault(i => i.Type == MediaBrowser.Model.Entities.MediaStreamType.Video); if (videoStream != null) { if (!videoStream.BitRate.HasValue) diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs b/Emby.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs index 57d1d79e1..2be642737 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs @@ -2,7 +2,7 @@ using MediaBrowser.Model.LiveTv; using System.Collections.Generic; -namespace MediaBrowser.Server.Implementations.LiveTv +namespace Emby.Server.Implementations.LiveTv { public class LiveTvConfigurationFactory : IConfigurationFactory { diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs index c7a2d295d..4e7161521 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs @@ -14,7 +14,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.LiveTv +namespace Emby.Server.Implementations.LiveTv { public class LiveTvDtoService { diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index 93fc5459a..adec66858 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -25,8 +25,6 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.IO; -using IniParser; -using IniParser.Model; using MediaBrowser.Common.Events; using MediaBrowser.Common.IO; using MediaBrowser.Common.Security; @@ -37,9 +35,9 @@ using MediaBrowser.Model.Events; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Tasks; -using MediaBrowser.Server.Implementations.LiveTv.Listings; +using Emby.Server.Implementations.LiveTv.Listings; -namespace MediaBrowser.Server.Implementations.LiveTv +namespace Emby.Server.Implementations.LiveTv { /// <summary> /// Class LiveTvManager @@ -2967,43 +2965,46 @@ namespace MediaBrowser.Server.Implementations.LiveTv public List<NameValuePair> GetSatIniMappings() { - var names = GetType().Assembly.GetManifestResourceNames().Where(i => i.IndexOf("SatIp.ini", StringComparison.OrdinalIgnoreCase) != -1).ToList(); + return new List<NameValuePair>(); + //var names = GetType().Assembly.GetManifestResourceNames().Where(i => i.IndexOf("SatIp.ini", StringComparison.OrdinalIgnoreCase) != -1).ToList(); - return names.Select(GetSatIniMappings).Where(i => i != null).DistinctBy(i => i.Value.Split('|')[0]).ToList(); + //return names.Select(GetSatIniMappings).Where(i => i != null).DistinctBy(i => i.Value.Split('|')[0]).ToList(); } public NameValuePair GetSatIniMappings(string resource) { - using (var stream = GetType().Assembly.GetManifestResourceStream(resource)) - { - using (var reader = new StreamReader(stream)) - { - var parser = new StreamIniDataParser(); - IniData data = parser.ReadData(reader); - - var satType1 = data["SATTYPE"]["1"]; - var satType2 = data["SATTYPE"]["2"]; - - if (string.IsNullOrWhiteSpace(satType2)) - { - return null; - } - - var srch = "SatIp.ini."; - var filename = Path.GetFileName(resource); - - return new NameValuePair - { - Name = satType1 + " " + satType2, - Value = satType2 + "|" + filename.Substring(filename.IndexOf(srch) + srch.Length) - }; - } - } + return new NameValuePair(); + //using (var stream = GetType().Assembly.GetManifestResourceStream(resource)) + //{ + // using (var reader = new StreamReader(stream)) + // { + // var parser = new StreamIniDataParser(); + // IniData data = parser.ReadData(reader); + + // var satType1 = data["SATTYPE"]["1"]; + // var satType2 = data["SATTYPE"]["2"]; + + // if (string.IsNullOrWhiteSpace(satType2)) + // { + // return null; + // } + + // var srch = "SatIp.ini."; + // var filename = Path.GetFileName(resource); + + // return new NameValuePair + // { + // Name = satType1 + " " + satType2, + // Value = satType2 + "|" + filename.Substring(filename.IndexOf(srch) + srch.Length) + // }; + // } + //} } public Task<List<ChannelInfo>> GetSatChannelScanResult(TunerHostInfo info, CancellationToken cancellationToken) { - return new TunerHosts.SatIp.ChannelScan(_logger).Scan(info, cancellationToken); + return Task.FromResult(new List<ChannelInfo>()); + //return new TunerHosts.SatIp.ChannelScan(_logger).Scan(info, cancellationToken); } public Task<List<ChannelInfo>> GetChannelsForListingsProvider(string id, CancellationToken cancellationToken) diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs index 79d321e7e..e0a35686e 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs @@ -15,7 +15,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Dlna; -namespace MediaBrowser.Server.Implementations.LiveTv +namespace Emby.Server.Implementations.LiveTv { public class LiveTvMediaSourceProvider : IMediaSourceProvider { @@ -164,7 +164,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv // Null this out so that it will be treated like a live stream mediaSource.RunTimeTicks = null; - var audioStream = mediaSource.MediaStreams.FirstOrDefault(i => i.Type == Model.Entities.MediaStreamType.Audio); + var audioStream = mediaSource.MediaStreams.FirstOrDefault(i => i.Type == MediaBrowser.Model.Entities.MediaStreamType.Audio); if (audioStream == null || audioStream.Index == -1) { @@ -175,7 +175,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv mediaSource.DefaultAudioStreamIndex = audioStream.Index; } - var videoStream = mediaSource.MediaStreams.FirstOrDefault(i => i.Type == Model.Entities.MediaStreamType.Video); + var videoStream = mediaSource.MediaStreams.FirstOrDefault(i => i.Type == MediaBrowser.Model.Entities.MediaStreamType.Video); if (videoStream != null) { if (!videoStream.BitRate.HasValue) diff --git a/MediaBrowser.Server.Implementations/LiveTv/ProgramImageProvider.cs b/Emby.Server.Implementations/LiveTv/ProgramImageProvider.cs index 3f0538bd0..f5d298af4 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/ProgramImageProvider.cs +++ b/Emby.Server.Implementations/LiveTv/ProgramImageProvider.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.LiveTv +namespace Emby.Server.Implementations.LiveTv { public class ProgramImageProvider : IDynamicImageProvider, IHasItemChangeMonitor, IHasOrder { diff --git a/MediaBrowser.Server.Implementations/LiveTv/RecordingImageProvider.cs b/Emby.Server.Implementations/LiveTv/RecordingImageProvider.cs index 25678c29d..47663bdbc 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/RecordingImageProvider.cs +++ b/Emby.Server.Implementations/LiveTv/RecordingImageProvider.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.LiveTv +namespace Emby.Server.Implementations.LiveTv { public class RecordingImageProvider : IDynamicImageProvider, IHasItemChangeMonitor { diff --git a/MediaBrowser.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs index bf0ed90ea..f2806292d 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs +++ b/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Threading.Tasks; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.LiveTv +namespace Emby.Server.Implementations.LiveTv { public class RefreshChannelsScheduledTask : IScheduledTask, IConfigurableScheduledTask { diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs index 0fe74798f..ad43a611b 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs @@ -15,7 +15,7 @@ using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Serialization; -namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts +namespace Emby.Server.Implementations.LiveTv.TunerHosts { public abstract class BaseTunerHost { diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunDiscovery.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunDiscovery.cs index f039da927..f2e48fbc0 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunDiscovery.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunDiscovery.cs @@ -14,7 +14,7 @@ using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Events; using MediaBrowser.Model.Serialization; -namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun +namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun { public class HdHomerunDiscovery : IServerEntryPoint { diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs index a32f4cca2..2d75367d9 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs @@ -24,7 +24,7 @@ using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Net; -namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun +namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun { public class HdHomerunHost : BaseTunerHost, ITunerHost, IConfigurableTunerHost { @@ -59,7 +59,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun private string GetChannelId(TunerHostInfo info, Channels i) { - var id = ChannelIdPrefix + i.GuideNumber.ToString(CultureInfo.InvariantCulture); + var id = ChannelIdPrefix + i.GuideNumber; if (info.DataVersion >= 1) { @@ -97,7 +97,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun return lineup.Select(i => new ChannelInfo { Name = i.GuideName, - Number = i.GuideNumber.ToString(CultureInfo.InvariantCulture), + Number = i.GuideNumber, Id = GetChannelId(info, i), IsFavorite = i.Favorite, TunerHostId = info.Id, diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunLiveStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunLiveStream.cs index 7bb4dc92e..1e8057f87 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunLiveStream.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunLiveStream.cs @@ -10,14 +10,8 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Logging; using MediaBrowser.Model.MediaInfo; -using MediaBrowser.Server.Implementations.LiveTv.EmbyTV; -using System.Collections.Generic; -using System.Linq; -using MediaBrowser.Common.Extensions; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; - -namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun + +namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun { public class HdHomerunLiveStream : LiveStream, IDirectStreamProvider { diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs index b85b3810a..756c3377c 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs @@ -19,9 +19,8 @@ using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.IO; using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Model.Serialization; -using MediaBrowser.Server.Implementations.LiveTv.EmbyTV; -namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts +namespace Emby.Server.Implementations.LiveTv.TunerHosts { public class M3UTunerHost : BaseTunerHost, ITunerHost, IConfigurableTunerHost { diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs index 3bfe902df..8784d5753 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs @@ -14,7 +14,7 @@ using MediaBrowser.Controller.IO; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Model.Logging; -namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts +namespace Emby.Server.Implementations.LiveTv.TunerHosts { public class M3uParser { diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs index 8ff3fd6c1..360a2cee7 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs @@ -7,7 +7,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Logging; -namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts +namespace Emby.Server.Implementations.LiveTv.TunerHosts { public class MulticastStream { diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/QueueStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/QueueStream.cs index c1566b900..7605641b2 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/QueueStream.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/QueueStream.cs @@ -8,7 +8,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Logging; -namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts +namespace Emby.Server.Implementations.LiveTv.TunerHosts { public class QueueStream { diff --git a/Emby.Server.Implementations/Logging/PatternsLogger.cs b/Emby.Server.Implementations/Logging/PatternsLogger.cs new file mode 100644 index 000000000..6dbf33d61 --- /dev/null +++ b/Emby.Server.Implementations/Logging/PatternsLogger.cs @@ -0,0 +1,63 @@ +using Patterns.Logging; +using System; + +namespace Emby.Server.Implementations.Logging +{ + public class PatternsLogger : ILogger + { + private readonly MediaBrowser.Model.Logging.ILogger _logger; + + public PatternsLogger() + : this(new MediaBrowser.Model.Logging.NullLogger()) + { + } + + public PatternsLogger(MediaBrowser.Model.Logging.ILogger logger) + { + _logger = logger; + } + + public void Debug(string message, params object[] paramList) + { + _logger.Debug(message, paramList); + } + + public void Error(string message, params object[] paramList) + { + _logger.Error(message, paramList); + } + + public void ErrorException(string message, Exception exception, params object[] paramList) + { + _logger.ErrorException(message, exception, paramList); + } + + public void Fatal(string message, params object[] paramList) + { + _logger.Fatal(message, paramList); + } + + public void FatalException(string message, Exception exception, params object[] paramList) + { + _logger.FatalException(message, exception, paramList); + } + + public void Info(string message, params object[] paramList) + { + _logger.Info(message, paramList); + } + + public void Warn(string message, params object[] paramList) + { + _logger.Warn(message, paramList); + } + + public void Log(LogSeverity severity, string message, params object[] paramList) + { + } + + public void LogMultiline(string message, LogSeverity severity, System.Text.StringBuilder additionalContent) + { + } + } +} diff --git a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs index 9f1744cc9..204e04061 100644 --- a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs +++ b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs @@ -18,7 +18,7 @@ using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; using MediaBrowser.Controller.Library; -namespace MediaBrowser.Server.Implementations.MediaEncoder +namespace Emby.Server.Implementations.MediaEncoder { public class EncodingManager : IEncodingManager { @@ -143,11 +143,11 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder var container = video.Container; var tempFile = await _encoder.ExtractVideoImage(inputPath, container, protocol, video.Video3DFormat, time, cancellationToken).ConfigureAwait(false); - File.Copy(tempFile, path, true); + _fileSystem.CopyFile(tempFile, path, true); try { - File.Delete(tempFile); + _fileSystem.DeleteFile(tempFile); } catch { @@ -205,7 +205,7 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder return _fileSystem.GetFilePaths(path) .ToList(); } - catch (DirectoryNotFoundException) + catch (IOException) { return new List<string>(); } diff --git a/Emby.Server.Implementations/News/NewsEntryPoint.cs b/Emby.Server.Implementations/News/NewsEntryPoint.cs new file mode 100644 index 000000000..1497d066f --- /dev/null +++ b/Emby.Server.Implementations/News/NewsEntryPoint.cs @@ -0,0 +1,260 @@ +using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Extensions; +using MediaBrowser.Common.Net; +using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Notifications; +using MediaBrowser.Controller.Plugins; +using MediaBrowser.Model.Logging; +using MediaBrowser.Model.News; +using MediaBrowser.Model.Notifications; +using MediaBrowser.Model.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using System.Xml; +using MediaBrowser.Model.IO; +using MediaBrowser.Model.Threading; + +namespace Emby.Server.Implementations.News +{ + public class NewsEntryPoint : IServerEntryPoint + { + private ITimer _timer; + private readonly IHttpClient _httpClient; + private readonly IApplicationPaths _appPaths; + private readonly IFileSystem _fileSystem; + private readonly ILogger _logger; + private readonly IJsonSerializer _json; + + private readonly INotificationManager _notifications; + private readonly IUserManager _userManager; + + private readonly TimeSpan _frequency = TimeSpan.FromHours(24); + private readonly ITimerFactory _timerFactory; + + public NewsEntryPoint(IHttpClient httpClient, IApplicationPaths appPaths, IFileSystem fileSystem, ILogger logger, IJsonSerializer json, INotificationManager notifications, IUserManager userManager, ITimerFactory timerFactory) + { + _httpClient = httpClient; + _appPaths = appPaths; + _fileSystem = fileSystem; + _logger = logger; + _json = json; + _notifications = notifications; + _userManager = userManager; + _timerFactory = timerFactory; + } + + public void Run() + { + _timer = _timerFactory.Create(OnTimerFired, null, TimeSpan.FromMilliseconds(500), _frequency); + } + + /// <summary> + /// Called when [timer fired]. + /// </summary> + /// <param name="state">The state.</param> + private async void OnTimerFired(object state) + { + var path = Path.Combine(_appPaths.CachePath, "news.json"); + + try + { + await DownloadNews(path).ConfigureAwait(false); + } + catch (Exception ex) + { + _logger.ErrorException("Error downloading news", ex); + } + } + + private async Task DownloadNews(string path) + { + DateTime? lastUpdate = null; + + if (_fileSystem.FileExists(path)) + { + lastUpdate = _fileSystem.GetLastWriteTimeUtc(path); + } + + var requestOptions = new HttpRequestOptions + { + Url = "http://emby.media/community/index.php?/blog/rss/1-media-browser-developers-blog", + Progress = new Progress<double>(), + UserAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.42 Safari/537.36", + BufferContent = false + }; + + using (var stream = await _httpClient.Get(requestOptions).ConfigureAwait(false)) + { + using (var reader = XmlReader.Create(stream)) + { + var news = ParseRssItems(reader).ToList(); + + _json.SerializeToFile(news, path); + + await CreateNotifications(news, lastUpdate, CancellationToken.None).ConfigureAwait(false); + } + } + } + + private Task CreateNotifications(List<NewsItem> items, DateTime? lastUpdate, CancellationToken cancellationToken) + { + if (lastUpdate.HasValue) + { + items = items.Where(i => i.Date.ToUniversalTime() >= lastUpdate.Value) + .ToList(); + } + + var tasks = items.Select(i => _notifications.SendNotification(new NotificationRequest + { + Date = i.Date, + Name = i.Title, + Description = i.Description, + Url = i.Link, + UserIds = _userManager.Users.Select(u => u.Id.ToString("N")).ToList() + + }, cancellationToken)); + + return Task.WhenAll(tasks); + } + + private IEnumerable<NewsItem> ParseRssItems(XmlReader reader) + { + reader.MoveToContent(); + reader.Read(); + + while (!reader.EOF) + { + if (reader.NodeType == XmlNodeType.Element) + { + switch (reader.Name) + { + case "channel": + { + using (var subReader = reader.ReadSubtree()) + { + return ParseFromChannelNode(subReader); + } + } + default: + { + reader.Skip(); + break; + } + } + } + else + { + reader.Read(); + } + } + + return new List<NewsItem>(); + } + + private IEnumerable<NewsItem> ParseFromChannelNode(XmlReader reader) + { + var list = new List<NewsItem>(); + + reader.MoveToContent(); + reader.Read(); + + while (!reader.EOF) + { + if (reader.NodeType == XmlNodeType.Element) + { + switch (reader.Name) + { + case "item": + { + using (var subReader = reader.ReadSubtree()) + { + list.Add(ParseItem(subReader)); + } + break; + } + default: + { + reader.Skip(); + break; + } + } + } + else + { + reader.Read(); + } + } + + return list; + } + + private NewsItem ParseItem(XmlReader reader) + { + var item = new NewsItem(); + + reader.MoveToContent(); + reader.Read(); + + while (!reader.EOF) + { + if (reader.NodeType == XmlNodeType.Element) + { + switch (reader.Name) + { + case "title": + { + item.Title = reader.ReadElementContentAsString(); + break; + } + case "link": + { + item.Link = reader.ReadElementContentAsString(); + break; + } + case "description": + { + item.DescriptionHtml = reader.ReadElementContentAsString(); + item.Description = item.DescriptionHtml.StripHtml(); + break; + } + case "pubDate": + { + var date = reader.ReadElementContentAsString(); + DateTime parsedDate; + + if (DateTime.TryParse(date, out parsedDate)) + { + item.Date = parsedDate; + } + break; + } + default: + { + reader.Skip(); + break; + } + } + } + else + { + reader.Read(); + } + } + + return item; + } + + public void Dispose() + { + if (_timer != null) + { + _timer.Dispose(); + _timer = null; + } + } + } +} diff --git a/MediaBrowser.Server.Implementations/News/NewsService.cs b/Emby.Server.Implementations/News/NewsService.cs index 0059ba421..80e799634 100644 --- a/MediaBrowser.Server.Implementations/News/NewsService.cs +++ b/Emby.Server.Implementations/News/NewsService.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -namespace MediaBrowser.Server.Implementations.News +namespace Emby.Server.Implementations.News { public class NewsService : INewsService { @@ -25,7 +25,7 @@ namespace MediaBrowser.Server.Implementations.News { return GetProductNewsInternal(query); } - catch (DirectoryNotFoundException) + catch (FileNotFoundException) { // No biggie return new QueryResult<NewsItem> @@ -33,7 +33,7 @@ namespace MediaBrowser.Server.Implementations.News Items = new NewsItem[] { } }; } - catch (FileNotFoundException) + catch (IOException) { // No biggie return new QueryResult<NewsItem> diff --git a/MediaBrowser.Server.Implementations/Notifications/CoreNotificationTypes.cs b/Emby.Server.Implementations/Notifications/CoreNotificationTypes.cs index 0f2629f58..f9fb98f85 100644 --- a/MediaBrowser.Server.Implementations/Notifications/CoreNotificationTypes.cs +++ b/Emby.Server.Implementations/Notifications/CoreNotificationTypes.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Linq; using MediaBrowser.Model.Globalization; -namespace MediaBrowser.Server.Implementations.Notifications +namespace Emby.Server.Implementations.Notifications { public class CoreNotificationTypes : INotificationTypeFactory { diff --git a/MediaBrowser.Server.Implementations/Notifications/IConfigurableNotificationService.cs b/Emby.Server.Implementations/Notifications/IConfigurableNotificationService.cs index cdfd0f640..d74667c48 100644 --- a/MediaBrowser.Server.Implementations/Notifications/IConfigurableNotificationService.cs +++ b/Emby.Server.Implementations/Notifications/IConfigurableNotificationService.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Server.Implementations.Notifications +namespace Emby.Server.Implementations.Notifications { public interface IConfigurableNotificationService { diff --git a/MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs b/Emby.Server.Implementations/Notifications/InternalNotificationService.cs index 4a625f0fb..61c564f18 100644 --- a/MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs +++ b/Emby.Server.Implementations/Notifications/InternalNotificationService.cs @@ -5,7 +5,7 @@ using System.Threading; using System.Threading.Tasks; using System; -namespace MediaBrowser.Server.Implementations.Notifications +namespace Emby.Server.Implementations.Notifications { public class InternalNotificationService : INotificationService, IConfigurableNotificationService { diff --git a/MediaBrowser.Server.Implementations/Notifications/NotificationConfigurationFactory.cs b/Emby.Server.Implementations/Notifications/NotificationConfigurationFactory.cs index a336eba0e..a7c5b1233 100644 --- a/MediaBrowser.Server.Implementations/Notifications/NotificationConfigurationFactory.cs +++ b/Emby.Server.Implementations/Notifications/NotificationConfigurationFactory.cs @@ -2,7 +2,7 @@ using MediaBrowser.Model.Notifications; using System.Collections.Generic; -namespace MediaBrowser.Server.Implementations.Notifications +namespace Emby.Server.Implementations.Notifications { public class NotificationConfigurationFactory : IConfigurationFactory { diff --git a/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs b/Emby.Server.Implementations/Notifications/NotificationManager.cs index f19ff8a5f..db7980497 100644 --- a/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs +++ b/Emby.Server.Implementations/Notifications/NotificationManager.cs @@ -13,7 +13,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Extensions; -namespace MediaBrowser.Server.Implementations.Notifications +namespace Emby.Server.Implementations.Notifications { public class NotificationManager : INotificationManager { diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs b/Emby.Server.Implementations/Notifications/Notifications.cs index f3d1dc8f9..2d441c18c 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs +++ b/Emby.Server.Implementations/Notifications/Notifications.cs @@ -22,8 +22,9 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Entities.TV; +using MediaBrowser.Model.Threading; -namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications +namespace Emby.Server.Implementations.Notifications { /// <summary> /// Creates notifications for various system events @@ -40,14 +41,15 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications private readonly ILibraryManager _libraryManager; private readonly ISessionManager _sessionManager; private readonly IServerApplicationHost _appHost; + private readonly ITimerFactory _timerFactory; - private Timer LibraryUpdateTimer { get; set; } + private ITimer LibraryUpdateTimer { get; set; } private readonly object _libraryChangedSyncLock = new object(); private readonly IConfigurationManager _config; private readonly IDeviceManager _deviceManager; - public Notifications(IInstallationManager installationManager, IUserManager userManager, ILogger logger, ITaskManager taskManager, INotificationManager notificationManager, ILibraryManager libraryManager, ISessionManager sessionManager, IServerApplicationHost appHost, IConfigurationManager config, IDeviceManager deviceManager) + public Notifications(IInstallationManager installationManager, IUserManager userManager, ILogger logger, ITaskManager taskManager, INotificationManager notificationManager, ILibraryManager libraryManager, ISessionManager sessionManager, IServerApplicationHost appHost, IConfigurationManager config, IDeviceManager deviceManager, ITimerFactory timerFactory) { _installationManager = installationManager; _userManager = userManager; @@ -59,6 +61,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications _appHost = appHost; _config = config; _deviceManager = deviceManager; + _timerFactory = timerFactory; } public void Run() @@ -332,7 +335,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications { if (LibraryUpdateTimer == null) { - LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, 5000, + LibraryUpdateTimer = _timerFactory.Create(LibraryUpdateTimerCallback, null, 5000, Timeout.Infinite); } else diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/WebSocketNotifier.cs b/Emby.Server.Implementations/Notifications/WebSocketNotifier.cs index 916b4a622..8b3367217 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/WebSocketNotifier.cs +++ b/Emby.Server.Implementations/Notifications/WebSocketNotifier.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Notifications; using MediaBrowser.Controller.Plugins; using System.Linq; -namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications +namespace Emby.Server.Implementations.Notifications { /// <summary> /// Notifies clients anytime a notification is added or udpated diff --git a/MediaBrowser.Server.Implementations/Persistence/CleanDatabaseScheduledTask.cs b/Emby.Server.Implementations/Persistence/CleanDatabaseScheduledTask.cs index ed1d21d9a..88f4f1f81 100644 --- a/MediaBrowser.Server.Implementations/Persistence/CleanDatabaseScheduledTask.cs +++ b/Emby.Server.Implementations/Persistence/CleanDatabaseScheduledTask.cs @@ -20,9 +20,9 @@ using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.Net; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Tasks; -using MediaBrowser.Server.Implementations.ScheduledTasks; +using Emby.Server.Implementations.ScheduledTasks; -namespace MediaBrowser.Server.Implementations.Persistence +namespace Emby.Server.Implementations.Persistence { public class CleanDatabaseScheduledTask : IScheduledTask { @@ -37,6 +37,7 @@ namespace MediaBrowser.Server.Implementations.Persistence public const int MigrationVersion = 23; public static bool EnableUnavailableMessage = false; + const int LatestSchemaVersion = 109; public CleanDatabaseScheduledTask(ILibraryManager libraryManager, IItemRepository itemRepo, ILogger logger, IServerConfigurationManager config, IFileSystem fileSystem, IHttpServer httpServer, ILocalizationManager localization, ITaskManager taskManager) { @@ -113,9 +114,9 @@ namespace MediaBrowser.Server.Implementations.Persistence _config.SaveConfiguration(); } - if (_config.Configuration.SchemaVersion < SqliteItemRepository.LatestSchemaVersion) + if (_config.Configuration.SchemaVersion < LatestSchemaVersion) { - _config.Configuration.SchemaVersion = SqliteItemRepository.LatestSchemaVersion; + _config.Configuration.SchemaVersion = LatestSchemaVersion; _config.SaveConfiguration(); } diff --git a/MediaBrowser.Server.Implementations/Photos/PhotoAlbumImageProvider.cs b/Emby.Server.Implementations/Photos/PhotoAlbumImageProvider.cs index ab03f5aaa..cc1756f96 100644 --- a/MediaBrowser.Server.Implementations/Photos/PhotoAlbumImageProvider.cs +++ b/Emby.Server.Implementations/Photos/PhotoAlbumImageProvider.cs @@ -5,12 +5,11 @@ using MediaBrowser.Controller.Providers; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; +using Emby.Server.Implementations.Images; using MediaBrowser.Model.IO; using MediaBrowser.Model.Entities; -namespace MediaBrowser.Server.Implementations.Photos +namespace Emby.Server.Implementations.Photos { public class PhotoAlbumImageProvider : BaseDynamicImageProvider<PhotoAlbum> { diff --git a/MediaBrowser.Server.Implementations/Playlists/PlaylistImageProvider.cs b/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs index 0249b85ee..ef7d6dba8 100644 --- a/MediaBrowser.Server.Implementations/Playlists/PlaylistImageProvider.cs +++ b/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs @@ -6,10 +6,10 @@ using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Playlists; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -using MediaBrowser.Server.Implementations.Photos; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Emby.Server.Implementations.Images; using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; @@ -17,7 +17,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Playlists +namespace Emby.Server.Implementations.Playlists { public class PlaylistImageProvider : BaseDynamicImageProvider<Playlist> { diff --git a/MediaBrowser.Server.Implementations/Playlists/PlaylistManager.cs b/Emby.Server.Implementations/Playlists/PlaylistManager.cs index 13202d94c..9583141e0 100644 --- a/MediaBrowser.Server.Implementations/Playlists/PlaylistManager.cs +++ b/Emby.Server.Implementations/Playlists/PlaylistManager.cs @@ -16,7 +16,7 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.Playlists +namespace Emby.Server.Implementations.Playlists { public class PlaylistManager : IPlaylistManager { @@ -267,9 +267,10 @@ namespace MediaBrowser.Server.Implementations.Playlists public Folder GetPlaylistsFolder(string userId) { - return _libraryManager.RootFolder.Children.OfType<PlaylistsFolder>() - .FirstOrDefault() ?? _libraryManager.GetUserRootFolder().Children.OfType<PlaylistsFolder>() - .FirstOrDefault(); + var typeName = "PlaylistsFolder"; + + return _libraryManager.RootFolder.Children.OfType<Folder>().FirstOrDefault(i => string.Equals(i.GetType().Name, typeName, StringComparison.Ordinal)) ?? + _libraryManager.GetUserRootFolder().Children.OfType<Folder>().FirstOrDefault(i => string.Equals(i.GetType().Name, typeName, StringComparison.Ordinal)); } } } diff --git a/Emby.Server.Implementations/Properties/AssemblyInfo.cs b/Emby.Server.Implementations/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..ed7f9631f --- /dev/null +++ b/Emby.Server.Implementations/Properties/AssemblyInfo.cs @@ -0,0 +1,30 @@ +using System.Resources; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Emby.Server.Implementations")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Emby.Server.Implementations")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/MediaBrowser.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs index 63941f3b6..d75815847 100644 --- a/MediaBrowser.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs @@ -16,7 +16,7 @@ using MediaBrowser.Model.IO; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.ScheduledTasks +namespace Emby.Server.Implementations.ScheduledTasks { /// <summary> /// Class ChapterImagesTask @@ -32,12 +32,6 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks /// </summary> private readonly ILibraryManager _libraryManager; - /// <summary> - /// The current new item timer - /// </summary> - /// <value>The new item timer.</value> - private Timer NewItemTimer { get; set; } - private readonly IItemRepository _itemRepo; private readonly IApplicationPaths _appPaths; @@ -48,9 +42,6 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks /// <summary> /// Initializes a new instance of the <see cref="ChapterImagesTask" /> class. /// </summary> - /// <param name="logManager">The log manager.</param> - /// <param name="libraryManager">The library manager.</param> - /// <param name="itemRepo">The item repo.</param> public ChapterImagesTask(ILogManager logManager, ILibraryManager libraryManager, IItemRepository itemRepo, IApplicationPaths appPaths, IEncodingManager encodingManager, IFileSystem fileSystem) { _logger = logManager.GetLogger(GetType().Name); @@ -115,7 +106,7 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks { previouslyFailedImages = new List<string>(); } - catch (DirectoryNotFoundException) + catch (IOException) { previouslyFailedImages = new List<string>(); } diff --git a/MediaBrowser.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs b/Emby.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs index f90e61902..51122226b 100644 --- a/MediaBrowser.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using MediaBrowser.Controller; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.ScheduledTasks +namespace Emby.Server.Implementations.ScheduledTasks { /// <summary> /// Class PeopleValidationTask diff --git a/MediaBrowser.Server.Implementations/ScheduledTasks/PluginUpdateTask.cs b/Emby.Server.Implementations/ScheduledTasks/PluginUpdateTask.cs index 1d81ec043..e619b6864 100644 --- a/MediaBrowser.Server.Implementations/ScheduledTasks/PluginUpdateTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/PluginUpdateTask.cs @@ -10,7 +10,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.ScheduledTasks +namespace Emby.Server.Implementations.ScheduledTasks { /// <summary> /// Plugin Update Task diff --git a/MediaBrowser.Server.Implementations/ScheduledTasks/RefreshIntrosTask.cs b/Emby.Server.Implementations/ScheduledTasks/RefreshIntrosTask.cs index f10dbcfe7..749233fa1 100644 --- a/MediaBrowser.Server.Implementations/ScheduledTasks/RefreshIntrosTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/RefreshIntrosTask.cs @@ -8,7 +8,7 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.ScheduledTasks +namespace Emby.Server.Implementations.ScheduledTasks { /// <summary> /// Class RefreshIntrosTask diff --git a/MediaBrowser.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs b/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs index e695adb54..fb07b8e99 100644 --- a/MediaBrowser.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs @@ -1,13 +1,13 @@ using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Library; -using MediaBrowser.Server.Implementations.Library; using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +using Emby.Server.Implementations.Library; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.ScheduledTasks +namespace Emby.Server.Implementations.ScheduledTasks { /// <summary> /// Class RefreshMediaLibraryTask diff --git a/MediaBrowser.Server.Implementations/ScheduledTasks/SystemUpdateTask.cs b/Emby.Server.Implementations/ScheduledTasks/SystemUpdateTask.cs index e44eacf3d..28fd8b68c 100644 --- a/MediaBrowser.Server.Implementations/ScheduledTasks/SystemUpdateTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/SystemUpdateTask.cs @@ -7,7 +7,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.ScheduledTasks +namespace Emby.Server.Implementations.ScheduledTasks { /// <summary> /// Plugin Update Task diff --git a/MediaBrowser.Server.Implementations/ServerManager/ServerManager.cs b/Emby.Server.Implementations/ServerManager/ServerManager.cs index 4e706324f..83ce0b6a3 100644 --- a/MediaBrowser.Server.Implementations/ServerManager/ServerManager.cs +++ b/Emby.Server.Implementations/ServerManager/ServerManager.cs @@ -10,14 +10,14 @@ using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; -using System.Net.Sockets; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Common.IO; using MediaBrowser.Model.IO; using MediaBrowser.Model.Services; +using MediaBrowser.Model.TextEncoding; -namespace MediaBrowser.Server.Implementations.ServerManager +namespace Emby.Server.Implementations.ServerManager { /// <summary> /// Manages the Http Server, Udp Server and WebSocket connections @@ -76,6 +76,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager private bool _disposed; private readonly IMemoryStreamProvider _memoryStreamProvider; + private readonly IEncoding _textEncoding; /// <summary> /// Initializes a new instance of the <see cref="ServerManager" /> class. @@ -85,7 +86,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager /// <param name="logger">The logger.</param> /// <param name="configurationManager">The configuration manager.</param> /// <exception cref="System.ArgumentNullException">applicationHost</exception> - public ServerManager(IServerApplicationHost applicationHost, IJsonSerializer jsonSerializer, ILogger logger, IServerConfigurationManager configurationManager, IMemoryStreamProvider memoryStreamProvider) + public ServerManager(IServerApplicationHost applicationHost, IJsonSerializer jsonSerializer, ILogger logger, IServerConfigurationManager configurationManager, IMemoryStreamProvider memoryStreamProvider, IEncoding textEncoding) { if (applicationHost == null) { @@ -105,6 +106,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager _applicationHost = applicationHost; ConfigurationManager = configurationManager; _memoryStreamProvider = memoryStreamProvider; + _textEncoding = textEncoding; } /// <summary> @@ -127,15 +129,13 @@ namespace MediaBrowser.Server.Implementations.ServerManager HttpServer = _applicationHost.Resolve<IHttpServer>(); HttpServer.StartServer(urlPrefixes, certificatePath); } - catch (SocketException ex) - { - _logger.ErrorException("The http server is unable to start due to a Socket error. This can occasionally happen when the operating system takes longer than usual to release the IP bindings from the previous session. This can take up to five minutes. Please try waiting or rebooting the system.", ex); - - throw; - } catch (Exception ex) { - _logger.ErrorException("Error starting Http Server", ex); + var msg = string.Equals(ex.GetType().Name, "SocketException", StringComparison.OrdinalIgnoreCase) + ? "The http server is unable to start due to a Socket error. This can occasionally happen when the operating system takes longer than usual to release the IP bindings from the previous session. This can take up to five minutes. Please try waiting or rebooting the system." + : "Error starting Http Server"; + + _logger.ErrorException(msg, ex); throw; } @@ -155,7 +155,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager return; } - var connection = new WebSocketConnection(e.WebSocket, e.Endpoint, _jsonSerializer, _logger, _memoryStreamProvider) + var connection = new WebSocketConnection(e.WebSocket, e.Endpoint, _jsonSerializer, _logger, _memoryStreamProvider, _textEncoding) { OnReceive = ProcessWebSocketMessageReceived, Url = e.Url, diff --git a/MediaBrowser.Server.Implementations/ServerManager/WebSocketConnection.cs b/Emby.Server.Implementations/ServerManager/WebSocketConnection.cs index c1bd8ed6b..dd17edea5 100644 --- a/MediaBrowser.Server.Implementations/ServerManager/WebSocketConnection.cs +++ b/Emby.Server.Implementations/ServerManager/WebSocketConnection.cs @@ -12,9 +12,10 @@ using System.Threading.Tasks; using MediaBrowser.Common.IO; using MediaBrowser.Model.IO; using MediaBrowser.Model.Services; +using MediaBrowser.Model.TextEncoding; using UniversalDetector; -namespace MediaBrowser.Server.Implementations.ServerManager +namespace Emby.Server.Implementations.ServerManager { /// <summary> /// Class WebSocketConnection @@ -77,6 +78,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager /// <value>The query string.</value> public QueryParamCollection QueryString { get; set; } private readonly IMemoryStreamProvider _memoryStreamProvider; + private readonly IEncoding _textEncoding; /// <summary> /// Initializes a new instance of the <see cref="WebSocketConnection" /> class. @@ -86,7 +88,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager /// <param name="jsonSerializer">The json serializer.</param> /// <param name="logger">The logger.</param> /// <exception cref="System.ArgumentNullException">socket</exception> - public WebSocketConnection(IWebSocket socket, string remoteEndPoint, IJsonSerializer jsonSerializer, ILogger logger, IMemoryStreamProvider memoryStreamProvider) + public WebSocketConnection(IWebSocket socket, string remoteEndPoint, IJsonSerializer jsonSerializer, ILogger logger, IMemoryStreamProvider memoryStreamProvider, IEncoding textEncoding) { if (socket == null) { @@ -113,6 +115,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager RemoteEndPoint = remoteEndPoint; _logger = logger; _memoryStreamProvider = memoryStreamProvider; + _textEncoding = textEncoding; socket.Closed += socket_Closed; } @@ -138,11 +141,11 @@ namespace MediaBrowser.Server.Implementations.ServerManager if (string.Equals(charset, "utf-8", StringComparison.OrdinalIgnoreCase)) { - OnReceiveInternal(Encoding.UTF8.GetString(bytes)); + OnReceiveInternal(Encoding.UTF8.GetString(bytes, 0, bytes.Length)); } else { - OnReceiveInternal(Encoding.ASCII.GetString(bytes)); + OnReceiveInternal(_textEncoding.GetASCIIString(bytes, 0, bytes.Length)); } } private string DetectCharset(byte[] bytes) diff --git a/MediaBrowser.Server.Implementations/Session/HttpSessionController.cs b/Emby.Server.Implementations/Session/HttpSessionController.cs index f54c452cc..cea5d9b40 100644 --- a/MediaBrowser.Server.Implementations/Session/HttpSessionController.cs +++ b/Emby.Server.Implementations/Session/HttpSessionController.cs @@ -12,7 +12,7 @@ using System.Net; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.Session +namespace Emby.Server.Implementations.Session { public class HttpSessionController : ISessionController, IDisposable { diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 6d86ff091..960fe0739 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -30,8 +30,9 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Net; +using MediaBrowser.Model.Threading; -namespace MediaBrowser.Server.Implementations.Session +namespace Emby.Server.Implementations.Session { /// <summary> /// Class SessionManager @@ -61,6 +62,7 @@ namespace MediaBrowser.Server.Implementations.Session private readonly IAuthenticationRepository _authRepo; private readonly IDeviceManager _deviceManager; + private readonly ITimerFactory _timerFactory; /// <summary> /// The _active connections @@ -94,7 +96,7 @@ namespace MediaBrowser.Server.Implementations.Session private readonly SemaphoreSlim _sessionLock = new SemaphoreSlim(1, 1); - public SessionManager(IUserDataManager userDataManager, ILogger logger, ILibraryManager libraryManager, IUserManager userManager, IMusicManager musicManager, IDtoService dtoService, IImageProcessor imageProcessor, IJsonSerializer jsonSerializer, IServerApplicationHost appHost, IHttpClient httpClient, IAuthenticationRepository authRepo, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager) + public SessionManager(IUserDataManager userDataManager, ILogger logger, ILibraryManager libraryManager, IUserManager userManager, IMusicManager musicManager, IDtoService dtoService, IImageProcessor imageProcessor, IJsonSerializer jsonSerializer, IServerApplicationHost appHost, IHttpClient httpClient, IAuthenticationRepository authRepo, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, ITimerFactory timerFactory) { _userDataManager = userDataManager; _logger = logger; @@ -109,6 +111,7 @@ namespace MediaBrowser.Server.Implementations.Session _authRepo = authRepo; _deviceManager = deviceManager; _mediaSourceManager = mediaSourceManager; + _timerFactory = timerFactory; _deviceManager.DeviceOptionsUpdated += _deviceManager_DeviceOptionsUpdated; } @@ -503,13 +506,13 @@ namespace MediaBrowser.Server.Implementations.Session return users; } - private Timer _idleTimer; + private ITimer _idleTimer; private void StartIdleCheckTimer() { if (_idleTimer == null) { - _idleTimer = new Timer(CheckForIdlePlayback, null, TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5)); + _idleTimer = _timerFactory.Create(CheckForIdlePlayback, null, TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5)); } } private void StopIdleCheckTimer() diff --git a/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs b/Emby.Server.Implementations/Session/SessionWebSocketListener.cs index 9d30135a7..336c2caee 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs +++ b/Emby.Server.Implementations/Session/SessionWebSocketListener.cs @@ -11,7 +11,7 @@ using System.Linq; using System.Threading.Tasks; using MediaBrowser.Model.Services; -namespace MediaBrowser.Server.Implementations.Session +namespace Emby.Server.Implementations.Session { /// <summary> /// Class SessionWebSocketListener diff --git a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs b/Emby.Server.Implementations/Session/WebSocketController.cs index 765664299..f0ff0b5dd 100644 --- a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs +++ b/Emby.Server.Implementations/Session/WebSocketController.cs @@ -11,7 +11,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.Session +namespace Emby.Server.Implementations.Session { public class WebSocketController : ISessionController, IDisposable { diff --git a/MediaBrowser.Server.Implementations/Sorting/AirTimeComparer.cs b/Emby.Server.Implementations/Sorting/AirTimeComparer.cs index 7e6a252cd..bc05e9af3 100644 --- a/MediaBrowser.Server.Implementations/Sorting/AirTimeComparer.cs +++ b/Emby.Server.Implementations/Sorting/AirTimeComparer.cs @@ -4,7 +4,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class AirTimeComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs b/Emby.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs index 91abbe34c..494668cb9 100644 --- a/MediaBrowser.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs +++ b/Emby.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs @@ -4,7 +4,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { class AiredEpisodeOrderComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/AlbumArtistComparer.cs b/Emby.Server.Implementations/Sorting/AlbumArtistComparer.cs index 3c79b0c32..cd3834080 100644 --- a/MediaBrowser.Server.Implementations/Sorting/AlbumArtistComparer.cs +++ b/Emby.Server.Implementations/Sorting/AlbumArtistComparer.cs @@ -5,7 +5,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class AlbumArtistComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/AlbumComparer.cs b/Emby.Server.Implementations/Sorting/AlbumComparer.cs index f455d5c2b..68f5f173e 100644 --- a/MediaBrowser.Server.Implementations/Sorting/AlbumComparer.cs +++ b/Emby.Server.Implementations/Sorting/AlbumComparer.cs @@ -4,7 +4,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class AlbumComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/AlphanumComparator.cs b/Emby.Server.Implementations/Sorting/AlphanumComparator.cs index 232bdb3b5..4bfcda1ac 100644 --- a/MediaBrowser.Server.Implementations/Sorting/AlphanumComparator.cs +++ b/Emby.Server.Implementations/Sorting/AlphanumComparator.cs @@ -2,7 +2,7 @@ using System.Text; using MediaBrowser.Controller.Sorting; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class AlphanumComparator : IComparer<string> { diff --git a/MediaBrowser.Server.Implementations/Sorting/ArtistComparer.cs b/Emby.Server.Implementations/Sorting/ArtistComparer.cs index 9ff8a5ace..edb195820 100644 --- a/MediaBrowser.Server.Implementations/Sorting/ArtistComparer.cs +++ b/Emby.Server.Implementations/Sorting/ArtistComparer.cs @@ -4,7 +4,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class ArtistComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/BudgetComparer.cs b/Emby.Server.Implementations/Sorting/BudgetComparer.cs index 87a7325c6..f3aef69f1 100644 --- a/MediaBrowser.Server.Implementations/Sorting/BudgetComparer.cs +++ b/Emby.Server.Implementations/Sorting/BudgetComparer.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class BudgetComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/CommunityRatingComparer.cs b/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs index bdd18a648..396bbbdb9 100644 --- a/MediaBrowser.Server.Implementations/Sorting/CommunityRatingComparer.cs +++ b/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class CommunityRatingComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/CriticRatingComparer.cs b/Emby.Server.Implementations/Sorting/CriticRatingComparer.cs index 9484130cb..877dbfcc1 100644 --- a/MediaBrowser.Server.Implementations/Sorting/CriticRatingComparer.cs +++ b/Emby.Server.Implementations/Sorting/CriticRatingComparer.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class CriticRatingComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/DateCreatedComparer.cs b/Emby.Server.Implementations/Sorting/DateCreatedComparer.cs index 9862f0a8a..c436fcb4a 100644 --- a/MediaBrowser.Server.Implementations/Sorting/DateCreatedComparer.cs +++ b/Emby.Server.Implementations/Sorting/DateCreatedComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class DateCreatedComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs b/Emby.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs index 5080edffd..fc92505ac 100644 --- a/MediaBrowser.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs +++ b/Emby.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs @@ -4,7 +4,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class DateLastMediaAddedComparer : IUserBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/DatePlayedComparer.cs b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs index 3edf23020..388d2772e 100644 --- a/MediaBrowser.Server.Implementations/Sorting/DatePlayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs @@ -4,7 +4,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class DatePlayedComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/GameSystemComparer.cs b/Emby.Server.Implementations/Sorting/GameSystemComparer.cs index eb83b98e9..4ee30397d 100644 --- a/MediaBrowser.Server.Implementations/Sorting/GameSystemComparer.cs +++ b/Emby.Server.Implementations/Sorting/GameSystemComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class GameSystemComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs b/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs index 658708dba..27485f09e 100644 --- a/MediaBrowser.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class IsFavoriteOrLikeComparer : IUserBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/IsFolderComparer.cs b/Emby.Server.Implementations/Sorting/IsFolderComparer.cs index d2341d065..756d13bd8 100644 --- a/MediaBrowser.Server.Implementations/Sorting/IsFolderComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsFolderComparer.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class IsFolderComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/IsPlayedComparer.cs b/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs index aebfbdb1c..987dc54a5 100644 --- a/MediaBrowser.Server.Implementations/Sorting/IsPlayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class IsPlayedComparer : IUserBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/IsUnplayedComparer.cs b/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs index f1c6a5a4e..0f4e4c37e 100644 --- a/MediaBrowser.Server.Implementations/Sorting/IsUnplayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class IsUnplayedComparer : IUserBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/MetascoreComparer.cs b/Emby.Server.Implementations/Sorting/MetascoreComparer.cs index bfd162661..9759e0228 100644 --- a/MediaBrowser.Server.Implementations/Sorting/MetascoreComparer.cs +++ b/Emby.Server.Implementations/Sorting/MetascoreComparer.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class MetascoreComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/NameComparer.cs b/Emby.Server.Implementations/Sorting/NameComparer.cs index 49f86c485..8ab5e5172 100644 --- a/MediaBrowser.Server.Implementations/Sorting/NameComparer.cs +++ b/Emby.Server.Implementations/Sorting/NameComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class NameComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/OfficialRatingComparer.cs b/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs index 3b1939b70..3eab4fccc 100644 --- a/MediaBrowser.Server.Implementations/Sorting/OfficialRatingComparer.cs +++ b/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class OfficialRatingComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs index 8b14efffc..aecad7c58 100644 --- a/MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs +++ b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class PlayCountComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/PlayersComparer.cs b/Emby.Server.Implementations/Sorting/PlayersComparer.cs index 5bcd080d7..3b54517c3 100644 --- a/MediaBrowser.Server.Implementations/Sorting/PlayersComparer.cs +++ b/Emby.Server.Implementations/Sorting/PlayersComparer.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class PlayersComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/PremiereDateComparer.cs b/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs index ffe1fc24a..d7219c86f 100644 --- a/MediaBrowser.Server.Implementations/Sorting/PremiereDateComparer.cs +++ b/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class PremiereDateComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/ProductionYearComparer.cs b/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs index 16d531334..ea479419a 100644 --- a/MediaBrowser.Server.Implementations/Sorting/ProductionYearComparer.cs +++ b/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class ProductionYearComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/RandomComparer.cs b/Emby.Server.Implementations/Sorting/RandomComparer.cs index b1677331a..1fbecde56 100644 --- a/MediaBrowser.Server.Implementations/Sorting/RandomComparer.cs +++ b/Emby.Server.Implementations/Sorting/RandomComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class RandomComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/RevenueComparer.cs b/Emby.Server.Implementations/Sorting/RevenueComparer.cs index 6caa27ac3..62e43eac1 100644 --- a/MediaBrowser.Server.Implementations/Sorting/RevenueComparer.cs +++ b/Emby.Server.Implementations/Sorting/RevenueComparer.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class RevenueComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/RuntimeComparer.cs b/Emby.Server.Implementations/Sorting/RuntimeComparer.cs index 793cb265e..63c4758cb 100644 --- a/MediaBrowser.Server.Implementations/Sorting/RuntimeComparer.cs +++ b/Emby.Server.Implementations/Sorting/RuntimeComparer.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class RuntimeComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/SeriesSortNameComparer.cs b/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs index 6bc1264a4..b315d33c3 100644 --- a/MediaBrowser.Server.Implementations/Sorting/SeriesSortNameComparer.cs +++ b/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { class SeriesSortNameComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/SortNameComparer.cs b/Emby.Server.Implementations/Sorting/SortNameComparer.cs index 873753a2b..f2a764840 100644 --- a/MediaBrowser.Server.Implementations/Sorting/SortNameComparer.cs +++ b/Emby.Server.Implementations/Sorting/SortNameComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { /// <summary> /// Class SortNameComparer diff --git a/MediaBrowser.Server.Implementations/Sorting/StartDateComparer.cs b/Emby.Server.Implementations/Sorting/StartDateComparer.cs index 7e6f24ec1..6be5f4883 100644 --- a/MediaBrowser.Server.Implementations/Sorting/StartDateComparer.cs +++ b/Emby.Server.Implementations/Sorting/StartDateComparer.cs @@ -4,7 +4,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class StartDateComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sorting/StudioComparer.cs b/Emby.Server.Implementations/Sorting/StudioComparer.cs index 83ab4dfc2..6735022af 100644 --- a/MediaBrowser.Server.Implementations/Sorting/StudioComparer.cs +++ b/Emby.Server.Implementations/Sorting/StudioComparer.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; using System.Linq; -namespace MediaBrowser.Server.Implementations.Sorting +namespace Emby.Server.Implementations.Sorting { public class StudioComparer : IBaseItemComparer { diff --git a/MediaBrowser.Server.Implementations/Sync/AppSyncProvider.cs b/Emby.Server.Implementations/Sync/AppSyncProvider.cs index 408ec717e..d405a0ff9 100644 --- a/MediaBrowser.Server.Implementations/Sync/AppSyncProvider.cs +++ b/Emby.Server.Implementations/Sync/AppSyncProvider.cs @@ -7,7 +7,7 @@ using System; using System.Collections.Generic; using System.Linq; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class AppSyncProvider : ISyncProvider, IHasUniqueTargetIds, IHasSyncQuality, IHasDuplicateCheck { diff --git a/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs b/Emby.Server.Implementations/Sync/CloudSyncProfile.cs index f40b64498..1a78c8ae6 100644 --- a/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs +++ b/Emby.Server.Implementations/Sync/CloudSyncProfile.cs @@ -1,7 +1,7 @@ using MediaBrowser.Model.Dlna; using System.Collections.Generic; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class CloudSyncProfile : DeviceProfile { diff --git a/MediaBrowser.Server.Implementations/Sync/IHasSyncQuality.cs b/Emby.Server.Implementations/Sync/IHasSyncQuality.cs index e7eee0923..bec8b37a7 100644 --- a/MediaBrowser.Server.Implementations/Sync/IHasSyncQuality.cs +++ b/Emby.Server.Implementations/Sync/IHasSyncQuality.cs @@ -1,7 +1,7 @@ using MediaBrowser.Model.Sync; using System.Collections.Generic; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public interface IHasSyncQuality { diff --git a/MediaBrowser.Server.Implementations/Sync/MediaSync.cs b/Emby.Server.Implementations/Sync/MediaSync.cs index b6853267e..b420a3df4 100644 --- a/MediaBrowser.Server.Implementations/Sync/MediaSync.cs +++ b/Emby.Server.Implementations/Sync/MediaSync.cs @@ -13,15 +13,14 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; -using System.Security.Cryptography; using System.Text; using System.Threading; using System.Threading.Tasks; +using Emby.Server.Implementations.IO; +using MediaBrowser.Model.Cryptography; using MediaBrowser.Model.IO; -using MediaBrowser.Common.IO; -using MediaBrowser.Server.Implementations.IO; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class MediaSync { @@ -30,17 +29,19 @@ namespace MediaBrowser.Server.Implementations.Sync private readonly ILogger _logger; private readonly IFileSystem _fileSystem; private readonly IConfigurationManager _config; + private readonly ICryptographyProvider _cryptographyProvider; public const string PathSeparatorString = "/"; public const char PathSeparatorChar = '/'; - public MediaSync(ILogger logger, ISyncManager syncManager, IServerApplicationHost appHost, IFileSystem fileSystem, IConfigurationManager config) + public MediaSync(ILogger logger, ISyncManager syncManager, IServerApplicationHost appHost, IFileSystem fileSystem, IConfigurationManager config, ICryptographyProvider cryptographyProvider) { _logger = logger; _syncManager = syncManager; _appHost = appHost; _fileSystem = fileSystem; _config = config; + _cryptographyProvider = cryptographyProvider; } public async Task Sync(IServerSyncProvider provider, @@ -360,19 +361,16 @@ namespace MediaBrowser.Server.Implementations.Sync } } - private static string GetLocalId(string jobItemId, string itemId) + private string GetLocalId(string jobItemId, string itemId) { var bytes = Encoding.UTF8.GetBytes(jobItemId + itemId); bytes = CreateMd5(bytes); return BitConverter.ToString(bytes, 0, bytes.Length).Replace("-", string.Empty); } - private static byte[] CreateMd5(byte[] value) + private byte[] CreateMd5(byte[] value) { - using (var provider = MD5.Create()) - { - return provider.ComputeHash(value); - } + return _cryptographyProvider.GetMD5Bytes(value); } public LocalItem CreateLocalItem(IServerSyncProvider provider, SyncedItem syncedItem, SyncJob job, SyncTarget target, BaseItemDto libraryItem, string serverId, string serverName, string originalFileName) diff --git a/MediaBrowser.Server.Implementations/Sync/MultiProviderSync.cs b/Emby.Server.Implementations/Sync/MultiProviderSync.cs index 471604117..db6cfcbd6 100644 --- a/MediaBrowser.Server.Implementations/Sync/MultiProviderSync.cs +++ b/Emby.Server.Implementations/Sync/MultiProviderSync.cs @@ -11,9 +11,10 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; +using MediaBrowser.Model.Cryptography; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class MultiProviderSync { @@ -22,14 +23,16 @@ namespace MediaBrowser.Server.Implementations.Sync private readonly ILogger _logger; private readonly IFileSystem _fileSystem; private readonly IConfigurationManager _config; + private readonly ICryptographyProvider _cryptographyProvider; - public MultiProviderSync(SyncManager syncManager, IServerApplicationHost appHost, ILogger logger, IFileSystem fileSystem, IConfigurationManager config) + public MultiProviderSync(SyncManager syncManager, IServerApplicationHost appHost, ILogger logger, IFileSystem fileSystem, IConfigurationManager config, ICryptographyProvider cryptographyProvider) { _syncManager = syncManager; _appHost = appHost; _logger = logger; _fileSystem = fileSystem; _config = config; + _cryptographyProvider = cryptographyProvider; } public async Task Sync(IEnumerable<IServerSyncProvider> providers, IProgress<double> progress, CancellationToken cancellationToken) @@ -61,7 +64,7 @@ namespace MediaBrowser.Server.Implementations.Sync var dataProvider = _syncManager.GetDataProvider(target.Item1, target.Item2); - await new MediaSync(_logger, _syncManager, _appHost, _fileSystem, _config) + await new MediaSync(_logger, _syncManager, _appHost, _fileSystem, _config, _cryptographyProvider) .Sync(target.Item1, dataProvider, target.Item2, innerProgress, cancellationToken) .ConfigureAwait(false); diff --git a/MediaBrowser.Server.Implementations/Sync/ServerSyncScheduledTask.cs b/Emby.Server.Implementations/Sync/ServerSyncScheduledTask.cs index dc7f925a0..17171633e 100644 --- a/MediaBrowser.Server.Implementations/Sync/ServerSyncScheduledTask.cs +++ b/Emby.Server.Implementations/Sync/ServerSyncScheduledTask.cs @@ -7,10 +7,11 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Model.Cryptography; using MediaBrowser.Model.IO; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { class ServerSyncScheduledTask : IScheduledTask, IConfigurableScheduledTask { @@ -19,14 +20,16 @@ namespace MediaBrowser.Server.Implementations.Sync private readonly IFileSystem _fileSystem; private readonly IServerApplicationHost _appHost; private readonly IConfigurationManager _config; + private readonly ICryptographyProvider _cryptographyProvider; - public ServerSyncScheduledTask(ISyncManager syncManager, ILogger logger, IFileSystem fileSystem, IServerApplicationHost appHost, IConfigurationManager config) + public ServerSyncScheduledTask(ISyncManager syncManager, ILogger logger, IFileSystem fileSystem, IServerApplicationHost appHost, IConfigurationManager config, ICryptographyProvider cryptographyProvider) { _syncManager = syncManager; _logger = logger; _fileSystem = fileSystem; _appHost = appHost; _config = config; + _cryptographyProvider = cryptographyProvider; } public string Name @@ -49,7 +52,7 @@ namespace MediaBrowser.Server.Implementations.Sync public Task Execute(CancellationToken cancellationToken, IProgress<double> progress) { - return new MultiProviderSync((SyncManager)_syncManager, _appHost, _logger, _fileSystem, _config) + return new MultiProviderSync((SyncManager)_syncManager, _appHost, _logger, _fileSystem, _config, _cryptographyProvider) .Sync(ServerSyncProviders, progress, cancellationToken); } diff --git a/MediaBrowser.Server.Implementations/Sync/SyncConfig.cs b/Emby.Server.Implementations/Sync/SyncConfig.cs index 52c774330..8a97326bd 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncConfig.cs +++ b/Emby.Server.Implementations/Sync/SyncConfig.cs @@ -2,7 +2,7 @@ using MediaBrowser.Model.Sync; using System.Collections.Generic; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class SyncConfigurationFactory : IConfigurationFactory { diff --git a/MediaBrowser.Server.Implementations/Sync/SyncConvertScheduledTask.cs b/Emby.Server.Implementations/Sync/SyncConvertScheduledTask.cs index 3a5023fe5..8dafac7e1 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncConvertScheduledTask.cs +++ b/Emby.Server.Implementations/Sync/SyncConvertScheduledTask.cs @@ -13,7 +13,7 @@ using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class SyncConvertScheduledTask : IScheduledTask { diff --git a/MediaBrowser.Server.Implementations/Sync/SyncHelper.cs b/Emby.Server.Implementations/Sync/SyncHelper.cs index fb4e0c6be..da475f003 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncHelper.cs +++ b/Emby.Server.Implementations/Sync/SyncHelper.cs @@ -1,6 +1,6 @@ using System; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class SyncHelper { diff --git a/MediaBrowser.Server.Implementations/Sync/SyncJobOptions.cs b/Emby.Server.Implementations/Sync/SyncJobOptions.cs index cb8141c89..8e4d8e2ed 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncJobOptions.cs +++ b/Emby.Server.Implementations/Sync/SyncJobOptions.cs @@ -1,6 +1,6 @@ using MediaBrowser.Model.Dlna; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class SyncJobOptions { diff --git a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs b/Emby.Server.Implementations/Sync/SyncJobProcessor.cs index 8d2c0b20c..415757609 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs +++ b/Emby.Server.Implementations/Sync/SyncJobProcessor.cs @@ -28,7 +28,7 @@ using MediaBrowser.Model.IO; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class SyncJobProcessor { diff --git a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs b/Emby.Server.Implementations/Sync/SyncManager.cs index 7bcb7b05e..d06ed49fd 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs +++ b/Emby.Server.Implementations/Sync/SyncManager.cs @@ -23,6 +23,7 @@ using MediaBrowser.Model.Users; using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using System.Threading; @@ -30,7 +31,7 @@ using System.Threading.Tasks; using MediaBrowser.Model.IO; using MediaBrowser.Model.Tasks; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class SyncManager : ISyncManager { @@ -124,7 +125,7 @@ namespace MediaBrowser.Server.Implementations.Sync if (string.IsNullOrWhiteSpace(request.Name)) { - request.Name = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString(); + request.Name = DateTime.Now.ToString("f1", CultureInfo.CurrentCulture); } var target = GetSyncTargets(request.UserId) @@ -419,7 +420,7 @@ namespace MediaBrowser.Server.Implementations.Sync { _fileSystem.DeleteDirectory(path, true); } - catch (DirectoryNotFoundException) + catch (IOException) { } @@ -574,7 +575,7 @@ namespace MediaBrowser.Server.Implementations.Sync { _fileSystem.DeleteDirectory(jobItem.TemporaryPath, true); } - catch (DirectoryNotFoundException) + catch (IOException) { } catch (Exception ex) @@ -1061,7 +1062,7 @@ namespace MediaBrowser.Server.Implementations.Sync { _fileSystem.DeleteDirectory(path, true); } - catch (DirectoryNotFoundException) + catch (IOException) { } diff --git a/MediaBrowser.Server.Implementations/Sync/SyncNotificationEntryPoint.cs b/Emby.Server.Implementations/Sync/SyncNotificationEntryPoint.cs index 7017b422e..46cdb28a4 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncNotificationEntryPoint.cs +++ b/Emby.Server.Implementations/Sync/SyncNotificationEntryPoint.cs @@ -5,7 +5,7 @@ using MediaBrowser.Controller.Sync; using MediaBrowser.Model.Events; using MediaBrowser.Model.Sync; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class SyncNotificationEntryPoint : IServerEntryPoint { diff --git a/MediaBrowser.Server.Implementations/Sync/SyncRegistrationInfo.cs b/Emby.Server.Implementations/Sync/SyncRegistrationInfo.cs index 40b84b1c2..c2658c5c5 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncRegistrationInfo.cs +++ b/Emby.Server.Implementations/Sync/SyncRegistrationInfo.cs @@ -1,7 +1,7 @@ using MediaBrowser.Common.Security; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class SyncRegistrationInfo : IRequiresRegistration { diff --git a/MediaBrowser.Server.Implementations/Sync/SyncedMediaSourceProvider.cs b/Emby.Server.Implementations/Sync/SyncedMediaSourceProvider.cs index e0553b1b1..1e54885e6 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncedMediaSourceProvider.cs +++ b/Emby.Server.Implementations/Sync/SyncedMediaSourceProvider.cs @@ -12,7 +12,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class SyncedMediaSourceProvider : IMediaSourceProvider { @@ -144,7 +144,7 @@ namespace MediaBrowser.Server.Implementations.Sync { mediaSource.Id = item.Id; mediaSource.SupportsTranscoding = false; - if (mediaSource.Protocol == Model.MediaInfo.MediaProtocol.File) + if (mediaSource.Protocol == MediaBrowser.Model.MediaInfo.MediaProtocol.File) { mediaSource.ETag = item.Id; } diff --git a/MediaBrowser.Server.Implementations/Sync/TargetDataProvider.cs b/Emby.Server.Implementations/Sync/TargetDataProvider.cs index 03df0d4e6..a0e0f4313 100644 --- a/MediaBrowser.Server.Implementations/Sync/TargetDataProvider.cs +++ b/Emby.Server.Implementations/Sync/TargetDataProvider.cs @@ -11,7 +11,7 @@ using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.Sync +namespace Emby.Server.Implementations.Sync { public class TargetDataProvider : ISyncDataProvider { diff --git a/MediaBrowser.Server.Implementations/TV/SeriesPostScanTask.cs b/Emby.Server.Implementations/TV/SeriesPostScanTask.cs index a498dfec3..2e04c883f 100644 --- a/MediaBrowser.Server.Implementations/TV/SeriesPostScanTask.cs +++ b/Emby.Server.Implementations/TV/SeriesPostScanTask.cs @@ -14,10 +14,11 @@ using MediaBrowser.Model.Globalization; using MediaBrowser.Model.IO; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Tasks; +using MediaBrowser.Model.Threading; using MediaBrowser.Model.Xml; using MediaBrowser.Providers.TV; -namespace MediaBrowser.Server.Implementations.TV +namespace Emby.Server.Implementations.TV { class SeriesGroup : List<Series>, IGrouping<string, Series> { @@ -132,8 +133,9 @@ namespace MediaBrowser.Server.Implementations.TV private const int LibraryUpdateDuration = 180000; private readonly ITaskManager _taskManager; private readonly IXmlReaderSettingsFactory _xmlSettings; + private readonly ITimerFactory _timerFactory; - public CleanMissingEpisodesEntryPoint(ILibraryManager libraryManager, IServerConfigurationManager config, ILogger logger, ILocalizationManager localization, IFileSystem fileSystem, ITaskManager taskManager, IXmlReaderSettingsFactory xmlSettings) + public CleanMissingEpisodesEntryPoint(ILibraryManager libraryManager, IServerConfigurationManager config, ILogger logger, ILocalizationManager localization, IFileSystem fileSystem, ITaskManager taskManager, IXmlReaderSettingsFactory xmlSettings, ITimerFactory timerFactory) { _libraryManager = libraryManager; _config = config; @@ -142,9 +144,10 @@ namespace MediaBrowser.Server.Implementations.TV _fileSystem = fileSystem; _taskManager = taskManager; _xmlSettings = xmlSettings; + _timerFactory = timerFactory; } - private Timer LibraryUpdateTimer { get; set; } + private ITimer LibraryUpdateTimer { get; set; } public void Run() { @@ -162,7 +165,7 @@ namespace MediaBrowser.Server.Implementations.TV { if (LibraryUpdateTimer == null) { - LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, LibraryUpdateDuration, Timeout.Infinite); + LibraryUpdateTimer = _timerFactory.Create(LibraryUpdateTimerCallback, null, LibraryUpdateDuration, Timeout.Infinite); } else { diff --git a/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs b/Emby.Server.Implementations/TV/TVSeriesManager.cs index 03e8a9178..f3bab7883 100644 --- a/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs +++ b/Emby.Server.Implementations/TV/TVSeriesManager.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; using MediaBrowser.Controller.Configuration; -namespace MediaBrowser.Server.Implementations.TV +namespace Emby.Server.Implementations.TV { public class TVSeriesManager : ITVSeriesManager { diff --git a/MediaBrowser.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index c6930e487..3c7a8242c 100644 --- a/MediaBrowser.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -3,7 +3,6 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Security.Cryptography; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Common; @@ -14,13 +13,14 @@ using MediaBrowser.Common.Plugins; using MediaBrowser.Common.Progress; using MediaBrowser.Common.Security; using MediaBrowser.Common.Updates; +using MediaBrowser.Model.Cryptography; using MediaBrowser.Model.Events; using MediaBrowser.Model.IO; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Serialization; using MediaBrowser.Model.Updates; -namespace MediaBrowser.Server.Implementations.Updates +namespace Emby.Server.Implementations.Updates { /// <summary> /// Manages all install, uninstall and update operations (both plugins and system) @@ -40,7 +40,11 @@ namespace MediaBrowser.Server.Implementations.Updates /// <summary> /// The completed installations /// </summary> - public ConcurrentBag<InstallationInfo> CompletedInstallations { get; set; } + private ConcurrentBag<InstallationInfo> CompletedInstallationsInternal { get; set; } + + public IEnumerable<InstallationInfo> CompletedInstallations { + get { return CompletedInstallationsInternal; } + } #region PluginUninstalled Event /// <summary> @@ -115,7 +119,9 @@ namespace MediaBrowser.Server.Implementations.Updates /// <value>The application host.</value> private readonly IApplicationHost _applicationHost; - public InstallationManager(ILogger logger, IApplicationHost appHost, IApplicationPaths appPaths, IHttpClient httpClient, IJsonSerializer jsonSerializer, ISecurityManager securityManager, IConfigurationManager config, IFileSystem fileSystem) + private readonly ICryptographyProvider _cryptographyProvider; + + public InstallationManager(ILogger logger, IApplicationHost appHost, IApplicationPaths appPaths, IHttpClient httpClient, IJsonSerializer jsonSerializer, ISecurityManager securityManager, IConfigurationManager config, IFileSystem fileSystem, ICryptographyProvider cryptographyProvider) { if (logger == null) { @@ -123,7 +129,7 @@ namespace MediaBrowser.Server.Implementations.Updates } CurrentInstallations = new List<Tuple<InstallationInfo, CancellationTokenSource>>(); - CompletedInstallations = new ConcurrentBag<InstallationInfo>(); + CompletedInstallationsInternal = new ConcurrentBag<InstallationInfo>(); _applicationHost = appHost; _appPaths = appPaths; @@ -132,6 +138,7 @@ namespace MediaBrowser.Server.Implementations.Updates _securityManager = securityManager; _config = config; _fileSystem = fileSystem; + _cryptographyProvider = cryptographyProvider; _logger = logger; } @@ -500,7 +507,7 @@ namespace MediaBrowser.Server.Implementations.Updates progress.Report(100); - CompletedInstallations.Add(installationInfo); + CompletedInstallationsInternal.Add(installationInfo); EventHelper.FireEventIfNotNull(PackageInstallationCompleted, this, installationEventArgs, _logger); } @@ -597,13 +604,12 @@ namespace MediaBrowser.Server.Implementations.Updates var packageChecksum = string.IsNullOrWhiteSpace(package.checksum) ? Guid.Empty : new Guid(package.checksum); if (packageChecksum != Guid.Empty) // support for legacy uploads for now { - using (var crypto = new MD5CryptoServiceProvider()) - using (var stream = new BufferedStream(_fileSystem.OpenRead(tempFile), 100000)) + using (var stream = _fileSystem.OpenRead(tempFile)) { - var check = Guid.Parse(BitConverter.ToString(crypto.ComputeHash(stream)).Replace("-", String.Empty)); + var check = Guid.Parse(BitConverter.ToString(_cryptographyProvider.GetMD5Bytes(stream)).Replace("-", String.Empty)); if (check != packageChecksum) { - throw new ApplicationException(string.Format("Download validation failed for {0}. Probably corrupted during transfer.", package.name)); + throw new Exception(string.Format("Download validation failed for {0}. Probably corrupted during transfer.", package.name)); } } } diff --git a/MediaBrowser.Server.Implementations/UserViews/CollectionFolderImageProvider.cs b/Emby.Server.Implementations/UserViews/CollectionFolderImageProvider.cs index 33a7b6725..ab6307238 100644 --- a/MediaBrowser.Server.Implementations/UserViews/CollectionFolderImageProvider.cs +++ b/Emby.Server.Implementations/UserViews/CollectionFolderImageProvider.cs @@ -5,12 +5,12 @@ using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -using MediaBrowser.Server.Implementations.Photos; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; +using Emby.Server.Implementations.Images; using MediaBrowser.Common.IO; using MediaBrowser.Model.IO; using MediaBrowser.Controller.Collections; @@ -20,7 +20,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.UserViews +namespace Emby.Server.Implementations.UserViews { public class CollectionFolderImageProvider : BaseDynamicImageProvider<CollectionFolder> { diff --git a/MediaBrowser.Server.Implementations/UserViews/DynamicImageProvider.cs b/Emby.Server.Implementations/UserViews/DynamicImageProvider.cs index 61f3c77f0..09b68c8ea 100644 --- a/MediaBrowser.Server.Implementations/UserViews/DynamicImageProvider.cs +++ b/Emby.Server.Implementations/UserViews/DynamicImageProvider.cs @@ -6,19 +6,17 @@ using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -using MediaBrowser.Server.Implementations.Photos; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; +using Emby.Server.Implementations.Images; using MediaBrowser.Model.IO; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Model.Extensions; -namespace MediaBrowser.Server.Implementations.UserViews +namespace Emby.Server.Implementations.UserViews { public class DynamicImageProvider : BaseDynamicImageProvider<UserView> { diff --git a/Emby.Server.Implementations/project.json b/Emby.Server.Implementations/project.json new file mode 100644 index 000000000..0f4463ed2 --- /dev/null +++ b/Emby.Server.Implementations/project.json @@ -0,0 +1,11 @@ +{ + "supports": {}, + "dependencies": { + "Emby.XmlTv": "1.0.0.63", + "MediaBrowser.Naming": "1.0.0.59", + "UniversalDetector": "1.0.1" + }, + "frameworks": { + ".NETPortable,Version=v4.5,Profile=Profile7": {} + } +}
\ No newline at end of file diff --git a/Emby.Server.sln b/Emby.Server.sln index e9073a8d0..d28a49273 100644 --- a/Emby.Server.sln +++ b/Emby.Server.sln @@ -46,6 +46,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Api", "MediaBr EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.MediaEncoding", "MediaBrowser.MediaEncoding\MediaBrowser.MediaEncoding.csproj", "{0BD82FA6-EB8A-4452-8AF5-74F9C3849451}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Server.Implementations", "Emby.Server.Implementations\Emby.Server.Implementations.csproj", "{D08B8079-08B3-48F2-83C4-E9CCCE48AFF1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -161,6 +163,12 @@ Global {0BD82FA6-EB8A-4452-8AF5-74F9C3849451}.Release Mono|Any CPU.Build.0 = Release Mono|Any CPU {0BD82FA6-EB8A-4452-8AF5-74F9C3849451}.Release|Any CPU.ActiveCfg = Release|Any CPU {0BD82FA6-EB8A-4452-8AF5-74F9C3849451}.Release|Any CPU.Build.0 = Release|Any CPU + {D08B8079-08B3-48F2-83C4-E9CCCE48AFF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D08B8079-08B3-48F2-83C4-E9CCCE48AFF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D08B8079-08B3-48F2-83C4-E9CCCE48AFF1}.Release Mono|Any CPU.ActiveCfg = Release|Any CPU + {D08B8079-08B3-48F2-83C4-E9CCCE48AFF1}.Release Mono|Any CPU.Build.0 = Release|Any CPU + {D08B8079-08B3-48F2-83C4-E9CCCE48AFF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D08B8079-08B3-48F2-83C4-E9CCCE48AFF1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -184,5 +192,6 @@ Global {89AB4548-770D-41FD-A891-8DAFF44F452C} = {8ADD772F-F0A4-4A53-9B2F-AF4A4C585839} {4FD51AC5-2C16-4308-A993-C3A84F3B4582} = {8ADD772F-F0A4-4A53-9B2F-AF4A4C585839} {0BD82FA6-EB8A-4452-8AF5-74F9C3849451} = {8ADD772F-F0A4-4A53-9B2F-AF4A4C585839} + {D08B8079-08B3-48F2-83C4-E9CCCE48AFF1} = {8ADD772F-F0A4-4A53-9B2F-AF4A4C585839} EndGlobalSection EndGlobal diff --git a/MediaBrowser.Common/Net/HttpRequestOptions.cs b/MediaBrowser.Common/Net/HttpRequestOptions.cs index f70986d67..e1ecd6595 100644 --- a/MediaBrowser.Common/Net/HttpRequestOptions.cs +++ b/MediaBrowser.Common/Net/HttpRequestOptions.cs @@ -17,7 +17,7 @@ namespace MediaBrowser.Common.Net /// <value>The URL.</value> public string Url { get; set; } - public DecompressionMethods? DecompressionMethod { get; set; } + public CompressionMethod? DecompressionMethod { get; set; } /// <summary> /// Gets or sets the accept header. @@ -141,4 +141,10 @@ namespace MediaBrowser.Common.Net None = 0, Unconditional = 1 } + + public enum CompressionMethod + { + Deflate, + Gzip + } } diff --git a/MediaBrowser.Common/Properties/AssemblyInfo.cs b/MediaBrowser.Common/Properties/AssemblyInfo.cs index d7bbb6f3a..09fd68f93 100644 --- a/MediaBrowser.Common/Properties/AssemblyInfo.cs +++ b/MediaBrowser.Common/Properties/AssemblyInfo.cs @@ -18,9 +18,6 @@ using System.Runtime.InteropServices; // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("cdec1bb7-6ffd-409f-b41f-0524a73df9be")] - // Version information for an assembly consists of the following four values: // // Major Version diff --git a/MediaBrowser.Common/Updates/IInstallationManager.cs b/MediaBrowser.Common/Updates/IInstallationManager.cs index f7a202f97..636526567 100644 --- a/MediaBrowser.Common/Updates/IInstallationManager.cs +++ b/MediaBrowser.Common/Updates/IInstallationManager.cs @@ -2,7 +2,6 @@ using MediaBrowser.Model.Events; using MediaBrowser.Model.Updates; using System; -using System.Collections.Concurrent; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -24,7 +23,7 @@ namespace MediaBrowser.Common.Updates /// <summary> /// The completed installations /// </summary> - ConcurrentBag<InstallationInfo> CompletedInstallations { get; set; } + IEnumerable<InstallationInfo> CompletedInstallations { get; } /// <summary> /// Occurs when [plugin uninstalled]. diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 0f26ad5ec..6801a4639 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -14,6 +14,7 @@ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <TargetFrameworkProfile>Profile7</TargetFrameworkProfile> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -367,9 +368,6 @@ <Name>MediaBrowser.Model</Name> </ProjectReference> </ItemGroup> - <ItemGroup> - <None Include="packages.config" /> - </ItemGroup> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> <PropertyGroup> <PostBuildEvent /> diff --git a/MediaBrowser.Controller/Properties/AssemblyInfo.cs b/MediaBrowser.Controller/Properties/AssemblyInfo.cs index a5abf79ee..844b93f37 100644 --- a/MediaBrowser.Controller/Properties/AssemblyInfo.cs +++ b/MediaBrowser.Controller/Properties/AssemblyInfo.cs @@ -18,9 +18,6 @@ using System.Runtime.InteropServices; // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("bc09905a-04ed-497d-b39b-27593401e715")] - // Version information for an assembly consists of the following four values: // // Major Version diff --git a/MediaBrowser.Controller/packages.config b/MediaBrowser.Controller/packages.config deleted file mode 100644 index 6b8deb9c9..000000000 --- a/MediaBrowser.Controller/packages.config +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> -</packages>
\ No newline at end of file diff --git a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs index 0c9226cf0..31b13056c 100644 --- a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs @@ -1329,11 +1329,13 @@ namespace MediaBrowser.LocalMetadata.Parsers protected Share GetShare(XmlReader reader) { - reader.MoveToContent(); - var item = new Share(); - while (reader.Read()) + reader.MoveToContent(); + reader.Read(); + + // Loop through each element + while (!reader.EOF) { if (reader.NodeType == XmlNodeType.Element) { @@ -1350,12 +1352,17 @@ namespace MediaBrowser.LocalMetadata.Parsers item.CanEdit = string.Equals(reader.ReadElementContentAsString(), "true", StringComparison.OrdinalIgnoreCase); break; } - default: - reader.Skip(); - break; + { + reader.Skip(); + break; + } } } + else + { + reader.Read(); + } } // This is valid diff --git a/MediaBrowser.LocalMetadata/Parsers/BoxSetXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/BoxSetXmlParser.cs index d792373bf..c42b44f9e 100644 --- a/MediaBrowser.LocalMetadata/Parsers/BoxSetXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/BoxSetXmlParser.cs @@ -31,11 +31,13 @@ namespace MediaBrowser.LocalMetadata.Parsers private void FetchFromCollectionItemsNode(XmlReader reader, MetadataResult<BoxSet> item) { - reader.MoveToContent(); - var list = new List<LinkedChild>(); - while (reader.Read()) + reader.MoveToContent(); + reader.Read(); + + // Loop through each element + while (!reader.EOF) { if (reader.NodeType == XmlNodeType.Element) { @@ -55,12 +57,17 @@ namespace MediaBrowser.LocalMetadata.Parsers break; } - default: - reader.Skip(); - break; + { + reader.Skip(); + break; + } } } + else + { + reader.Read(); + } } item.Item.LinkedChildren = list; diff --git a/MediaBrowser.LocalMetadata/Parsers/PlaylistXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/PlaylistXmlParser.cs index 4c45545fc..ee986ae2d 100644 --- a/MediaBrowser.LocalMetadata/Parsers/PlaylistXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/PlaylistXmlParser.cs @@ -65,11 +65,13 @@ namespace MediaBrowser.LocalMetadata.Parsers private void FetchFromCollectionItemsNode(XmlReader reader, Playlist item) { - reader.MoveToContent(); - var list = new List<LinkedChild>(); - while (reader.Read()) + reader.MoveToContent(); + reader.Read(); + + // Loop through each element + while (!reader.EOF) { if (reader.NodeType == XmlNodeType.Element) { @@ -89,12 +91,17 @@ namespace MediaBrowser.LocalMetadata.Parsers break; } - default: - reader.Skip(); - break; + { + reader.Skip(); + break; + } } } + else + { + reader.Read(); + } } item.LinkedChildren = list; @@ -102,11 +109,13 @@ namespace MediaBrowser.LocalMetadata.Parsers private void FetchFromSharesNode(XmlReader reader, Playlist item) { - reader.MoveToContent(); - var list = new List<Share>(); - while (reader.Read()) + reader.MoveToContent(); + reader.Read(); + + // Loop through each element + while (!reader.EOF) { if (reader.NodeType == XmlNodeType.Element) { @@ -126,12 +135,17 @@ namespace MediaBrowser.LocalMetadata.Parsers break; } - default: - reader.Skip(); - break; + { + reader.Skip(); + break; + } } } + else + { + reader.Read(); + } } item.Shares = list; diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs index 1248d138d..0baee67ea 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs @@ -793,7 +793,9 @@ namespace MediaBrowser.MediaEncoding.Subtitles { if (protocol == MediaProtocol.File) { - if (_textEncoding.GetFileEncoding(path).Equals(Encoding.UTF8)) + var fileEncoding = _textEncoding.GetFileEncoding(path); + + if (fileEncoding != null && fileEncoding.Equals(Encoding.UTF8)) { return string.Empty; } diff --git a/MediaBrowser.Model/Cryptography/ICryptographyProvider.cs b/MediaBrowser.Model/Cryptography/ICryptographyProvider.cs index 70f679856..a3f86f9e2 100644 --- a/MediaBrowser.Model/Cryptography/ICryptographyProvider.cs +++ b/MediaBrowser.Model/Cryptography/ICryptographyProvider.cs @@ -7,6 +7,8 @@ namespace MediaBrowser.Model.Cryptography { Guid GetMD5(string str); byte[] GetMD5Bytes(string str); + byte[] GetSHA1Bytes(byte[] bytes); byte[] GetMD5Bytes(Stream str); + byte[] GetMD5Bytes(byte[] bytes); } }
\ No newline at end of file diff --git a/MediaBrowser.Mono.sln b/MediaBrowser.Mono.sln index 9dff1a187..0a465f7dd 100644 --- a/MediaBrowser.Mono.sln +++ b/MediaBrowser.Mono.sln @@ -39,12 +39,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Photos", "Emby.Photos\ EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Emby.Common.Implementations", "Emby.Common.Implementations\Emby.Common.Implementations.xproj", "{5A27010A-09C6-4E86-93EA-437484C10917}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Mono.Nat", "Mono.Nat\Mono.Nat.xproj", "{0A82260B-4C22-4FD2-869A-E510044E3502}" -EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RSSDP", "RSSDP\RSSDP.xproj", "{C227ADB7-E256-4E70-A8B9-22B9E0CF4F55}" EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Emby.Dlna", "Emby.Dlna\Emby.Dlna.xproj", "{F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}" EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Mono.Nat", "Mono.Nat\Mono.Nat.xproj", "{4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Server.Implementations", "Emby.Server.Implementations\Emby.Server.Implementations.csproj", "{E383961B-9356-4D5D-8233-9A1079D03055}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -241,17 +243,6 @@ Global {5A27010A-09C6-4E86-93EA-437484C10917}.Release|Any CPU.Build.0 = Release|Any CPU {5A27010A-09C6-4E86-93EA-437484C10917}.Release|x86.ActiveCfg = Release|Any CPU {5A27010A-09C6-4E86-93EA-437484C10917}.Release|x86.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|x86.ActiveCfg = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|x86.Build.0 = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|Any CPU.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|x86.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|x86.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|Any CPU.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|x86.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|x86.Build.0 = Release|Any CPU {C227ADB7-E256-4E70-A8B9-22B9E0CF4F55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C227ADB7-E256-4E70-A8B9-22B9E0CF4F55}.Debug|Any CPU.Build.0 = Debug|Any CPU {C227ADB7-E256-4E70-A8B9-22B9E0CF4F55}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -274,6 +265,30 @@ Global {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Any CPU.Build.0 = Release|Any CPU {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|x86.ActiveCfg = Release|Any CPU {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|x86.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|x86.ActiveCfg = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|x86.Build.0 = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|Any CPU.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|Any CPU.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|x86.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|x86.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|Any CPU.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|x86.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|x86.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|x86.ActiveCfg = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|x86.Build.0 = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|Any CPU.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|Any CPU.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|x86.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|x86.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|Any CPU.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|x86.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs b/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs index 74a968062..3c1bc2118 100644 --- a/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs @@ -513,9 +513,10 @@ namespace MediaBrowser.Providers.TV using (var reader = XmlReader.Create(streamReader, settings)) { reader.MoveToContent(); + reader.Read(); // Loop through each element - while (reader.Read()) + while (!reader.EOF) { if (reader.NodeType == XmlNodeType.Element) { @@ -546,12 +547,17 @@ namespace MediaBrowser.Providers.TV break; } - default: - reader.Skip(); - break; + { + reader.Skip(); + break; + } } } + else + { + reader.Read(); + } } } } diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs index 649fec824..5bbcc9d15 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs @@ -82,67 +82,73 @@ namespace MediaBrowser.Providers.TV // Use XmlReader for best performance using (reader) { - reader.MoveToContent(); - - // Loop through each element - while (reader.Read()) - { - cancellationToken.ThrowIfCancellationRequested(); - - if (reader.NodeType == XmlNodeType.Element) - { - switch (reader.Name) - { - case "thumb_width": - { - var val = reader.ReadElementContentAsString(); - - if (!string.IsNullOrWhiteSpace(val)) - { - int rval; - - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) - { - width = rval; - } - } - break; - } - - case "thumb_height": - { - var val = reader.ReadElementContentAsString(); - - if (!string.IsNullOrWhiteSpace(val)) - { - int rval; - - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) - { - height = rval; - } - } - break; - } - - case "filename": - { - var val = reader.ReadElementContentAsString(); - if (!string.IsNullOrWhiteSpace(val)) - { - url = TVUtils.BannerUrl + val; - } - break; - } - - default: - reader.Skip(); - break; - } - } - } + reader.MoveToContent(); + reader.Read(); + + // Loop through each element + while (!reader.EOF) + { + if (reader.NodeType == XmlNodeType.Element) + { + cancellationToken.ThrowIfCancellationRequested(); + + switch (reader.Name) + { + case "thumb_width": + { + var val = reader.ReadElementContentAsString(); + + if (!string.IsNullOrWhiteSpace(val)) + { + int rval; + + // int.TryParse is local aware, so it can be probamatic, force us culture + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + { + width = rval; + } + } + break; + } + + case "thumb_height": + { + var val = reader.ReadElementContentAsString(); + + if (!string.IsNullOrWhiteSpace(val)) + { + int rval; + + // int.TryParse is local aware, so it can be probamatic, force us culture + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + { + height = rval; + } + } + break; + } + + case "filename": + { + var val = reader.ReadElementContentAsString(); + if (!string.IsNullOrWhiteSpace(val)) + { + url = TVUtils.BannerUrl + val; + } + break; + } + default: + { + reader.Skip(); + break; + } + } + } + else + { + reader.Read(); + } + } } if (string.IsNullOrEmpty(url)) diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs b/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs index 769b7821a..565eeb259 100644 --- a/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs +++ b/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs @@ -14,13 +14,13 @@ using System.Threading.Tasks; using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -using MediaBrowser.Server.Implementations.Threading; +using MediaBrowser.Model.Threading; namespace MediaBrowser.Server.Implementations.Connect { public class ConnectEntryPoint : IServerEntryPoint { - private PeriodicTimer _timer; + private ITimer _timer; private readonly IHttpClient _httpClient; private readonly IApplicationPaths _appPaths; private readonly ILogger _logger; @@ -29,8 +29,9 @@ namespace MediaBrowser.Server.Implementations.Connect private readonly INetworkManager _networkManager; private readonly IApplicationHost _appHost; private readonly IFileSystem _fileSystem; + private readonly ITimerFactory _timerFactory; - public ConnectEntryPoint(IHttpClient httpClient, IApplicationPaths appPaths, ILogger logger, INetworkManager networkManager, IConnectManager connectManager, IApplicationHost appHost, IFileSystem fileSystem) + public ConnectEntryPoint(IHttpClient httpClient, IApplicationPaths appPaths, ILogger logger, INetworkManager networkManager, IConnectManager connectManager, IApplicationHost appHost, IFileSystem fileSystem, ITimerFactory timerFactory) { _httpClient = httpClient; _appPaths = appPaths; @@ -39,13 +40,14 @@ namespace MediaBrowser.Server.Implementations.Connect _connectManager = connectManager; _appHost = appHost; _fileSystem = fileSystem; + _timerFactory = timerFactory; } public void Run() { LoadCachedAddress(); - _timer = new PeriodicTimer(TimerCallback, null, TimeSpan.FromSeconds(5), TimeSpan.FromHours(1)); + _timer = _timerFactory.Create(TimerCallback, null, TimeSpan.FromSeconds(5), TimeSpan.FromHours(1)); ((ConnectManager)_connectManager).Start(); } diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs index d86990a40..dcfa27cc0 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs @@ -11,7 +11,7 @@ using System.Net; using MediaBrowser.Common.Net; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Events; -using MediaBrowser.Server.Implementations.Threading; +using MediaBrowser.Model.Threading; namespace MediaBrowser.Server.Implementations.EntryPoints { @@ -23,16 +23,18 @@ namespace MediaBrowser.Server.Implementations.EntryPoints private readonly IServerConfigurationManager _config; private readonly IDeviceDiscovery _deviceDiscovery; - private PeriodicTimer _timer; + private ITimer _timer; private bool _isStarted; + private readonly ITimerFactory _timerFactory; - public ExternalPortForwarding(ILogManager logmanager, IServerApplicationHost appHost, IServerConfigurationManager config, IDeviceDiscovery deviceDiscovery, IHttpClient httpClient) + public ExternalPortForwarding(ILogManager logmanager, IServerApplicationHost appHost, IServerConfigurationManager config, IDeviceDiscovery deviceDiscovery, IHttpClient httpClient, ITimerFactory timerFactory) { _logger = logmanager.GetLogger("PortMapper"); _appHost = appHost; _config = config; _deviceDiscovery = deviceDiscovery; _httpClient = httpClient; + _timerFactory = timerFactory; } private string _lastConfigIdentifier; @@ -94,7 +96,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints NatUtility.StartDiscovery(); - _timer = new PeriodicTimer(ClearCreatedRules, null, TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5)); + _timer = _timerFactory.Create(ClearCreatedRules, null, TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5)); _deviceDiscovery.DeviceDiscovered += _deviceDiscovery_DeviceDiscovered; diff --git a/MediaBrowser.Server.Implementations/IO/FileRefresher.cs b/MediaBrowser.Server.Implementations/IO/FileRefresher.cs index eeefdd65a..2742e1a26 100644 --- a/MediaBrowser.Server.Implementations/IO/FileRefresher.cs +++ b/MediaBrowser.Server.Implementations/IO/FileRefresher.cs @@ -14,7 +14,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Tasks; -using MediaBrowser.Server.Implementations.ScheduledTasks; +using MediaBrowser.Model.Threading; namespace MediaBrowser.Server.Implementations.IO { @@ -26,13 +26,14 @@ namespace MediaBrowser.Server.Implementations.IO private IServerConfigurationManager ConfigurationManager { get; set; } private readonly IFileSystem _fileSystem; private readonly List<string> _affectedPaths = new List<string>(); - private Timer _timer; + private ITimer _timer; + private readonly ITimerFactory _timerFactory; private readonly object _timerLock = new object(); public string Path { get; private set; } public event EventHandler<EventArgs> Completed; - public FileRefresher(string path, IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, ITaskManager taskManager, ILogger logger) + public FileRefresher(string path, IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, ITaskManager taskManager, ILogger logger, ITimerFactory timerFactory) { logger.Debug("New file refresher created for {0}", path); Path = path; @@ -42,6 +43,7 @@ namespace MediaBrowser.Server.Implementations.IO LibraryManager = libraryManager; TaskManager = taskManager; Logger = logger; + _timerFactory = timerFactory; AddPath(path); } @@ -88,7 +90,7 @@ namespace MediaBrowser.Server.Implementations.IO if (_timer == null) { - _timer = new Timer(OnTimerCallback, null, TimeSpan.FromSeconds(ConfigurationManager.Configuration.LibraryMonitorDelay), TimeSpan.FromMilliseconds(-1)); + _timer = _timerFactory.Create(OnTimerCallback, null, TimeSpan.FromSeconds(ConfigurationManager.Configuration.LibraryMonitorDelay), TimeSpan.FromMilliseconds(-1)); } else { @@ -163,7 +165,7 @@ namespace MediaBrowser.Server.Implementations.IO // If the root folder changed, run the library task so the user can see it if (itemsToRefresh.Any(i => i is AggregateFolder)) { - TaskManager.CancelIfRunningAndQueue<RefreshMediaLibraryTask>(); + LibraryManager.ValidateMediaLibrary(new Progress<double>(), CancellationToken.None); return; } @@ -268,11 +270,11 @@ namespace MediaBrowser.Server.Implementations.IO return false; } } - catch (DirectoryNotFoundException) - { - // File may have been deleted - return false; - } + //catch (DirectoryNotFoundException) + //{ + // // File may have been deleted + // return false; + //} catch (FileNotFoundException) { // File may have been deleted diff --git a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs index 77981b528..49cb1e75f 100644 --- a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs +++ b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs @@ -4,7 +4,6 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Plugins; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Logging; -using Microsoft.Win32; using System; using System.Collections.Concurrent; using System.Collections.Generic; @@ -16,6 +15,8 @@ using MediaBrowser.Model.IO; using MediaBrowser.Controller; using MediaBrowser.Controller.IO; using MediaBrowser.Model.Tasks; +using MediaBrowser.Model.Threading; +using Microsoft.Win32; namespace MediaBrowser.Server.Implementations.IO { @@ -136,12 +137,12 @@ namespace MediaBrowser.Server.Implementations.IO private IServerConfigurationManager ConfigurationManager { get; set; } private readonly IFileSystem _fileSystem; - private readonly IServerApplicationHost _appHost; + private readonly ITimerFactory _timerFactory; /// <summary> /// Initializes a new instance of the <see cref="LibraryMonitor" /> class. /// </summary> - public LibraryMonitor(ILogManager logManager, ITaskManager taskManager, ILibraryManager libraryManager, IServerConfigurationManager configurationManager, IFileSystem fileSystem, IServerApplicationHost appHost) + public LibraryMonitor(ILogManager logManager, ITaskManager taskManager, ILibraryManager libraryManager, IServerConfigurationManager configurationManager, IFileSystem fileSystem, ITimerFactory timerFactory) { if (taskManager == null) { @@ -153,7 +154,7 @@ namespace MediaBrowser.Server.Implementations.IO Logger = logManager.GetLogger(GetType().Name); ConfigurationManager = configurationManager; _fileSystem = fileSystem; - _appHost = appHost; + _timerFactory = timerFactory; SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged; } @@ -528,7 +529,7 @@ namespace MediaBrowser.Server.Implementations.IO } } - var newRefresher = new FileRefresher(path, _fileSystem, ConfigurationManager, LibraryManager, TaskManager, Logger); + var newRefresher = new FileRefresher(path, _fileSystem, ConfigurationManager, LibraryManager, TaskManager, Logger, _timerFactory); newRefresher.Completed += NewRefresher_Completed; _activeRefreshers.Add(newRefresher); } diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpHost.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpHost.cs index 8dca261a3..55101ce10f 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpHost.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpHost.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Emby.Server.Implementations.LiveTv.TunerHosts; using MediaBrowser.Model.IO; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Extensions; @@ -20,7 +21,6 @@ using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Logging; using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.Serialization; -using MediaBrowser.Server.Implementations.LiveTv.EmbyTV; namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.SatIp { diff --git a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj index 15c2368e1..6118e1501 100644 --- a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj +++ b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj @@ -46,26 +46,23 @@ <HintPath>..\ThirdParty\emby\Emby.Common.Implementations.dll</HintPath> </Reference> <Reference Include="Emby.XmlTv, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Emby.XmlTv.1.0.0.58\lib\portable-net46+win10\Emby.XmlTv.dll</HintPath> + <HintPath>..\packages\Emby.XmlTv.1.0.0.63\lib\portable-net45+win8\Emby.XmlTv.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="INIFileParser, Version=2.3.0.0, Culture=neutral, PublicKeyToken=79af7b307b65cf3c, processorArchitecture=MSIL"> <HintPath>..\packages\ini-parser.2.3.0\lib\net20\INIFileParser.dll</HintPath> <Private>True</Private> </Reference> - <Reference Include="MediaBrowser.Naming, Version=1.0.6146.28476, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\MediaBrowser.Naming.1.0.0.57\lib\portable-net45+sl4+wp71+win8+wpa81\MediaBrowser.Naming.dll</HintPath> - <Private>True</Private> - </Reference> <Reference Include="Microsoft.IO.RecyclableMemoryStream, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <HintPath>..\packages\Microsoft.IO.RecyclableMemoryStream.1.1.0.0\lib\net45\Microsoft.IO.RecyclableMemoryStream.dll</HintPath> <Private>True</Private> </Reference> - <Reference Include="Mono.Nat"> + <Reference Include="Mono.Nat, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> <HintPath>..\ThirdParty\emby\Mono.Nat.dll</HintPath> </Reference> - <Reference Include="Patterns.Logging, Version=1.0.6149.1756, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Patterns.Logging.1.0.0.4\lib\portable-net45+dnxcore50+sl4+wp71+win8+wpa81\Patterns.Logging.dll</HintPath> + <Reference Include="Patterns.Logging, Version=1.0.6151.30227, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\Patterns.Logging.1.0.0.6\lib\portable-net45+win8\Patterns.Logging.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="ServiceStack.Api.Swagger"> @@ -108,50 +105,19 @@ <Compile Include="..\SharedVersion.cs"> <Link>Properties\SharedVersion.cs</Link> </Compile> - <Compile Include="Activity\ActivityManager.cs" /> <Compile Include="Activity\ActivityRepository.cs" /> <Compile Include="Archiving\ZipClient.cs" /> - <Compile Include="Branding\BrandingConfigurationFactory.cs" /> - <Compile Include="Channels\ChannelConfigurations.cs" /> - <Compile Include="Channels\ChannelDynamicMediaSourceProvider.cs" /> - <Compile Include="Channels\ChannelImageProvider.cs" /> - <Compile Include="Channels\ChannelManager.cs" /> - <Compile Include="Channels\ChannelPostScanTask.cs" /> - <Compile Include="Channels\RefreshChannelsScheduledTask.cs" /> - <Compile Include="Collections\CollectionManager.cs" /> <Compile Include="Collections\CollectionsDynamicFolder.cs" /> - <Compile Include="Collections\CollectionImageProvider.cs" /> <Compile Include="Configuration\ServerConfigurationManager.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\DeviceManager.cs" /> <Compile Include="Devices\DeviceRepository.cs" /> <Compile Include="Devices\CameraUploadsFolder.cs" /> - <Compile Include="Dto\DtoService.cs" /> - <Compile Include="EntryPoints\ActivityLogEntryPoint.cs" /> - <Compile Include="EntryPoints\AutomaticRestartEntryPoint.cs" /> <Compile Include="EntryPoints\ExternalPortForwarding.cs" /> - <Compile Include="EntryPoints\LibraryChangedNotifier.cs" /> - <Compile Include="EntryPoints\LoadRegistrations.cs" /> - <Compile Include="EntryPoints\Notifications\Notifications.cs" /> - <Compile Include="EntryPoints\Notifications\WebSocketNotifier.cs" /> - <Compile Include="EntryPoints\RecordingNotifier.cs" /> - <Compile Include="EntryPoints\RefreshUsersMetadata.cs" /> - <Compile Include="EntryPoints\UsageEntryPoint.cs" /> - <Compile Include="Connect\ConnectEntryPoint.cs" /> - <Compile Include="EntryPoints\UsageReporter.cs" /> - <Compile Include="FileOrganization\EpisodeFileOrganizer.cs" /> - <Compile Include="FileOrganization\Extensions.cs" /> - <Compile Include="FileOrganization\FileOrganizationNotifier.cs" /> - <Compile Include="FileOrganization\FileOrganizationService.cs" /> - <Compile Include="FileOrganization\NameUtils.cs" /> - <Compile Include="FileOrganization\TvFolderOrganizer.cs" /> <Compile Include="EntryPoints\UdpServerEntryPoint.cs" /> - <Compile Include="EntryPoints\ServerEventNotifier.cs" /> - <Compile Include="EntryPoints\UserDataChangeNotifier.cs" /> - <Compile Include="FileOrganization\OrganizerScheduledTask.cs" /> <Compile Include="HttpServer\IHttpListener.cs" /> <Compile Include="HttpServer\Security\AuthorizationContext.cs" /> <Compile Include="HttpServer\ContainerAdapter.cs" /> @@ -175,79 +141,9 @@ <Compile Include="HttpServer\SocketSharp\WebSocketSharpListener.cs" /> <Compile Include="HttpServer\SocketSharp\WebSocketSharpRequest.cs" /> <Compile Include="HttpServer\SocketSharp\WebSocketSharpResponse.cs" /> - <Compile Include="Intros\DefaultIntroProvider.cs" /> <Compile Include="IO\FileRefresher.cs" /> <Compile Include="IO\LibraryMonitor.cs" /> <Compile Include="IO\MemoryStreamProvider.cs" /> - <Compile Include="IO\ThrottledStream.cs" /> - <Compile Include="Library\CoreResolutionIgnoreRule.cs" /> - <Compile Include="Library\LibraryManager.cs" /> - <Compile Include="Library\LocalTrailerPostScanTask.cs" /> - <Compile Include="Library\MediaSourceManager.cs" /> - <Compile Include="Library\MusicManager.cs" /> - <Compile Include="Library\PathExtensions.cs" /> - <Compile Include="Library\Resolvers\SpecialFolderResolver.cs" /> - <Compile Include="Library\Resolvers\BaseVideoResolver.cs" /> - <Compile Include="Library\Resolvers\PhotoAlbumResolver.cs" /> - <Compile Include="Library\Resolvers\PhotoResolver.cs" /> - <Compile Include="Library\Resolvers\PlaylistResolver.cs" /> - <Compile Include="Library\SearchEngine.cs" /> - <Compile Include="Library\ResolverHelper.cs" /> - <Compile Include="Library\Resolvers\Audio\AudioResolver.cs" /> - <Compile Include="Library\Resolvers\Audio\MusicAlbumResolver.cs" /> - <Compile Include="Library\Resolvers\Audio\MusicArtistResolver.cs" /> - <Compile Include="Library\Resolvers\ItemResolver.cs" /> - <Compile Include="Library\Resolvers\FolderResolver.cs" /> - <Compile Include="Library\Resolvers\Movies\BoxSetResolver.cs" /> - <Compile Include="Library\Resolvers\Movies\MovieResolver.cs" /> - <Compile Include="Library\Resolvers\TV\EpisodeResolver.cs" /> - <Compile Include="Library\Resolvers\TV\SeasonResolver.cs" /> - <Compile Include="Library\Resolvers\TV\SeriesResolver.cs" /> - <Compile Include="Library\Resolvers\VideoResolver.cs" /> - <Compile Include="Library\UserDataManager.cs" /> - <Compile Include="Library\UserManager.cs" /> - <Compile Include="Library\UserViewManager.cs" /> - <Compile Include="Library\Validators\ArtistsPostScanTask.cs" /> - <Compile Include="Library\Validators\ArtistsValidator.cs" /> - <Compile Include="Library\Validators\GameGenresPostScanTask.cs" /> - <Compile Include="Library\Validators\GameGenresValidator.cs" /> - <Compile Include="Library\Validators\GenresPostScanTask.cs" /> - <Compile Include="Library\Validators\GenresValidator.cs" /> - <Compile Include="Library\Validators\MusicGenresPostScanTask.cs" /> - <Compile Include="Library\Validators\MusicGenresValidator.cs" /> - <Compile Include="Library\Validators\PeopleValidator.cs" /> - <Compile Include="Library\Validators\StudiosPostScanTask.cs" /> - <Compile Include="Library\Validators\StudiosValidator.cs" /> - <Compile Include="Library\Validators\YearsPostScanTask.cs" /> - <Compile Include="LiveTv\ChannelImageProvider.cs" /> - <Compile Include="LiveTv\EmbyTV\DirectRecorder.cs" /> - <Compile Include="LiveTv\EmbyTV\EmbyTV.cs" /> - <Compile Include="LiveTv\EmbyTV\EmbyTVRegistration.cs" /> - <Compile Include="LiveTv\EmbyTV\EncodedRecorder.cs" /> - <Compile Include="LiveTv\EmbyTV\EntryPoint.cs" /> - <Compile Include="LiveTv\EmbyTV\IRecorder.cs" /> - <Compile Include="LiveTv\EmbyTV\ItemDataProvider.cs" /> - <Compile Include="LiveTv\EmbyTV\RecordingHelper.cs" /> - <Compile Include="LiveTv\EmbyTV\SeriesTimerManager.cs" /> - <Compile Include="LiveTv\EmbyTV\TimerManager.cs" /> - <Compile Include="LiveTv\Listings\SchedulesDirect.cs" /> - <Compile Include="LiveTv\Listings\XmlTvListingsProvider.cs" /> - <Compile Include="LiveTv\LiveStreamHelper.cs" /> - <Compile Include="LiveTv\LiveTvConfigurationFactory.cs" /> - <Compile Include="LiveTv\LiveTvDtoService.cs" /> - <Compile Include="LiveTv\LiveTvManager.cs" /> - <Compile Include="LiveTv\LiveTvMediaSourceProvider.cs" /> - <Compile Include="LiveTv\TunerHosts\BaseTunerHost.cs" /> - <Compile Include="LiveTv\TunerHosts\HdHomerun\HdHomerunHost.cs" /> - <Compile Include="LiveTv\TunerHosts\HdHomerun\HdHomerunDiscovery.cs" /> - <Compile Include="LiveTv\TunerHosts\HdHomerun\HdHomerunLiveStream.cs" /> - <Compile Include="LiveTv\TunerHosts\M3uParser.cs" /> - <Compile Include="LiveTv\TunerHosts\M3UTunerHost.cs" /> - <Compile Include="LiveTv\ProgramImageProvider.cs" /> - <Compile Include="LiveTv\RecordingImageProvider.cs" /> - <Compile Include="LiveTv\RefreshChannelsScheduledTask.cs" /> - <Compile Include="LiveTv\TunerHosts\MulticastStream.cs" /> - <Compile Include="LiveTv\TunerHosts\QueueStream.cs" /> <Compile Include="LiveTv\TunerHosts\SatIp\ChannelScan.cs" /> <Compile Include="LiveTv\TunerHosts\SatIp\Rtcp\ReportBlock.cs" /> <Compile Include="LiveTv\TunerHosts\SatIp\Rtcp\RtcpAppPacket.cs" /> @@ -266,122 +162,43 @@ <Compile Include="LiveTv\TunerHosts\SatIp\Rtsp\RtspResponse.cs" /> <Compile Include="LiveTv\TunerHosts\SatIp\Rtsp\RtspSession.cs" /> <Compile Include="LiveTv\TunerHosts\SatIp\Rtsp\RtspStatusCode.cs" /> - <Compile Include="LiveTv\TunerHosts\SatIp\SatIpHost.cs" /> <Compile Include="LiveTv\TunerHosts\SatIp\SatIpDiscovery.cs" /> + <Compile Include="LiveTv\TunerHosts\SatIp\SatIpHost.cs" /> <Compile Include="LiveTv\TunerHosts\SatIp\TransmissionMode.cs" /> <Compile Include="LiveTv\TunerHosts\SatIp\Utils.cs" /> <Compile Include="Localization\LocalizationManager.cs" /> <Compile Include="Logging\PatternsLogger.cs" /> - <Compile Include="MediaEncoder\EncodingManager.cs" /> - <Compile Include="Notifications\IConfigurableNotificationService.cs" /> <Compile Include="Persistence\BaseSqliteRepository.cs" /> - <Compile Include="Persistence\CleanDatabaseScheduledTask.cs" /> <Compile Include="Persistence\DataExtensions.cs" /> <Compile Include="Persistence\IDbConnector.cs" /> <Compile Include="Persistence\MediaStreamColumns.cs" /> - <Compile Include="Reflection\AssemblyInfo.cs" /> <Compile Include="Security\MBLicenseFile.cs" /> <Compile Include="Security\PluginSecurityManager.cs" /> <Compile Include="Security\RegRecord.cs" /> <Compile Include="Serialization\JsonSerializer.cs" /> <Compile Include="Social\SharingManager.cs" /> <Compile Include="Social\SharingRepository.cs" /> - <Compile Include="Sorting\StartDateComparer.cs" /> - <Compile Include="Sync\SyncHelper.cs" /> - <Compile Include="Sync\SyncJobOptions.cs" /> - <Compile Include="Sync\SyncNotificationEntryPoint.cs" /> - <Compile Include="TextEncoding\TextEncoding.cs" /> - <Compile Include="Threading\PeriodicTimer.cs" /> - <Compile Include="TV\SeriesPostScanTask.cs" /> - <Compile Include="Updates\InstallationManager.cs" /> - <Compile Include="UserViews\CollectionFolderImageProvider.cs" /> - <Compile Include="UserViews\DynamicImageProvider.cs" /> - <Compile Include="News\NewsEntryPoint.cs" /> - <Compile Include="News\NewsService.cs" /> - <Compile Include="Notifications\CoreNotificationTypes.cs" /> - <Compile Include="Notifications\InternalNotificationService.cs" /> - <Compile Include="Notifications\NotificationConfigurationFactory.cs" /> - <Compile Include="Notifications\NotificationManager.cs" /> <Compile Include="Persistence\SqliteFileOrganizationRepository.cs" /> <Compile Include="Notifications\SqliteNotificationsRepository.cs" /> <Compile Include="Persistence\TypeMapper.cs" /> - <Compile Include="Photos\BaseDynamicImageProvider.cs" /> <Compile Include="Playlists\ManualPlaylistsFolder.cs" /> - <Compile Include="Photos\PhotoAlbumImageProvider.cs" /> - <Compile Include="Playlists\PlaylistImageProvider.cs" /> - <Compile Include="Playlists\PlaylistManager.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="ScheduledTasks\PeopleValidationTask.cs" /> - <Compile Include="ScheduledTasks\ChapterImagesTask.cs" /> - <Compile Include="ScheduledTasks\PluginUpdateTask.cs" /> - <Compile Include="ScheduledTasks\RefreshIntrosTask.cs" /> - <Compile Include="ScheduledTasks\RefreshMediaLibraryTask.cs" /> - <Compile Include="ScheduledTasks\SystemUpdateTask.cs" /> <Compile Include="Security\AuthenticationRepository.cs" /> <Compile Include="Security\EncryptionManager.cs" /> <Compile Include="ServerApplicationPaths.cs" /> - <Compile Include="ServerManager\ServerManager.cs" /> - <Compile Include="ServerManager\WebSocketConnection.cs" /> - <Compile Include="Session\HttpSessionController.cs" /> - <Compile Include="Session\SessionManager.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Session\SessionWebSocketListener.cs" /> - <Compile Include="Session\WebSocketController.cs" /> - <Compile Include="Sorting\AiredEpisodeOrderComparer.cs" /> - <Compile Include="Sorting\AirTimeComparer.cs" /> - <Compile Include="Sorting\AlbumArtistComparer.cs" /> - <Compile Include="Sorting\AlbumComparer.cs" /> - <Compile Include="Sorting\AlphanumComparator.cs" /> - <Compile Include="Sorting\ArtistComparer.cs" /> - <Compile Include="Sorting\BudgetComparer.cs" /> - <Compile Include="Sorting\CommunityRatingComparer.cs" /> - <Compile Include="Sorting\CriticRatingComparer.cs" /> - <Compile Include="Sorting\DateCreatedComparer.cs" /> - <Compile Include="Sorting\DateLastMediaAddedComparer.cs" /> - <Compile Include="Sorting\DatePlayedComparer.cs" /> - <Compile Include="Sorting\GameSystemComparer.cs" /> - <Compile Include="Sorting\IsFavoriteOrLikeComparer.cs" /> - <Compile Include="Sorting\IsFolderComparer.cs" /> - <Compile Include="Sorting\IsPlayedComparer.cs" /> - <Compile Include="Sorting\IsUnplayedComparer.cs" /> - <Compile Include="Sorting\MetascoreComparer.cs" /> - <Compile Include="Sorting\NameComparer.cs" /> - <Compile Include="Sorting\OfficialRatingComparer.cs" /> - <Compile Include="Sorting\PlayCountComparer.cs" /> - <Compile Include="Sorting\PlayersComparer.cs" /> - <Compile Include="Sorting\PremiereDateComparer.cs" /> - <Compile Include="Sorting\ProductionYearComparer.cs" /> - <Compile Include="Sorting\RandomComparer.cs" /> - <Compile Include="Sorting\RevenueComparer.cs" /> - <Compile Include="Sorting\RuntimeComparer.cs" /> - <Compile Include="Sorting\SeriesSortNameComparer.cs" /> - <Compile Include="Sorting\SortNameComparer.cs" /> <Compile Include="Persistence\SqliteDisplayPreferencesRepository.cs" /> <Compile Include="Persistence\SqliteItemRepository.cs" /> <Compile Include="Persistence\SqliteUserDataRepository.cs" /> <Compile Include="Persistence\SqliteUserRepository.cs" /> - <Compile Include="Sorting\StudioComparer.cs" /> - <Compile Include="Sync\AppSyncProvider.cs" /> - <Compile Include="Sync\CloudSyncProfile.cs" /> - <Compile Include="Sync\IHasSyncQuality.cs" /> - <Compile Include="Sync\MediaSync.cs" /> - <Compile Include="Sync\MultiProviderSync.cs" /> - <Compile Include="Sync\ServerSyncScheduledTask.cs" /> - <Compile Include="Sync\SyncedMediaSourceProvider.cs" /> - <Compile Include="Sync\SyncRegistrationInfo.cs" /> - <Compile Include="Sync\SyncConfig.cs" /> - <Compile Include="Sync\SyncJobProcessor.cs" /> - <Compile Include="Sync\SyncManager.cs" /> <Compile Include="Sync\SyncRepository.cs" /> - <Compile Include="Sync\SyncConvertScheduledTask.cs" /> - <Compile Include="Sync\TargetDataProvider.cs" /> - <Compile Include="TV\TVSeriesManager.cs" /> <Compile Include="Udp\UdpMessageReceivedEventArgs.cs" /> <Compile Include="Udp\UdpServer.cs" /> - <Compile Include="Xml\XmlReaderSettingsFactory.cs" /> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\Emby.Server.Implementations\Emby.Server.Implementations.csproj"> + <Project>{e383961b-9356-4d5d-8233-9a1079d03055}</Project> + <Name>Emby.Server.Implementations</Name> + </ProjectReference> <ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj"> <Project>{9142EEFA-7570-41E1-BFCC-468BB571AF2F}</Project> <Name>MediaBrowser.Common</Name> @@ -400,23 +217,6 @@ </ProjectReference> </ItemGroup> <ItemGroup> - <EmbeddedResource Include="Localization\Ratings\us.txt" /> - <EmbeddedResource Include="Localization\Ratings\au.txt" /> - <EmbeddedResource Include="Localization\Ratings\gb.txt" /> - <EmbeddedResource Include="Localization\Ratings\nl.txt" /> - <EmbeddedResource Include="Localization\Ratings\br.txt" /> - <EmbeddedResource Include="Localization\Ratings\dk.txt" /> - <EmbeddedResource Include="Localization\Ratings\de.txt" /> - <EmbeddedResource Include="Localization\Ratings\mx.txt" /> - <EmbeddedResource Include="Localization\Ratings\co.txt" /> - <EmbeddedResource Include="Localization\Ratings\fr.txt" /> - <EmbeddedResource Include="Localization\Ratings\ie.txt" /> - <EmbeddedResource Include="Localization\Ratings\jp.txt" /> - <EmbeddedResource Include="Localization\Ratings\kz.txt" /> - <EmbeddedResource Include="Localization\Ratings\nz.txt" /> - <EmbeddedResource Include="Localization\Ratings\ru.txt" /> - </ItemGroup> - <ItemGroup> <Content Include="..\ThirdParty\ServiceStack\swagger-ui\lib\backbone-min.js"> <Link>swagger-ui\lib\backbone-min.js</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> @@ -481,7 +281,6 @@ <Link>swagger-ui\swagger-ui.min.js</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <EmbeddedResource Include="Localization\countries.json" /> <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> @@ -514,11 +313,29 @@ <Link>swagger-ui\fonts\droid-sans-v6-latin-regular.woff2</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> + <EmbeddedResource Include="Localization\Ratings\us.txt" /> + <EmbeddedResource Include="Localization\Ratings\ru.txt" /> + <EmbeddedResource Include="Localization\Ratings\nz.txt" /> + <EmbeddedResource Include="Localization\Ratings\nl.txt" /> + <EmbeddedResource Include="Localization\Ratings\mx.txt" /> + <EmbeddedResource Include="Localization\Ratings\kz.txt" /> + <EmbeddedResource Include="Localization\Ratings\jp.txt" /> + <EmbeddedResource Include="Localization\Ratings\ie.txt" /> + <EmbeddedResource Include="Localization\Ratings\gb.txt" /> + <EmbeddedResource Include="Localization\Ratings\fr.txt" /> + <EmbeddedResource Include="Localization\Ratings\dk.txt" /> + <EmbeddedResource Include="Localization\Ratings\de.txt" /> + <EmbeddedResource Include="Localization\Ratings\co.txt" /> + <EmbeddedResource Include="Localization\Ratings\ca.txt" /> + <EmbeddedResource Include="Localization\Ratings\br.txt" /> + <EmbeddedResource Include="Localization\Ratings\be.txt" /> + <EmbeddedResource Include="Localization\Ratings\au.txt" /> + <EmbeddedResource Include="Localization\iso6392.txt" /> <None Include="app.config" /> - <EmbeddedResource Include="Localization\Core\core.json" /> <EmbeddedResource Include="Localization\Core\ar.json" /> <EmbeddedResource Include="Localization\Core\bg-BG.json" /> <EmbeddedResource Include="Localization\Core\ca.json" /> + <EmbeddedResource Include="Localization\Core\core.json" /> <EmbeddedResource Include="Localization\Core\cs.json" /> <EmbeddedResource Include="Localization\Core\da.json" /> <EmbeddedResource Include="Localization\Core\de.json" /> @@ -529,10 +346,13 @@ <EmbeddedResource Include="Localization\Core\es-MX.json" /> <EmbeddedResource Include="Localization\Core\es.json" /> <EmbeddedResource Include="Localization\Core\fi.json" /> + <EmbeddedResource Include="Localization\Core\fr-CA.json" /> <EmbeddedResource Include="Localization\Core\fr.json" /> <EmbeddedResource Include="Localization\Core\gsw.json" /> <EmbeddedResource Include="Localization\Core\he.json" /> <EmbeddedResource Include="Localization\Core\hr.json" /> + <EmbeddedResource Include="Localization\Core\hu.json" /> + <EmbeddedResource Include="Localization\Core\id.json" /> <EmbeddedResource Include="Localization\Core\it.json" /> <EmbeddedResource Include="Localization\Core\kk.json" /> <EmbeddedResource Include="Localization\Core\ko.json" /> @@ -550,186 +370,181 @@ <EmbeddedResource Include="Localization\Core\uk.json" /> <EmbeddedResource Include="Localization\Core\vi.json" /> <EmbeddedResource Include="Localization\Core\zh-CN.json" /> - <EmbeddedResource Include="Localization\Core\zh-TW.json" /> <EmbeddedResource Include="Localization\Core\zh-HK.json" /> - <EmbeddedResource Include="Localization\Core\hu.json" /> - <EmbeddedResource Include="Localization\Core\id.json" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0030.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0049.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0070.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0090.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0100.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0130.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0160.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0170.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0192.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0200.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0215.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0235.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0255.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0260.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0282.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0305.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0308.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0310.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0315.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0330.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0360.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0380.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0390.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0400.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0420.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0435.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0450.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0460.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0475.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0480.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0490.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0505.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0510.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0520.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0525.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0530.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0549.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0560.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0570.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0600.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0620.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0642.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0650.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0660.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0685.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0705.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0721.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0740.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0750.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0765.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0785.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0830.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0851.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0865.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0875.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0880.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0900.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0915.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0922.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0935.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0950.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\0965.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1005.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1030.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1055.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1082.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1100.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1105.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1130.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1155.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1160.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1180.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1195.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1222.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1240.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1250.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1280.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1320.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1340.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1380.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1400.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1440.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1500.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1520.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1540.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1560.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1590.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1600 OPTUS D1 FTA %28160.0E%29.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1600.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1620.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1640.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1660.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1690.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1720.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1800.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\1830.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2210.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2230.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2250.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2270.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2290.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2310.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2330.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2350.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2370.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2390.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2410.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2432.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2451.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2470.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2489.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2500.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2527.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2550.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2570.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2590.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2608.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2630.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2650.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2669.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2690.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2710.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2728.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2730.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2750.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2760.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2770.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2780.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2812.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2820.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2830.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2850.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2873.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2880.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2881.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2882.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2900.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2930.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2950.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2970.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2985.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\2990.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3020.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3045.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3070.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3100.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3125.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3150.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3169.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3195.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3225.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3255.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3285.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3300.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3325.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3355.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3380.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3400.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3420.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3450.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3460.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3475.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3490.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3520.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3527.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3550.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3560.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3592.ini" /> - <EmbeddedResource Include="LiveTv\TunerHosts\SatIp\ini\satellite\3594.ini" /> - <EmbeddedResource Include="Localization\Core\fr-CA.json" /> + <EmbeddedResource Include="Localization\Core\zh-TW.json" /> + <EmbeddedResource Include="Localization\countries.json" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0030.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0049.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0070.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0090.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0100.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0130.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0160.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0170.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0192.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0200.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0215.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0235.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0255.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0260.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0282.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0305.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0308.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0310.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0315.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0330.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0360.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0380.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0390.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0400.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0420.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0435.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0450.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0460.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0475.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0480.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0490.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0505.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0510.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0520.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0525.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0530.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0549.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0560.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0570.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0600.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0620.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0642.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0650.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0660.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0685.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0705.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0721.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0740.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0750.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0765.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0785.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0830.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0851.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0865.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0875.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0880.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0900.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0915.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0922.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0935.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0950.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\0965.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1005.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1030.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1055.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1082.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1100.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1105.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1130.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1155.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1160.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1180.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1195.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1222.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1240.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1250.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1280.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1320.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1340.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1380.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1400.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1440.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1500.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1520.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1540.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1560.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1590.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1600 OPTUS D1 FTA %28160.0E%29.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1600.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1620.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1640.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1660.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1690.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1720.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1800.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\1830.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2210.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2230.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2250.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2270.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2290.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2310.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2330.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2350.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2370.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2390.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2410.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2432.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2451.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2470.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2489.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2500.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2527.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2550.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2570.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2590.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2608.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2630.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2650.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2669.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2690.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2710.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2728.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2730.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2750.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2760.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2770.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2780.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2812.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2820.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2830.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2850.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2873.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2880.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2881.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2882.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2900.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2930.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2950.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2970.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2985.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\2990.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3020.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3045.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3070.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3100.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3125.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3150.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3169.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3195.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3225.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3255.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3285.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3300.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3325.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3355.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3380.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3400.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3420.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3450.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3460.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3475.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3490.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3520.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3527.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3550.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3560.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3592.ini" /> + <None Include="LiveTv\TunerHosts\SatIp\ini\satellite\3594.ini" /> <None Include="packages.config" /> </ItemGroup> <ItemGroup> - <EmbeddedResource Include="Localization\Ratings\ca.txt" /> - </ItemGroup> - <ItemGroup> <Content Include="..\ThirdParty\ServiceStack\swagger-ui\css\reset.css"> <Link>swagger-ui\css\reset.css</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> @@ -778,8 +593,6 @@ <Link>swagger-ui\lib\shred\content.js</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <EmbeddedResource Include="Localization\iso6392.txt" /> - <EmbeddedResource Include="Localization\Ratings\be.txt" /> </ItemGroup> <ItemGroup /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> diff --git a/MediaBrowser.Server.Implementations/News/NewsEntryPoint.cs b/MediaBrowser.Server.Implementations/News/NewsEntryPoint.cs deleted file mode 100644 index 22cb4e86a..000000000 --- a/MediaBrowser.Server.Implementations/News/NewsEntryPoint.cs +++ /dev/null @@ -1,170 +0,0 @@ -using MediaBrowser.Common.Configuration; -using MediaBrowser.Common.Extensions; -using MediaBrowser.Common.Net; -using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Notifications; -using MediaBrowser.Controller.Plugins; -using MediaBrowser.Model.Logging; -using MediaBrowser.Model.News; -using MediaBrowser.Model.Notifications; -using MediaBrowser.Model.Serialization; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using System.Xml; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; -using MediaBrowser.Model.IO; -using MediaBrowser.Server.Implementations.Threading; - -namespace MediaBrowser.Server.Implementations.News -{ - public class NewsEntryPoint : IServerEntryPoint - { - private PeriodicTimer _timer; - private readonly IHttpClient _httpClient; - private readonly IApplicationPaths _appPaths; - private readonly IFileSystem _fileSystem; - private readonly ILogger _logger; - private readonly IJsonSerializer _json; - - private readonly INotificationManager _notifications; - private readonly IUserManager _userManager; - - private readonly TimeSpan _frequency = TimeSpan.FromHours(24); - - public NewsEntryPoint(IHttpClient httpClient, IApplicationPaths appPaths, IFileSystem fileSystem, ILogger logger, IJsonSerializer json, INotificationManager notifications, IUserManager userManager) - { - _httpClient = httpClient; - _appPaths = appPaths; - _fileSystem = fileSystem; - _logger = logger; - _json = json; - _notifications = notifications; - _userManager = userManager; - } - - public void Run() - { - _timer = new PeriodicTimer(OnTimerFired, null, TimeSpan.FromMilliseconds(500), _frequency); - } - - /// <summary> - /// Called when [timer fired]. - /// </summary> - /// <param name="state">The state.</param> - private async void OnTimerFired(object state) - { - var path = Path.Combine(_appPaths.CachePath, "news.json"); - - try - { - await DownloadNews(path).ConfigureAwait(false); - } - catch (Exception ex) - { - _logger.ErrorException("Error downloading news", ex); - } - } - - private async Task DownloadNews(string path) - { - DateTime? lastUpdate = null; - - if (_fileSystem.FileExists(path)) - { - lastUpdate = _fileSystem.GetLastWriteTimeUtc(path); - } - - var requestOptions = new HttpRequestOptions - { - Url = "http://emby.media/community/index.php?/blog/rss/1-media-browser-developers-blog", - Progress = new Progress<double>(), - UserAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.42 Safari/537.36", - BufferContent = false - }; - - using (var stream = await _httpClient.Get(requestOptions).ConfigureAwait(false)) - { - var doc = new XmlDocument(); - doc.Load(stream); - - var news = ParseRssItems(doc).ToList(); - - _json.SerializeToFile(news, path); - - await CreateNotifications(news, lastUpdate, CancellationToken.None).ConfigureAwait(false); - } - } - - private Task CreateNotifications(List<NewsItem> items, DateTime? lastUpdate, CancellationToken cancellationToken) - { - if (lastUpdate.HasValue) - { - items = items.Where(i => i.Date.ToUniversalTime() >= lastUpdate.Value) - .ToList(); - } - - var tasks = items.Select(i => _notifications.SendNotification(new NotificationRequest - { - Date = i.Date, - Name = i.Title, - Description = i.Description, - Url = i.Link, - UserIds = _userManager.Users.Select(u => u.Id.ToString("N")).ToList() - - }, cancellationToken)); - - return Task.WhenAll(tasks); - } - - private IEnumerable<NewsItem> ParseRssItems(XmlDocument xmlDoc) - { - var nodes = xmlDoc.SelectNodes("rss/channel/item"); - - if (nodes != null) - { - foreach (XmlNode node in nodes) - { - var newsItem = new NewsItem(); - - newsItem.Title = ParseDocElements(node, "title"); - - newsItem.DescriptionHtml = ParseDocElements(node, "description"); - newsItem.Description = newsItem.DescriptionHtml.StripHtml(); - - newsItem.Link = ParseDocElements(node, "link"); - - var date = ParseDocElements(node, "pubDate"); - DateTime parsedDate; - - if (DateTime.TryParse(date, out parsedDate)) - { - newsItem.Date = parsedDate; - } - - yield return newsItem; - } - } - } - - private string ParseDocElements(XmlNode parent, string xPath) - { - var node = parent.SelectSingleNode(xPath); - - return node != null ? node.InnerText : string.Empty; - } - - public void Dispose() - { - if (_timer != null) - { - _timer.Dispose(); - _timer = null; - } - } - } -} diff --git a/MediaBrowser.Server.Implementations/packages.config b/MediaBrowser.Server.Implementations/packages.config index add5b29aa..5a43abe0f 100644 --- a/MediaBrowser.Server.Implementations/packages.config +++ b/MediaBrowser.Server.Implementations/packages.config @@ -1,10 +1,9 @@ <?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Emby.XmlTv" version="1.0.0.58" targetFramework="net46" />
+ <package id="Emby.XmlTv" version="1.0.0.63" targetFramework="net46" />
<package id="ini-parser" version="2.3.0" targetFramework="net45" />
- <package id="MediaBrowser.Naming" version="1.0.0.57" targetFramework="net46" />
<package id="Microsoft.IO.RecyclableMemoryStream" version="1.1.0.0" targetFramework="net46" />
- <package id="Patterns.Logging" version="1.0.0.4" targetFramework="net46" />
+ <package id="Patterns.Logging" version="1.0.0.6" targetFramework="net46" />
<package id="SocketHttpListener" version="1.0.0.40" targetFramework="net45" />
<package id="UniversalDetector" version="1.0.1" targetFramework="net46" />
</packages>
\ No newline at end of file diff --git a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj index f3f5176f0..fcaeb035d 100644 --- a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj +++ b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj @@ -69,8 +69,8 @@ <HintPath>..\packages\NLog.4.4.0-betaV15\lib\net45\NLog.dll</HintPath> <Private>True</Private> </Reference> - <Reference Include="Patterns.Logging, Version=1.0.6149.1756, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Patterns.Logging.1.0.0.4\lib\portable-net45+dnxcore50+sl4+wp71+win8+wpa81\Patterns.Logging.dll</HintPath> + <Reference Include="Patterns.Logging, Version=1.0.6151.30227, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\Patterns.Logging.1.0.0.6\lib\portable-net45+win8\Patterns.Logging.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="System" /> diff --git a/MediaBrowser.Server.Mono/packages.config b/MediaBrowser.Server.Mono/packages.config index d67955cb5..8d1ebc141 100644 --- a/MediaBrowser.Server.Mono/packages.config +++ b/MediaBrowser.Server.Mono/packages.config @@ -2,5 +2,5 @@ <packages> <package id="Mono.Posix" version="4.0.0.0" targetFramework="net45" /> <package id="NLog" version="4.4.0-betaV15" targetFramework="net46" /> - <package id="Patterns.Logging" version="1.0.0.4" targetFramework="net46" /> + <package id="Patterns.Logging" version="1.0.0.6" targetFramework="net46" /> </packages>
\ No newline at end of file diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index 2e86b6c3e..077a58938 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -50,30 +50,20 @@ using MediaBrowser.Providers.Manager; using MediaBrowser.Providers.Subtitles; using MediaBrowser.Server.Implementations; using MediaBrowser.Server.Implementations.Activity; -using MediaBrowser.Server.Implementations.Channels; -using MediaBrowser.Server.Implementations.Collections; using MediaBrowser.Server.Implementations.Configuration; using MediaBrowser.Server.Implementations.Connect; using MediaBrowser.Server.Implementations.Devices; -using MediaBrowser.Server.Implementations.Dto; using MediaBrowser.Server.Implementations.EntryPoints; -using MediaBrowser.Server.Implementations.FileOrganization; using MediaBrowser.Server.Implementations.HttpServer; using MediaBrowser.Server.Implementations.HttpServer.Security; using MediaBrowser.Server.Implementations.IO; -using MediaBrowser.Server.Implementations.Library; using MediaBrowser.Server.Implementations.LiveTv; using MediaBrowser.Server.Implementations.Localization; -using MediaBrowser.Server.Implementations.MediaEncoder; using MediaBrowser.Server.Implementations.Notifications; using MediaBrowser.Server.Implementations.Persistence; -using MediaBrowser.Server.Implementations.Playlists; using MediaBrowser.Server.Implementations.Security; -using MediaBrowser.Server.Implementations.ServerManager; -using MediaBrowser.Server.Implementations.Session; using MediaBrowser.Server.Implementations.Social; using MediaBrowser.Server.Implementations.Sync; -using MediaBrowser.Server.Implementations.TV; using MediaBrowser.Server.Startup.Common.FFMpeg; using MediaBrowser.Server.Startup.Common.Migrations; using MediaBrowser.WebDashboard.Api; @@ -91,7 +81,10 @@ using System.Threading; using System.Threading.Tasks; using Emby.Common.Implementations; using Emby.Common.Implementations.Networking; +using Emby.Common.Implementations.Reflection; +using Emby.Common.Implementations.TextEncoding; using Emby.Common.Implementations.Updates; +using Emby.Common.Implementations.Xml; using Emby.Photos; using MediaBrowser.Model.IO; using MediaBrowser.Api.Playback; @@ -101,13 +94,29 @@ using MediaBrowser.Common.Updates; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Entities.TV; -using MediaBrowser.Controller.IO; using Emby.Dlna; using Emby.Dlna.ConnectionManager; using Emby.Dlna.ContentDirectory; using Emby.Dlna.Main; using Emby.Dlna.MediaReceiverRegistrar; using Emby.Dlna.Ssdp; +using Emby.Server.Implementations.Activity; +using Emby.Server.Implementations.Channels; +using Emby.Server.Implementations.Collections; +using Emby.Server.Implementations.Devices; +using Emby.Server.Implementations.Dto; +using Emby.Server.Implementations.FileOrganization; +using Emby.Server.Implementations.Library; +using Emby.Server.Implementations.LiveTv; +using Emby.Server.Implementations.MediaEncoder; +using Emby.Server.Implementations.Notifications; +using Emby.Server.Implementations.Persistence; +using Emby.Server.Implementations.Playlists; +using Emby.Server.Implementations.ServerManager; +using Emby.Server.Implementations.Session; +using Emby.Server.Implementations.Sync; +using Emby.Server.Implementations.TV; +using Emby.Server.Implementations.Updates; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Globalization; @@ -120,11 +129,7 @@ using MediaBrowser.Model.Social; using MediaBrowser.Model.TextEncoding; using MediaBrowser.Model.Xml; using MediaBrowser.Server.Implementations.Archiving; -using MediaBrowser.Server.Implementations.Reflection; using MediaBrowser.Server.Implementations.Serialization; -using MediaBrowser.Server.Implementations.TextEncoding; -using MediaBrowser.Server.Implementations.Updates; -using MediaBrowser.Server.Implementations.Xml; using OpenSubtitlesHandler; using ServiceStack; using StringExtensions = MediaBrowser.Controller.Extensions.StringExtensions; @@ -530,7 +535,7 @@ namespace MediaBrowser.Server.Startup.Common SecurityManager = new PluginSecurityManager(this, HttpClient, JsonSerializer, ApplicationPaths, LogManager, FileSystemManager); RegisterSingleInstance(SecurityManager); - InstallationManager = new InstallationManager(LogManager.GetLogger("InstallationManager"), this, ApplicationPaths, HttpClient, JsonSerializer, SecurityManager, ConfigurationManager, FileSystemManager); + InstallationManager = new InstallationManager(LogManager.GetLogger("InstallationManager"), this, ApplicationPaths, HttpClient, JsonSerializer, SecurityManager, ConfigurationManager, FileSystemManager, CryptographyProvider); RegisterSingleInstance(InstallationManager); ZipClient = new ZipClient(FileSystemManager); @@ -577,7 +582,7 @@ namespace MediaBrowser.Server.Startup.Common SyncRepository = await GetSyncRepository().ConfigureAwait(false); RegisterSingleInstance(SyncRepository); - UserManager = new UserManager(LogManager.GetLogger("UserManager"), ServerConfigurationManager, UserRepository, XmlSerializer, NetworkManager, () => ImageProcessor, () => DtoService, () => ConnectManager, this, JsonSerializer, FileSystemManager); + UserManager = new UserManager(LogManager.GetLogger("UserManager"), ServerConfigurationManager, UserRepository, XmlSerializer, NetworkManager, () => ImageProcessor, () => DtoService, () => ConnectManager, this, JsonSerializer, FileSystemManager, CryptographyProvider, Environment.UserName); RegisterSingleInstance(UserManager); LibraryManager = new LibraryManager(Logger, TaskManager, UserManager, ServerConfigurationManager, UserDataManager, () => LibraryMonitor, FileSystemManager, () => ProviderManager, () => UserViewManager); @@ -586,7 +591,7 @@ namespace MediaBrowser.Server.Startup.Common var musicManager = new MusicManager(LibraryManager); RegisterSingleInstance<IMusicManager>(new MusicManager(LibraryManager)); - LibraryMonitor = new LibraryMonitor(LogManager, TaskManager, LibraryManager, ServerConfigurationManager, FileSystemManager, this); + LibraryMonitor = new LibraryMonitor(LogManager, TaskManager, LibraryManager, ServerConfigurationManager, FileSystemManager, TimerFactory); RegisterSingleInstance(LibraryMonitor); ProviderManager = new ProviderManager(HttpClient, ServerConfigurationManager, LibraryMonitor, LogManager, FileSystemManager, ApplicationPaths, () => LibraryManager, JsonSerializer, MemoryStreamProvider); @@ -599,7 +604,7 @@ namespace MediaBrowser.Server.Startup.Common RegisterSingleInstance(HttpServer, false); progress.Report(10); - ServerManager = new ServerManager(this, JsonSerializer, LogManager.GetLogger("ServerManager"), ServerConfigurationManager, MemoryStreamProvider); + ServerManager = new ServerManager(this, JsonSerializer, LogManager.GetLogger("ServerManager"), ServerConfigurationManager, MemoryStreamProvider, textEncoding); RegisterSingleInstance(ServerManager); var innerProgress = new ActionableProgress<double>(); @@ -626,7 +631,7 @@ namespace MediaBrowser.Server.Startup.Common DeviceManager = new DeviceManager(new DeviceRepository(ApplicationPaths, JsonSerializer, LogManager.GetLogger("DeviceManager"), FileSystemManager), UserManager, FileSystemManager, LibraryMonitor, ServerConfigurationManager, LogManager.GetLogger("DeviceManager"), NetworkManager); RegisterSingleInstance(DeviceManager); - var newsService = new Implementations.News.NewsService(ApplicationPaths, JsonSerializer); + var newsService = new Emby.Server.Implementations.News.NewsService(ApplicationPaths, JsonSerializer); RegisterSingleInstance<INewsService>(newsService); var fileOrganizationService = new FileOrganizationService(TaskManager, FileOrganizationRepository, LogManager.GetLogger("FileOrganizationService"), LibraryMonitor, LibraryManager, ServerConfigurationManager, FileSystemManager, ProviderManager); @@ -637,10 +642,10 @@ namespace MediaBrowser.Server.Startup.Common ChannelManager = new ChannelManager(UserManager, DtoService, LibraryManager, LogManager.GetLogger("ChannelManager"), ServerConfigurationManager, FileSystemManager, UserDataManager, JsonSerializer, LocalizationManager, HttpClient, ProviderManager); RegisterSingleInstance(ChannelManager); - MediaSourceManager = new MediaSourceManager(ItemRepository, UserManager, LibraryManager, LogManager.GetLogger("MediaSourceManager"), JsonSerializer, FileSystemManager, UserDataManager); + MediaSourceManager = new MediaSourceManager(ItemRepository, UserManager, LibraryManager, LogManager.GetLogger("MediaSourceManager"), JsonSerializer, FileSystemManager, UserDataManager, TimerFactory); RegisterSingleInstance(MediaSourceManager); - SessionManager = new SessionManager(UserDataManager, LogManager.GetLogger("SessionManager"), LibraryManager, UserManager, musicManager, DtoService, ImageProcessor, JsonSerializer, this, HttpClient, AuthenticationRepository, DeviceManager, MediaSourceManager); + SessionManager = new SessionManager(UserDataManager, LogManager.GetLogger("SessionManager"), LibraryManager, UserManager, musicManager, DtoService, ImageProcessor, JsonSerializer, this, HttpClient, AuthenticationRepository, DeviceManager, MediaSourceManager, TimerFactory); RegisterSingleInstance(SessionManager); var dlnaManager = new DlnaManager(XmlSerializer, FileSystemManager, ApplicationPaths, LogManager.GetLogger("Dlna"), JsonSerializer, this); @@ -1160,9 +1165,12 @@ namespace MediaBrowser.Server.Startup.Common // Common implementations list.Add(typeof(TaskManager).Assembly); - // Server implementations + // MediaBrowser.Server implementations list.Add(typeof(ServerApplicationPaths).Assembly); + // Emby.Server implementations + list.Add(typeof(InstallationManager).Assembly); + // MediaEncoding list.Add(typeof(MediaEncoder).Assembly); diff --git a/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs b/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs index 79debce8d..95b42afbf 100644 --- a/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs +++ b/MediaBrowser.Server.Startup.Common/EntryPoints/KeepServerAwake.cs @@ -4,7 +4,7 @@ using MediaBrowser.Controller.Session; using MediaBrowser.Model.Logging; using System; using System.Linq; -using MediaBrowser.Server.Implementations.Threading; +using MediaBrowser.Server.Startup.Common.Threading; namespace MediaBrowser.Server.Startup.Common.EntryPoints { diff --git a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj index 32d5d5f8e..4aecb11dc 100644 --- a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj +++ b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj @@ -38,12 +38,16 @@ <Reference Include="Emby.Dlna"> <HintPath>..\ThirdParty\emby\Emby.Dlna.dll</HintPath> </Reference> + <Reference Include="MediaBrowser.Naming, Version=1.0.6151.30291, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\MediaBrowser.Naming.1.0.0.59\lib\portable-net45+win8\MediaBrowser.Naming.dll</HintPath> + <Private>True</Private> + </Reference> <Reference Include="Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\packages\Mono.Posix.4.0.0.0\lib\net40\Mono.Posix.dll</HintPath> </Reference> - <Reference Include="Patterns.Logging, Version=1.0.6149.1756, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Patterns.Logging.1.0.0.4\lib\portable-net45+dnxcore50+sl4+wp71+win8+wpa81\Patterns.Logging.dll</HintPath> + <Reference Include="Patterns.Logging, Version=1.0.6151.30227, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\Patterns.Logging.1.0.0.6\lib\portable-net45+win8\Patterns.Logging.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="RSSDP"> @@ -91,6 +95,7 @@ <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="StartupOptions.cs" /> <Compile Include="SystemEvents.cs" /> + <Compile Include="Threading\PeriodicTimer.cs" /> <Compile Include="UnhandledExceptionWriter.cs" /> </ItemGroup> <ItemGroup> @@ -102,6 +107,10 @@ <Project>{89ab4548-770d-41fd-a891-8daff44f452c}</Project> <Name>Emby.Photos</Name> </ProjectReference> + <ProjectReference Include="..\Emby.Server.Implementations\Emby.Server.Implementations.csproj"> + <Project>{e383961b-9356-4d5d-8233-9a1079d03055}</Project> + <Name>Emby.Server.Implementations</Name> + </ProjectReference> <ProjectReference Include="..\MediaBrowser.Api\MediaBrowser.Api.csproj"> <Project>{4fd51ac5-2c16-4308-a993-c3a84f3b4582}</Project> <Name>MediaBrowser.Api</Name> diff --git a/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs b/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs index 4a1b4000e..e095275b1 100644 --- a/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs +++ b/MediaBrowser.Server.Startup.Common/Migrations/DbMigration.cs @@ -1,4 +1,5 @@ using System.Threading.Tasks; +using Emby.Server.Implementations.Persistence; using MediaBrowser.Controller.Configuration; using MediaBrowser.Model.Tasks; using MediaBrowser.Server.Implementations.Persistence; diff --git a/MediaBrowser.Server.Implementations/Threading/PeriodicTimer.cs b/MediaBrowser.Server.Startup.Common/Threading/PeriodicTimer.cs index 057a84483..3e898adfd 100644 --- a/MediaBrowser.Server.Implementations/Threading/PeriodicTimer.cs +++ b/MediaBrowser.Server.Startup.Common/Threading/PeriodicTimer.cs @@ -2,7 +2,7 @@ using System.Threading; using Microsoft.Win32; -namespace MediaBrowser.Server.Implementations.Threading +namespace MediaBrowser.Server.Startup.Common.Threading { public class PeriodicTimer : IDisposable { @@ -46,13 +46,13 @@ namespace MediaBrowser.Server.Implementations.Threading { _timer = new Timer(TimerCallback, _state, dueTime, _period); - SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged; + Microsoft.Win32.SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged; } } private void DisposeTimer() { - SystemEvents.PowerModeChanged -= SystemEvents_PowerModeChanged; + Microsoft.Win32.SystemEvents.PowerModeChanged -= SystemEvents_PowerModeChanged; lock (_timerLock) { diff --git a/MediaBrowser.Server.Startup.Common/packages.config b/MediaBrowser.Server.Startup.Common/packages.config index 6ebe8be2d..ea3d0e7f8 100644 --- a/MediaBrowser.Server.Startup.Common/packages.config +++ b/MediaBrowser.Server.Startup.Common/packages.config @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <packages> + <package id="MediaBrowser.Naming" version="1.0.0.59" targetFramework="net46" /> <package id="Mono.Posix" version="4.0.0.0" targetFramework="net45" /> - <package id="Patterns.Logging" version="1.0.0.4" targetFramework="net46" /> + <package id="Patterns.Logging" version="1.0.0.6" targetFramework="net46" /> <package id="SimpleInjector" version="3.2.4" targetFramework="net46" /> </packages>
\ No newline at end of file diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj index f2a53f742..a306274e1 100644 --- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj +++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj @@ -75,8 +75,8 @@ <HintPath>..\packages\NLog.4.4.0-betaV15\lib\net45\NLog.dll</HintPath> <Private>True</Private> </Reference> - <Reference Include="Patterns.Logging, Version=1.0.6149.1756, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Patterns.Logging.1.0.0.4\lib\portable-net45+dnxcore50+sl4+wp71+win8+wpa81\Patterns.Logging.dll</HintPath> + <Reference Include="Patterns.Logging, Version=1.0.6151.30227, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\Patterns.Logging.1.0.0.6\lib\portable-net45+win8\Patterns.Logging.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="ServiceStack.Interfaces"> diff --git a/MediaBrowser.ServerApplication/packages.config b/MediaBrowser.ServerApplication/packages.config index ff817d51a..8dbcaa2b9 100644 --- a/MediaBrowser.ServerApplication/packages.config +++ b/MediaBrowser.ServerApplication/packages.config @@ -2,6 +2,6 @@ <packages> <package id="ImageMagickSharp" version="1.0.0.18" targetFramework="net45" /> <package id="NLog" version="4.4.0-betaV15" targetFramework="net462" /> - <package id="Patterns.Logging" version="1.0.0.4" targetFramework="net462" /> + <package id="Patterns.Logging" version="1.0.0.6" targetFramework="net462" /> <package id="System.Data.SQLite.Core" version="1.0.103" targetFramework="net462" /> </packages>
\ No newline at end of file diff --git a/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj b/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj index 0a86e96a5..e84fa8e65 100644 --- a/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj +++ b/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj @@ -33,11 +33,6 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Patterns.Logging"> - <HintPath>..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll</HintPath> - </Reference> - </ItemGroup> - <ItemGroup> <Compile Include="..\SharedVersion.cs"> <Link>Properties\SharedVersion.cs</Link> </Compile> diff --git a/MediaBrowser.XbmcMetadata/packages.config b/MediaBrowser.XbmcMetadata/packages.config index 79ff26ec6..6b8deb9c9 100644 --- a/MediaBrowser.XbmcMetadata/packages.config +++ b/MediaBrowser.XbmcMetadata/packages.config @@ -1,4 +1,3 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="Patterns.Logging" version="1.0.0.2" targetFramework="net45" /> </packages>
\ No newline at end of file diff --git a/MediaBrowser.sln b/MediaBrowser.sln index bf226a699..34c50de38 100644 --- a/MediaBrowser.sln +++ b/MediaBrowser.sln @@ -62,18 +62,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DvdLib", "DvdLib\DvdLib.csp EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Emby.Common.Implementations", "Emby.Common.Implementations\Emby.Common.Implementations.xproj", "{5A27010A-09C6-4E86-93EA-437484C10917}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Mono.Nat", "Mono.Nat\Mono.Nat.xproj", "{0A82260B-4C22-4FD2-869A-E510044E3502}" - ProjectSection(ProjectDependencies) = postProject - {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B} = {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B} - {17E1F4E6-8ABD-4FE5-9ECF-43D4B6087BA2} = {17E1F4E6-8ABD-4FE5-9ECF-43D4B6087BA2} - {9142EEFA-7570-41E1-BFCC-468BB571AF2F} = {9142EEFA-7570-41E1-BFCC-468BB571AF2F} - EndProjectSection -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BDInfo", "BDInfo\BDInfo.csproj", "{88AE38DF-19D7-406F-A6A9-09527719A21E}" EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RSSDP", "RSSDP\RSSDP.xproj", "{C227ADB7-E256-4E70-A8B9-22B9E0CF4F55}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Server.Implementations", "Emby.Server.Implementations\Emby.Server.Implementations.csproj", "{E383961B-9356-4D5D-8233-9A1079D03055}" +EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Emby.Dlna", "Emby.Dlna\Emby.Dlna.xproj", "{F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RSSDP", "RSSDP\RSSDP.xproj", "{C227ADB7-E256-4E70-A8B9-22B9E0CF4F55}" +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Mono.Nat", "Mono.Nat\Mono.Nat.xproj", "{4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -539,36 +536,6 @@ Global {5A27010A-09C6-4E86-93EA-437484C10917}.Release|x64.Build.0 = Release|Any CPU {5A27010A-09C6-4E86-93EA-437484C10917}.Release|x86.ActiveCfg = Release|Any CPU {5A27010A-09C6-4E86-93EA-437484C10917}.Release|x86.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|Win32.ActiveCfg = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|Win32.Build.0 = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|x64.ActiveCfg = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|x64.Build.0 = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|x86.ActiveCfg = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Debug|x86.Build.0 = Debug|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|Any CPU.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|Any CPU.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|Mixed Platforms.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|Mixed Platforms.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|Win32.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|Win32.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|x64.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|x64.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|x86.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release Mono|x86.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|Any CPU.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|Win32.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|Win32.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|x64.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|x64.Build.0 = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|x86.ActiveCfg = Release|Any CPU - {0A82260B-4C22-4FD2-869A-E510044E3502}.Release|x86.Build.0 = Release|Any CPU {88AE38DF-19D7-406F-A6A9-09527719A21E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {88AE38DF-19D7-406F-A6A9-09527719A21E}.Debug|Any CPU.Build.0 = Debug|Any CPU {88AE38DF-19D7-406F-A6A9-09527719A21E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU @@ -599,36 +566,6 @@ Global {88AE38DF-19D7-406F-A6A9-09527719A21E}.Release|x64.Build.0 = Release|Any CPU {88AE38DF-19D7-406F-A6A9-09527719A21E}.Release|x86.ActiveCfg = Release|Any CPU {88AE38DF-19D7-406F-A6A9-09527719A21E}.Release|x86.Build.0 = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|Win32.ActiveCfg = Debug|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|Win32.Build.0 = Debug|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|x64.ActiveCfg = Debug|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|x64.Build.0 = Debug|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|x86.ActiveCfg = Debug|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|x86.Build.0 = Debug|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|Any CPU.ActiveCfg = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|Any CPU.Build.0 = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|Mixed Platforms.ActiveCfg = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|Mixed Platforms.Build.0 = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|Win32.ActiveCfg = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|Win32.Build.0 = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|x64.ActiveCfg = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|x64.Build.0 = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|x86.ActiveCfg = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|x86.Build.0 = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Any CPU.Build.0 = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Win32.ActiveCfg = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Win32.Build.0 = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|x64.ActiveCfg = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|x64.Build.0 = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|x86.ActiveCfg = Release|Any CPU - {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|x86.Build.0 = Release|Any CPU {C227ADB7-E256-4E70-A8B9-22B9E0CF4F55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C227ADB7-E256-4E70-A8B9-22B9E0CF4F55}.Debug|Any CPU.Build.0 = Debug|Any CPU {C227ADB7-E256-4E70-A8B9-22B9E0CF4F55}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU @@ -659,6 +596,96 @@ Global {C227ADB7-E256-4E70-A8B9-22B9E0CF4F55}.Release|x64.Build.0 = Release|Any CPU {C227ADB7-E256-4E70-A8B9-22B9E0CF4F55}.Release|x86.ActiveCfg = Release|Any CPU {C227ADB7-E256-4E70-A8B9-22B9E0CF4F55}.Release|x86.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|Win32.ActiveCfg = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|Win32.Build.0 = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|x64.ActiveCfg = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|x64.Build.0 = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|x86.ActiveCfg = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Debug|x86.Build.0 = Debug|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|Any CPU.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|Any CPU.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|Mixed Platforms.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|Mixed Platforms.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|Win32.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|Win32.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|x64.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|x64.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|x86.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release Mono|x86.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|Any CPU.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|Win32.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|Win32.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|x64.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|x64.Build.0 = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|x86.ActiveCfg = Release|Any CPU + {E383961B-9356-4D5D-8233-9A1079D03055}.Release|x86.Build.0 = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|Win32.ActiveCfg = Debug|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|Win32.Build.0 = Debug|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|x64.ActiveCfg = Debug|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|x64.Build.0 = Debug|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|x86.ActiveCfg = Debug|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Debug|x86.Build.0 = Debug|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|Any CPU.ActiveCfg = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|Any CPU.Build.0 = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|Mixed Platforms.ActiveCfg = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|Mixed Platforms.Build.0 = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|Win32.ActiveCfg = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|Win32.Build.0 = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|x64.ActiveCfg = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|x64.Build.0 = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|x86.ActiveCfg = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release Mono|x86.Build.0 = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Any CPU.Build.0 = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Win32.ActiveCfg = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|Win32.Build.0 = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|x64.ActiveCfg = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|x64.Build.0 = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|x86.ActiveCfg = Release|Any CPU + {F40E364D-01D9-4BBF-B82C-5D6C55E0A1F5}.Release|x86.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|Win32.ActiveCfg = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|Win32.Build.0 = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|x64.ActiveCfg = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|x64.Build.0 = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|x86.ActiveCfg = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Debug|x86.Build.0 = Debug|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|Any CPU.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|Any CPU.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|Mixed Platforms.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|Mixed Platforms.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|Win32.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|Win32.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|x64.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|x64.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|x86.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release Mono|x86.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|Any CPU.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|Win32.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|Win32.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|x64.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|x64.Build.0 = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|x86.ActiveCfg = Release|Any CPU + {4ACAB6A2-AC9A-4B50-BAEC-1FE4A1F3B8BC}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Mono.Nat/Mono.Nat.xproj b/Mono.Nat/Mono.Nat.xproj index f460bec58..3479a2a67 100644 --- a/Mono.Nat/Mono.Nat.xproj +++ b/Mono.Nat/Mono.Nat.xproj @@ -6,7 +6,7 @@ </PropertyGroup> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" /> <PropertyGroup Label="Globals"> - <ProjectGuid>0a82260b-4c22-4fd2-869a-e510044e3502</ProjectGuid> + <ProjectGuid>4acab6a2-ac9a-4b50-baec-1fe4a1f3b8bc</ProjectGuid> <RootNamespace>Mono.Nat</RootNamespace> <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath> <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath> diff --git a/Mono.Nat/Properties/AssemblyInfo.cs b/Mono.Nat/Properties/AssemblyInfo.cs index f8fe5c3ea..2a4e75c21 100644 --- a/Mono.Nat/Properties/AssemblyInfo.cs +++ b/Mono.Nat/Properties/AssemblyInfo.cs @@ -14,6 +14,3 @@ using System.Runtime.InteropServices; // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("0a82260b-4c22-4fd2-869a-e510044e3502")] diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index 544a63de9..c17450d2b 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> <metadata> <id>MediaBrowser.Common</id> - <version>3.0.681</version> + <version>3.0.682</version> <title>Emby.Common</title> <authors>Emby Team</authors> <owners>ebr,Luke,scottisafool</owners> @@ -13,8 +13,7 @@ <copyright>Copyright © Emby 2013</copyright> </metadata> <files> - <file src="dlls\MediaBrowser.Common.dll" target="lib\net45\MediaBrowser.Common.dll" /> - <file src="dlls\MediaBrowser.Model.dll" target="lib\net45\MediaBrowser.Model.dll" /> - <file src="dlls\MediaBrowser.Model.dll" target="lib\portable-net45+win8+wpa81\MediaBrowser.Model.dll" /> + <file src="dlls\MediaBrowser.Common.dll" target="lib\netstandard1.0\MediaBrowser.Common.dll" /> + <file src="dlls\MediaBrowser.Model.dll" target="lib\netstandard1.0\MediaBrowser.Model.dll" /> </files> </package> |
