diff --git a/MediaBrowser.Controller/Entities/UserItemData.cs b/MediaBrowser.Controller/Entities/UserItemData.cs index 3e960d5275..8328e385b4 100644 --- a/MediaBrowser.Controller/Entities/UserItemData.cs +++ b/MediaBrowser.Controller/Entities/UserItemData.cs @@ -1,5 +1,4 @@ -using ProtoBuf; -using System; +using System; using System.Runtime.Serialization; namespace MediaBrowser.Controller.Entities @@ -7,14 +6,12 @@ namespace MediaBrowser.Controller.Entities /// /// Class UserItemData /// - [ProtoContract] public class UserItemData { /// /// Gets or sets the user id. /// /// The user id. - [ProtoMember(1)] public Guid UserId { get; set; } /// @@ -27,7 +24,6 @@ namespace MediaBrowser.Controller.Entities /// The rating. /// A 0-10 rating is required for UserItemData. /// A 0-10 rating is required for UserItemData. - [ProtoMember(2)] public float? Rating { get @@ -52,35 +48,30 @@ namespace MediaBrowser.Controller.Entities /// Gets or sets the playback position ticks. /// /// The playback position ticks. - [ProtoMember(3)] public long PlaybackPositionTicks { get; set; } /// /// Gets or sets the play count. /// /// The play count. - [ProtoMember(4)] public int PlayCount { get; set; } /// /// Gets or sets a value indicating whether this instance is favorite. /// /// true if this instance is favorite; otherwise, false. - [ProtoMember(5)] public bool IsFavorite { get; set; } /// /// Gets or sets the last played date. /// /// The last played date. - [ProtoMember(6)] public DateTime? LastPlayedDate { get; set; } /// /// Gets or sets a value indicating whether this is played. /// /// true if played; otherwise, false. - [ProtoMember(7)] public bool Played { get; set; } /// diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 9dd558308c..33b0d3cb73 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -53,9 +53,6 @@ MinimumRecommendedRules.ruleset - - ..\packages\protobuf-net.2.0.0.621\lib\net40\protobuf-net.dll - @@ -199,9 +196,6 @@ MediaBrowser.Model - - - if $(ConfigurationName) == Release ( diff --git a/MediaBrowser.Controller/packages.config b/MediaBrowser.Controller/packages.config deleted file mode 100644 index bb2545c6fc..0000000000 --- a/MediaBrowser.Controller/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs index 9fc8d824f1..a8ee09be19 100644 --- a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs +++ b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs @@ -1,5 +1,4 @@ using MediaBrowser.Model.Updates; -using ProtoBuf; namespace MediaBrowser.Model.Configuration { @@ -8,48 +7,41 @@ namespace MediaBrowser.Model.Configuration /// ProtoInclude tells Protobuf about subclasses, /// The number 50 can be any number, so long as it doesn't clash with any of the ProtoMember numbers either here or in subclasses. /// - [ProtoContract, ProtoInclude(965, typeof(ServerConfiguration))] public class BaseApplicationConfiguration { /// /// Gets or sets a value indicating whether [enable debug level logging]. /// /// true if [enable debug level logging]; otherwise, false. - [ProtoMember(1)] public bool EnableDebugLevelLogging { get; set; } /// /// Enable automatically and silently updating of the application /// /// true if [enable auto update]; otherwise, false. - [ProtoMember(3)] public bool EnableAutoUpdate { get; set; } /// /// Gets of sets a value indicating the level of system updates (Release, Beta, Dev) /// - [ProtoMember(60)] public PackageVersionClass SystemUpdateLevel { get; set; } /// /// The number of days we should retain log files /// /// The log file retention days. - [ProtoMember(5)] public int LogFileRetentionDays { get; set; } /// /// Gets or sets a value indicating whether [run at startup]. /// /// true if [run at startup]; otherwise, false. - [ProtoMember(58)] public bool RunAtStartup { get; set; } /// /// Gets or sets a value indicating whether this instance is first run. /// /// true if this instance is first run; otherwise, false. - [ProtoMember(4)] public bool IsStartupWizardCompleted { get; set; } /// diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 0c18564ec8..33035987d7 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -1,6 +1,5 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.Weather; -using ProtoBuf; using System; namespace MediaBrowser.Model.Configuration @@ -8,212 +7,181 @@ namespace MediaBrowser.Model.Configuration /// /// Represents the server configuration. /// - [ProtoContract] public class ServerConfiguration : BaseApplicationConfiguration { /// /// Gets or sets a value indicating whether [enable HTTP level logging]. /// /// true if [enable HTTP level logging]; otherwise, false. - [ProtoMember(56)] public bool EnableHttpLevelLogging { get; set; } /// /// Gets or sets the HTTP server port number. /// /// The HTTP server port number. - [ProtoMember(2)] public int HttpServerPortNumber { get; set; } /// /// Gets or sets the legacy web socket port number. /// /// The legacy web socket port number. - [ProtoMember(59)] public int LegacyWebSocketPortNumber { get; set; } /// /// Gets or sets a value indicating whether [enable internet providers]. /// /// true if [enable internet providers]; otherwise, false. - [ProtoMember(6)] public bool EnableInternetProviders { get; set; } /// /// Gets or sets the zip code to use when displaying weather /// /// The weather location. - [ProtoMember(7)] public string WeatherLocation { get; set; } /// /// Gets or sets the weather unit to use when displaying weather /// /// The weather unit. - [ProtoMember(8)] public WeatherUnits WeatherUnit { get; set; } /// /// Gets or sets the metadata refresh days. /// /// The metadata refresh days. - [ProtoMember(9)] public int MetadataRefreshDays { get; set; } /// /// Gets or sets a value indicating whether [save local meta]. /// /// true if [save local meta]; otherwise, false. - [ProtoMember(10)] public bool SaveLocalMeta { get; set; } /// /// Gets or sets a value indicating whether [refresh item images]. /// /// true if [refresh item images]; otherwise, false. - [ProtoMember(11)] public bool RefreshItemImages { get; set; } /// /// Gets or sets the preferred metadata language. /// /// The preferred metadata language. - [ProtoMember(12)] public string PreferredMetadataLanguage { get; set; } /// /// Gets or sets the metadata country code. /// /// The metadata country code. - [ProtoMember(13)] public string MetadataCountryCode { get; set; } /// /// Gets or sets the size of the TMDB fetched poster. /// /// The size of the TMDB fetched poster. - [ProtoMember(14)] public string TmdbFetchedPosterSize { get; set; } /// /// Gets or sets the size of the TMDB fetched profile. /// /// The size of the TMDB fetched profile. - [ProtoMember(15)] public string TmdbFetchedProfileSize { get; set; } /// /// Gets or sets the size of the TMDB fetched backdrop. /// /// The size of the TMDB fetched backdrop. - [ProtoMember(16)] public string TmdbFetchedBackdropSize { get; set; } /// /// Gets or sets the max backdrops. /// /// The max backdrops. - [ProtoMember(17)] public int MaxBackdrops { get; set; } /// /// Options for specific art to download for movies. /// - [ProtoMember(40)] public ImageDownloadOptions DownloadMovieImages { get; set; } /// /// Options for specific art to download for Series. /// - [ProtoMember(41)] public ImageDownloadOptions DownloadSeriesImages { get; set; } /// /// Options for specific art to download for Seasons. /// - [ProtoMember(42)] public ImageDownloadOptions DownloadSeasonImages { get; set; } /// /// Options for specific art to download for MusicArtists. /// - [ProtoMember(43)] public ImageDownloadOptions DownloadMusicArtistImages { get; set; } /// /// Options for specific art to download for MusicAlbums. /// - [ProtoMember(44)] public ImageDownloadOptions DownloadMusicAlbumImages { get; set; } /// /// Gets or sets a value indicating whether [download TV season backdrops]. /// /// true if [download TV season banner]; otherwise, false. - [ProtoMember(52)] public bool DownloadHDFanArt { get; set; } /// /// Characters to be replaced with a ' ' in strings to create a sort name /// /// The sort replace characters. - [ProtoMember(27)] public string[] SortReplaceCharacters { get; set; } /// /// Characters to be removed from strings to create a sort name /// /// The sort remove characters. - [ProtoMember(28)] public string[] SortRemoveCharacters { get; set; } /// /// Words to be removed from strings to create a sort name /// /// The sort remove words. - [ProtoMember(29)] public string[] SortRemoveWords { get; set; } /// /// Show an output log window for debugging /// /// true if [show log window]; otherwise, false. - [ProtoMember(30)] public bool ShowLogWindow { get; set; } /// /// The list of types that will NOT be allowed to have internet providers run against them even if they are turned on. /// /// The internet provider exclude types. - [ProtoMember(32)] public string[] InternetProviderExcludeTypes { get; set; } /// /// Gets or sets the recent item days. /// /// The recent item days. - [ProtoMember(34)] public int RecentItemDays { get; set; } /// /// Gets or sets the minimum percentage of an item that must be played in order for playstate to be updated. /// /// The min resume PCT. - [ProtoMember(36)] public int MinResumePct { get; set; } /// /// Gets or sets the maximum percentage of an item that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched. /// /// The max resume PCT. - [ProtoMember(37)] public int MaxResumePct { get; set; } /// /// Gets or sets the minimum duration that an item must have in order to be eligible for playstate updates.. /// /// The min resume duration seconds. - [ProtoMember(38)] public int MinResumeDurationSeconds { get; set; } /// @@ -222,14 +190,12 @@ namespace MediaBrowser.Model.Configuration /// different directories and files. /// /// The file watcher delay. - [ProtoMember(55)] public int FileWatcherDelay { get; set; } /// /// Gets or sets a value indicating whether [enable developer tools]. /// /// true if [enable developer tools]; otherwise, false. - [ProtoMember(57)] public bool EnableDeveloperTools { get; set; } /// @@ -237,18 +203,14 @@ namespace MediaBrowser.Model.Configuration /// Allows potential contributors without visual studio to modify production dashboard code and test changes. /// /// true if [enable dashboard response caching]; otherwise, false. - [ProtoMember(61)] public bool EnableDashboardResponseCaching { get; set; } /// /// Allows the dashboard to be served from a custom path. /// /// The dashboard source path. - [ProtoMember(62)] public string DashboardSourcePath { get; set; } - // Next Proto number ====> 62 - /// /// Initializes a new instance of the class. /// diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs index d8db52977b..deb6fdb3d2 100644 --- a/MediaBrowser.Model/Configuration/UserConfiguration.cs +++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs @@ -1,53 +1,45 @@ -using ProtoBuf; - + namespace MediaBrowser.Model.Configuration { /// /// Class UserConfiguration /// - [ProtoContract] public class UserConfiguration { /// /// Gets or sets the max parental rating. /// /// The max parental rating. - [ProtoMember(1)] public int? MaxParentalRating { get; set; } /// /// Gets or sets a value indicating whether [use custom library]. /// /// true if [use custom library]; otherwise, false. - [ProtoMember(2)] public bool UseCustomLibrary { get; set; } /// /// Gets or sets a value indicating whether this instance is administrator. /// /// true if this instance is administrator; otherwise, false. - [ProtoMember(3)] public bool IsAdministrator { get; set; } /// /// Gets or sets the audio language preference. /// /// The audio language preference. - [ProtoMember(4)] public string AudioLanguagePreference { get; set; } /// /// Gets or sets the subtitle language preference. /// /// The subtitle language preference. - [ProtoMember(5)] public string SubtitleLanguagePreference { get; set; } /// /// Gets or sets a value indicating whether [use forced subtitles only]. /// /// true if [use forced subtitles only]; otherwise, false. - [ProtoMember(6)] public bool UseForcedSubtitlesOnly { get; set; } /// diff --git a/MediaBrowser.Model/Connectivity/ClientConnectionInfo.cs b/MediaBrowser.Model/Connectivity/ClientConnectionInfo.cs index a5e44f22ec..dc0c4508bc 100644 --- a/MediaBrowser.Model/Connectivity/ClientConnectionInfo.cs +++ b/MediaBrowser.Model/Connectivity/ClientConnectionInfo.cs @@ -1,5 +1,4 @@ using MediaBrowser.Model.Entities; -using ProtoBuf; using System; namespace MediaBrowser.Model.Connectivity @@ -7,56 +6,48 @@ namespace MediaBrowser.Model.Connectivity /// /// Class ClientConnectionInfo /// - [ProtoContract] public class ClientConnectionInfo { /// /// Gets or sets the user id. /// /// The user id. - [ProtoMember(1)] public string UserId { get; set; } /// /// Gets or sets the type of the client. /// /// The type of the client. - [ProtoMember(2)] public string Client { get; set; } /// /// Gets or sets the last activity date. /// /// The last activity date. - [ProtoMember(3)] public DateTime LastActivityDate { get; set; } /// /// Gets or sets the name of the device. /// /// The name of the device. - [ProtoMember(4)] public string DeviceName { get; set; } /// /// Gets or sets the now playing item. /// /// The now playing item. - [ProtoMember(5)] public BaseItemInfo NowPlayingItem { get; set; } /// /// Gets or sets the now playing position ticks. /// /// The now playing position ticks. - [ProtoMember(6)] public long? NowPlayingPositionTicks { get; set; } /// /// Gets or sets the device id. /// /// The device id. - [ProtoMember(7)] public string DeviceId { get; set; } } } diff --git a/MediaBrowser.Model/DTO/BaseItemDto.cs b/MediaBrowser.Model/DTO/BaseItemDto.cs index ac36d8b1a4..645814fc84 100644 --- a/MediaBrowser.Model/DTO/BaseItemDto.cs +++ b/MediaBrowser.Model/DTO/BaseItemDto.cs @@ -1,8 +1,7 @@ -using System.ComponentModel; -using MediaBrowser.Model.Entities; -using ProtoBuf; +using MediaBrowser.Model.Entities; using System; using System.Collections.Generic; +using System.ComponentModel; using System.Runtime.Serialization; namespace MediaBrowser.Model.Dto @@ -11,343 +10,294 @@ namespace MediaBrowser.Model.Dto /// This is strictly used as a data transfer object from the api layer. /// This holds information about a BaseItem in a format that is convenient for the client. /// - [ProtoContract] public class BaseItemDto : IHasProviderIds, INotifyPropertyChanged, IItemDto { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string Name { get; set; } /// /// Gets or sets the id. /// /// The id. - [ProtoMember(2)] public string Id { get; set; } /// /// Gets or sets the date created. /// /// The date created. - [ProtoMember(3)] public DateTime? DateCreated { get; set; } /// /// Gets or sets the name of the sort. /// /// The name of the sort. - [ProtoMember(4)] public string SortName { get; set; } /// /// Gets or sets the premiere date. /// /// The premiere date. - [ProtoMember(5)] public DateTime? PremiereDate { get; set; } /// /// Gets or sets the path. /// /// The path. - [ProtoMember(6)] public string Path { get; set; } /// /// Gets or sets the official rating. /// /// The official rating. - [ProtoMember(7)] public string OfficialRating { get; set; } /// /// Gets or sets the overview. /// /// The overview. - [ProtoMember(8)] public string Overview { get; set; } /// /// Gets or sets the taglines. /// /// The taglines. - [ProtoMember(9)] public List Taglines { get; set; } /// /// Gets or sets the genres. /// /// The genres. - [ProtoMember(10)] public List Genres { get; set; } /// /// Gets or sets the community rating. /// /// The community rating. - [ProtoMember(11)] public float? CommunityRating { get; set; } /// /// Gets or sets the run time ticks. /// /// The run time ticks. - [ProtoMember(12)] public long? RunTimeTicks { get; set; } /// /// Gets or sets the aspect ratio. /// /// The aspect ratio. - [ProtoMember(13)] public string AspectRatio { get; set; } /// /// Gets or sets the production year. /// /// The production year. - [ProtoMember(14)] public int? ProductionYear { get; set; } /// /// Gets or sets the index number. /// /// The index number. - [ProtoMember(15)] public int? IndexNumber { get; set; } /// /// Gets or sets the parent index number. /// /// The parent index number. - [ProtoMember(16)] public int? ParentIndexNumber { get; set; } /// /// Gets or sets the trailer urls. /// /// The trailer urls. - [ProtoMember(17)] public List TrailerUrls { get; set; } /// /// Gets or sets the provider ids. /// /// The provider ids. - [ProtoMember(18)] public Dictionary ProviderIds { get; set; } /// /// Gets or sets the language. /// /// The language. - [ProtoMember(24)] public string Language { get; set; } /// /// Gets or sets a value indicating whether this instance is folder. /// /// true if this instance is folder; otherwise, false. - [ProtoMember(25)] public bool IsFolder { get; set; } /// /// Gets or sets the parent id. /// /// The parent id. - [ProtoMember(28)] public string ParentId { get; set; } /// /// Gets or sets the type. /// /// The type. - [ProtoMember(29)] public string Type { get; set; } /// /// Gets or sets the people. /// /// The people. - [ProtoMember(30)] public BaseItemPerson[] People { get; set; } /// /// Gets or sets the studios. /// /// The studios. - [ProtoMember(31)] public List Studios { get; set; } /// /// If the item does not have a logo, this will hold the Id of the Parent that has one. /// /// The parent logo item id. - [ProtoMember(32)] public string ParentLogoItemId { get; set; } /// /// If the item does not have any backdrops, this will hold the Id of the Parent that has one. /// /// The parent backdrop item id. - [ProtoMember(33)] public string ParentBackdropItemId { get; set; } /// /// Gets or sets the parent backdrop image tags. /// /// The parent backdrop image tags. - [ProtoMember(34)] public List ParentBackdropImageTags { get; set; } /// /// Gets or sets the local trailer count. /// /// The local trailer count. - [ProtoMember(35)] public int? LocalTrailerCount { get; set; } /// /// User data for this item based on the user it's being requested for /// /// The user data. - [ProtoMember(36)] public UserItemDataDto UserData { get; set; } /// /// Gets or sets the recently added item count. /// /// The recently added item count. - [ProtoMember(38)] public int? RecentlyAddedItemCount { get; set; } /// /// Gets or sets the played percentage. /// /// The played percentage. - [ProtoMember(41)] public double? PlayedPercentage { get; set; } /// /// Gets or sets the recursive item count. /// /// The recursive item count. - [ProtoMember(42)] public int? RecursiveItemCount { get; set; } /// /// Gets or sets the child count. /// /// The child count. - [ProtoMember(44)] public int? ChildCount { get; set; } /// /// Gets or sets the name of the series. /// /// The name of the series. - [ProtoMember(45)] public string SeriesName { get; set; } /// /// Gets or sets the series id. /// /// The series id. - [ProtoMember(46)] public string SeriesId { get; set; } /// /// Gets or sets the special feature count. /// /// The special feature count. - [ProtoMember(48)] public int? SpecialFeatureCount { get; set; } /// /// Gets or sets the display preferences id. /// /// The display preferences id. - [ProtoMember(49)] public string DisplayPreferencesId { get; set; } /// /// Gets or sets the status. /// /// The status. - [ProtoMember(50)] public SeriesStatus? Status { get; set; } /// /// Gets or sets the air time. /// /// The air time. - [ProtoMember(51)] public string AirTime { get; set; } /// /// Gets or sets the air days. /// /// The air days. - [ProtoMember(52)] public List AirDays { get; set; } /// /// Gets or sets the index options. /// /// The index options. - [ProtoMember(54)] public string[] IndexOptions { get; set; } /// /// Gets or sets the primary image aspect ratio. /// /// The primary image aspect ratio. - [ProtoMember(55)] public double? PrimaryImageAspectRatio { get; set; } /// /// Gets or sets the artist. /// /// The artist. - [ProtoMember(56)] public string Artist { get; set; } /// /// Gets or sets the album. /// /// The album. - [ProtoMember(57)] public string Album { get; set; } /// /// Gets or sets the album artist. /// /// The album artist. - [ProtoMember(58)] public string AlbumArtist { get; set; } /// /// Gets or sets the media streams. /// /// The media streams. - [ProtoMember(59)] public List MediaStreams { get; set; } /// /// Gets or sets the type of the video. /// /// The type of the video. - [ProtoMember(60)] public VideoType? VideoType { get; set; } /// /// Gets or sets the display type of the media. /// /// The display type of the media. - [ProtoMember(61)] public string DisplayMediaType { get; set; } /// @@ -374,98 +324,84 @@ namespace MediaBrowser.Model.Dto /// Gets or sets the image tags. /// /// The image tags. - [ProtoMember(62)] public Dictionary ImageTags { get; set; } /// /// Gets or sets the backdrop image tags. /// /// The backdrop image tags. - [ProtoMember(63)] public List BackdropImageTags { get; set; } /// /// Gets or sets the parent logo image tag. /// /// The parent logo image tag. - [ProtoMember(64)] public Guid? ParentLogoImageTag { get; set; } /// /// Gets or sets the chapters. /// /// The chapters. - [ProtoMember(65)] public List Chapters { get; set; } /// /// Gets or sets the video format. /// /// The video format. - [ProtoMember(66)] public VideoFormat? VideoFormat { get; set; } /// /// Gets or sets the type of the location. /// /// The type of the location. - [ProtoMember(67)] public LocationType LocationType { get; set; } /// /// Gets or sets the type of the iso. /// /// The type of the iso. - [ProtoMember(68)] public IsoType? IsoType { get; set; } /// /// Gets or sets the type of the media. /// /// The type of the media. - [ProtoMember(69)] public string MediaType { get; set; } /// /// Gets or sets the overview HTML. /// /// The overview HTML. - [ProtoMember(70)] public string OverviewHtml { get; set; } /// /// Gets or sets the end date. /// /// The end date. - [ProtoMember(71)] public DateTime? EndDate { get; set; } /// /// Gets or sets the home page URL. /// /// The home page URL. - [ProtoMember(72)] public string HomePageUrl { get; set; } /// /// Gets or sets the production locations. /// /// The production locations. - [ProtoMember(73)] public List ProductionLocations { get; set; } /// /// Gets or sets the budget. /// /// The budget. - [ProtoMember(74)] public double? Budget { get; set; } /// /// Gets or sets the revenue. /// /// The revenue. - [ProtoMember(75)] public double? Revenue { get; set; } /// diff --git a/MediaBrowser.Model/DTO/BaseItemPerson.cs b/MediaBrowser.Model/DTO/BaseItemPerson.cs index 2bdca84c1c..9fd5e1a8ad 100644 --- a/MediaBrowser.Model/DTO/BaseItemPerson.cs +++ b/MediaBrowser.Model/DTO/BaseItemPerson.cs @@ -1,5 +1,4 @@ -using ProtoBuf; -using System; +using System; using System.ComponentModel; using System.Runtime.Serialization; @@ -8,35 +7,30 @@ namespace MediaBrowser.Model.Dto /// /// This is used by the api to get information about a Person within a BaseItem /// - [ProtoContract] public class BaseItemPerson : INotifyPropertyChanged { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string Name { get; set; } /// /// Gets or sets the role. /// /// The role. - [ProtoMember(2)] public string Role { get; set; } /// /// Gets or sets the type. /// /// The type. - [ProtoMember(3)] public string Type { get; set; } /// /// Gets or sets the primary image tag. /// /// The primary image tag. - [ProtoMember(4)] public Guid? PrimaryImageTag { get; set; } /// diff --git a/MediaBrowser.Model/DTO/ChapterInfoDto.cs b/MediaBrowser.Model/DTO/ChapterInfoDto.cs index c52f1cadc9..caa609a767 100644 --- a/MediaBrowser.Model/DTO/ChapterInfoDto.cs +++ b/MediaBrowser.Model/DTO/ChapterInfoDto.cs @@ -1,5 +1,4 @@ -using ProtoBuf; -using System; +using System; using System.ComponentModel; using System.Runtime.Serialization; @@ -8,28 +7,24 @@ namespace MediaBrowser.Model.Dto /// /// Class ChapterInfo /// - [ProtoContract] public class ChapterInfoDto : INotifyPropertyChanged { /// /// Gets or sets the start position ticks. /// /// The start position ticks. - [ProtoMember(1)] public long StartPositionTicks { get; set; } /// /// Gets or sets the name. /// /// The name. - [ProtoMember(2)] public string Name { get; set; } /// /// Gets or sets the image tag. /// /// The image tag. - [ProtoMember(3)] public Guid? ImageTag { get; set; } /// diff --git a/MediaBrowser.Model/DTO/UserDto.cs b/MediaBrowser.Model/DTO/UserDto.cs index b2afa90c0f..ca173a0e85 100644 --- a/MediaBrowser.Model/DTO/UserDto.cs +++ b/MediaBrowser.Model/DTO/UserDto.cs @@ -1,6 +1,5 @@ using System.ComponentModel; using MediaBrowser.Model.Configuration; -using ProtoBuf; using System; using System.Runtime.Serialization; @@ -9,63 +8,54 @@ namespace MediaBrowser.Model.Dto /// /// Class UserDto /// - [ProtoContract] public class UserDto : INotifyPropertyChanged, IItemDto { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string Name { get; set; } /// /// Gets or sets the id. /// /// The id. - [ProtoMember(2)] public string Id { get; set; } /// /// Gets or sets the primary image tag. /// /// The primary image tag. - [ProtoMember(3)] public Guid? PrimaryImageTag { get; set; } /// /// Gets or sets a value indicating whether this instance has password. /// /// true if this instance has password; otherwise, false. - [ProtoMember(4)] public bool HasPassword { get; set; } /// /// Gets or sets the last login date. /// /// The last login date. - [ProtoMember(5)] public DateTime? LastLoginDate { get; set; } /// /// Gets or sets the last activity date. /// /// The last activity date. - [ProtoMember(6)] public DateTime? LastActivityDate { get; set; } /// /// Gets or sets the configuration. /// /// The configuration. - [ProtoMember(7)] public UserConfiguration Configuration { get; set; } /// /// Gets or sets the primary image aspect ratio. /// /// The primary image aspect ratio. - [ProtoMember(8)] public double? PrimaryImageAspectRatio { get; set; } /// diff --git a/MediaBrowser.Model/DTO/UserItemDataDto.cs b/MediaBrowser.Model/DTO/UserItemDataDto.cs index b7459d0ed4..96e270f21e 100644 --- a/MediaBrowser.Model/DTO/UserItemDataDto.cs +++ b/MediaBrowser.Model/DTO/UserItemDataDto.cs @@ -1,62 +1,53 @@ using System; using System.ComponentModel; -using ProtoBuf; namespace MediaBrowser.Model.Dto { /// /// Class UserItemDataDto /// - [ProtoContract] public class UserItemDataDto : INotifyPropertyChanged { /// /// Gets or sets the rating. /// /// The rating. - [ProtoMember(1)] public float? Rating { get; set; } /// /// Gets or sets the playback position ticks. /// /// The playback position ticks. - [ProtoMember(2)] public long PlaybackPositionTicks { get; set; } /// /// Gets or sets the play count. /// /// The play count. - [ProtoMember(3)] public int PlayCount { get; set; } /// /// Gets or sets a value indicating whether this instance is favorite. /// /// true if this instance is favorite; otherwise, false. - [ProtoMember(4)] public bool IsFavorite { get; set; } /// /// Gets or sets a value indicating whether this is likes. /// /// null if [likes] contains no value, true if [likes]; otherwise, false. - [ProtoMember(5)] public bool? Likes { get; set; } /// /// Gets or sets the last played date. /// /// The last played date. - [ProtoMember(6)] public DateTime? LastPlayedDate { get; set; } /// /// Gets or sets a value indicating whether this is played. /// /// true if played; otherwise, false. - [ProtoMember(7)] public bool Played { get; set; } public event PropertyChangedEventHandler PropertyChanged; diff --git a/MediaBrowser.Model/Entities/BaseItemInfo.cs b/MediaBrowser.Model/Entities/BaseItemInfo.cs index c7483f0735..dc7b3bebe8 100644 --- a/MediaBrowser.Model/Entities/BaseItemInfo.cs +++ b/MediaBrowser.Model/Entities/BaseItemInfo.cs @@ -1,5 +1,4 @@ -using ProtoBuf; -using System; +using System; using System.Runtime.Serialization; namespace MediaBrowser.Model.Entities @@ -7,56 +6,48 @@ namespace MediaBrowser.Model.Entities /// /// This is a stub class containing only basic information about an item /// - [ProtoContract] public class BaseItemInfo { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string Name { get; set; } /// /// Gets or sets the id. /// /// The id. - [ProtoMember(2)] public string Id { get; set; } /// /// Gets or sets the type. /// /// The type. - [ProtoMember(3)] public string Type { get; set; } /// /// Gets or sets a value indicating whether this instance is folder. /// /// true if this instance is folder; otherwise, false. - [ProtoMember(4)] public bool IsFolder { get; set; } /// /// Gets or sets the run time ticks. /// /// The run time ticks. - [ProtoMember(5)] public long? RunTimeTicks { get; set; } /// /// Gets or sets the primary image tag. /// /// The primary image tag. - [ProtoMember(6)] public Guid? PrimaryImageTag { get; set; } /// /// Gets or sets the backdrop image tag. /// /// The backdrop image tag. - [ProtoMember(7)] public Guid? BackdropImageTag { get; set; } /// diff --git a/MediaBrowser.Model/Entities/ChapterInfo.cs b/MediaBrowser.Model/Entities/ChapterInfo.cs index 72e2fe1fda..9da7a9caab 100644 --- a/MediaBrowser.Model/Entities/ChapterInfo.cs +++ b/MediaBrowser.Model/Entities/ChapterInfo.cs @@ -1,32 +1,27 @@ -using ProtoBuf; - + namespace MediaBrowser.Model.Entities { /// /// Class ChapterInfo /// - [ProtoContract] public class ChapterInfo { /// /// Gets or sets the start position ticks. /// /// The start position ticks. - [ProtoMember(1)] public long StartPositionTicks { get; set; } /// /// Gets or sets the name. /// /// The name. - [ProtoMember(2)] public string Name { get; set; } /// /// Gets or sets the image path. /// /// The image path. - [ProtoMember(3)] public string ImagePath { get; set; } } } diff --git a/MediaBrowser.Model/Entities/DisplayPreferences.cs b/MediaBrowser.Model/Entities/DisplayPreferences.cs index 31edab621b..009df26788 100644 --- a/MediaBrowser.Model/Entities/DisplayPreferences.cs +++ b/MediaBrowser.Model/Entities/DisplayPreferences.cs @@ -1,5 +1,4 @@ using MediaBrowser.Model.Drawing; -using ProtoBuf; using System; using System.Collections.Generic; @@ -8,7 +7,6 @@ namespace MediaBrowser.Model.Entities /// /// Defines the display preferences for any item that supports them (usually Folders) /// - [ProtoContract] public class DisplayPreferences { /// @@ -31,67 +29,56 @@ namespace MediaBrowser.Model.Entities /// Gets or sets the user id. /// /// The user id. - [ProtoMember(1)] public Guid Id { get; set; } /// /// Gets or sets the type of the view. /// /// The type of the view. - [ProtoMember(2)] public string ViewType { get; set; } /// /// Gets or sets the sort by. /// /// The sort by. - [ProtoMember(4)] public string SortBy { get; set; } /// /// Gets or sets the index by. /// /// The index by. - [ProtoMember(5)] public string IndexBy { get; set; } /// /// Gets or sets a value indicating whether [remember indexing]. /// /// true if [remember indexing]; otherwise, false. - [ProtoMember(6)] public bool RememberIndexing { get; set; } /// /// Gets or sets the height of the primary image. /// /// The height of the primary image. - [ProtoMember(7)] public int PrimaryImageHeight { get; set; } /// /// Gets or sets the width of the primary image. /// /// The width of the primary image. - [ProtoMember(8)] public int PrimaryImageWidth { get; set; } /// /// Gets or sets the custom prefs. /// /// The custom prefs. - [ProtoMember(9)] public Dictionary CustomPrefs { get; set; } /// /// Gets or sets the scroll direction. /// /// The scroll direction. - [ProtoMember(10)] public ScrollDirection ScrollDirection { get; set; } /// /// Gets or sets a value indicating whether [remember sorting]. /// /// true if [remember sorting]; otherwise, false. - [ProtoMember(11)] public bool RememberSorting { get; set; } /// /// Gets or sets the sort order. /// /// The sort order. - [ProtoMember(12)] public SortOrder SortOrder { get; set; } /// diff --git a/MediaBrowser.Model/Entities/ImageDownloadOptions.cs b/MediaBrowser.Model/Entities/ImageDownloadOptions.cs index b5c3ee3923..c69c759ac4 100644 --- a/MediaBrowser.Model/Entities/ImageDownloadOptions.cs +++ b/MediaBrowser.Model/Entities/ImageDownloadOptions.cs @@ -1,50 +1,41 @@ -using ProtoBuf; - + namespace MediaBrowser.Model.Entities { - [ProtoContract] public class ImageDownloadOptions { /// /// Download Art Image /// - [ProtoMember(1)] public bool Art { get; set; } /// /// Download Logo Image /// - [ProtoMember(2)] public bool Logo { get; set; } /// /// Download Primary Image /// - [ProtoMember(3)] public bool Primary { get; set; } /// /// Download Backdrop Images /// - [ProtoMember(4)] public bool Backdrops { get; set; } /// /// Download Disc Image /// - [ProtoMember(5)] public bool Disc { get; set; } /// /// Download Thumb Image /// - [ProtoMember(6)] public bool Thumb { get; set; } /// /// Download Banner Image /// - [ProtoMember(7)] public bool Banner { get; set; } } diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index b68ffe1186..657a20b8dd 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -1,151 +1,129 @@ -using ProtoBuf; - + namespace MediaBrowser.Model.Entities { /// /// Class MediaStream /// - [ProtoContract] public class MediaStream { /// /// Gets or sets the codec. /// /// The codec. - [ProtoMember(1)] public string Codec { get; set; } /// /// Gets or sets the language. /// /// The language. - [ProtoMember(2)] public string Language { get; set; } + /// + /// Gets or sets the type of the scan. + /// + /// The type of the scan. + public string ScanType { get; set; } + /// /// Gets or sets the bit rate. /// /// The bit rate. - [ProtoMember(3)] public int? BitRate { get; set; } /// /// Gets or sets the channels. /// /// The channels. - [ProtoMember(4)] public int? Channels { get; set; } /// /// Gets or sets the sample rate. /// /// The sample rate. - [ProtoMember(5)] public int? SampleRate { get; set; } /// /// Gets or sets a value indicating whether this instance is default. /// /// true if this instance is default; otherwise, false. - [ProtoMember(6)] public bool IsDefault { get; set; } /// /// Gets or sets a value indicating whether this instance is forced. /// /// true if this instance is forced; otherwise, false. - [ProtoMember(7)] public bool IsForced { get; set; } /// /// Gets or sets the height. /// /// The height. - [ProtoMember(8)] public int? Height { get; set; } /// /// Gets or sets the width. /// /// The width. - [ProtoMember(9)] public int? Width { get; set; } - /// - /// Gets or sets the type of the scan. - /// - /// The type of the scan. - [ProtoMember(10)] - public string ScanType { get; set; } - /// /// Gets or sets the average frame rate. /// /// The average frame rate. - [ProtoMember(11)] public float? AverageFrameRate { get; set; } /// /// Gets or sets the real frame rate. /// /// The real frame rate. - [ProtoMember(12)] public float? RealFrameRate { get; set; } /// /// Gets or sets the profile. /// /// The profile. - [ProtoMember(13)] public string Profile { get; set; } /// /// Gets or sets the type. /// /// The type. - [ProtoMember(14)] public MediaStreamType Type { get; set; } /// /// Gets or sets the aspect ratio. /// /// The aspect ratio. - [ProtoMember(15)] public string AspectRatio { get; set; } /// /// Gets or sets the index. /// /// The index. - [ProtoMember(16)] public int Index { get; set; } /// /// Gets or sets a value indicating whether this instance is external. /// /// true if this instance is external; otherwise, false. - [ProtoMember(17)] public bool IsExternal { get; set; } /// /// Gets or sets the filename. /// /// The filename. - [ProtoMember(18)] public string Path { get; set; } /// /// Gets or sets the level. /// /// The level. - [ProtoMember(19)] public double? Level { get; set; } /// /// Gets or sets the pixel format. /// /// The pixel format. - [ProtoMember(20)] public string PixelFormat { get; set; } } diff --git a/MediaBrowser.Model/Entities/ParentalRating.cs b/MediaBrowser.Model/Entities/ParentalRating.cs index bc3c43c2a6..e2d1c65742 100644 --- a/MediaBrowser.Model/Entities/ParentalRating.cs +++ b/MediaBrowser.Model/Entities/ParentalRating.cs @@ -1,25 +1,21 @@ -using ProtoBuf; - + namespace MediaBrowser.Model.Entities { /// /// Class ParentalRating /// - [ProtoContract] public class ParentalRating { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string Name { get; set; } /// /// Gets or sets the value. /// /// The value. - [ProtoMember(2)] public int Value { get; set; } } } diff --git a/MediaBrowser.Model/Entities/PluginSecurityInfo.cs b/MediaBrowser.Model/Entities/PluginSecurityInfo.cs index 53cbbdbfae..e338e43f88 100644 --- a/MediaBrowser.Model/Entities/PluginSecurityInfo.cs +++ b/MediaBrowser.Model/Entities/PluginSecurityInfo.cs @@ -1,32 +1,27 @@ -using ProtoBuf; - + namespace MediaBrowser.Model.Entities { /// /// Class PluginSecurityInfo /// - [ProtoContract] public class PluginSecurityInfo { /// /// Gets or sets the supporter key. /// /// The supporter key. - [ProtoMember(1)] public string SupporterKey { get; set; } /// /// Gets or sets the legacy supporter key. /// /// The legacy supporter key - [ProtoMember(2)] public string LegacyKey { get; set; } /// /// Gets or sets a value indicating whether this instance is MB supporter. /// /// true if this instance is MB supporter; otherwise, false. - [ProtoMember(3)] public bool IsMBSupporter { get; set; } } } diff --git a/MediaBrowser.Model/Entities/RequestResult.cs b/MediaBrowser.Model/Entities/RequestResult.cs index 88bd6e2ecd..5c9a725fd9 100644 --- a/MediaBrowser.Model/Entities/RequestResult.cs +++ b/MediaBrowser.Model/Entities/RequestResult.cs @@ -1,8 +1,6 @@ -using ProtoBuf; - + namespace MediaBrowser.Model.Entities { - [ProtoContract] public class EmptyRequestResult { } diff --git a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs index 390e51d422..be584e40e3 100644 --- a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs +++ b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs @@ -1,26 +1,22 @@ -using ProtoBuf; -using System.Collections.Generic; +using System.Collections.Generic; namespace MediaBrowser.Model.Entities { /// /// Used to hold information about a user's list of configured virtual folders /// - [ProtoContract] public class VirtualFolderInfo { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string Name { get; set; } /// /// Gets or sets the locations. /// /// The locations. - [ProtoMember(2)] public List Locations { get; set; } } } diff --git a/MediaBrowser.Model/Globalization/CountryInfo.cs b/MediaBrowser.Model/Globalization/CountryInfo.cs index b952527638..16aea8436b 100644 --- a/MediaBrowser.Model/Globalization/CountryInfo.cs +++ b/MediaBrowser.Model/Globalization/CountryInfo.cs @@ -1,39 +1,33 @@ -using ProtoBuf; - + namespace MediaBrowser.Model.Globalization { /// /// Class CountryInfo /// - [ProtoContract] public class CountryInfo { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string Name { get; set; } /// /// Gets or sets the display name. /// /// The display name. - [ProtoMember(2)] public string DisplayName { get; set; } /// /// Gets or sets the name of the two letter ISO region. /// /// The name of the two letter ISO region. - [ProtoMember(3)] public string TwoLetterISORegionName { get; set; } /// /// Gets or sets the name of the three letter ISO region. /// /// The name of the three letter ISO region. - [ProtoMember(4)] public string ThreeLetterISORegionName { get; set; } } } diff --git a/MediaBrowser.Model/Globalization/CultureDto.cs b/MediaBrowser.Model/Globalization/CultureDto.cs index cd9507026a..414d7b9d41 100644 --- a/MediaBrowser.Model/Globalization/CultureDto.cs +++ b/MediaBrowser.Model/Globalization/CultureDto.cs @@ -1,39 +1,33 @@ -using ProtoBuf; - + namespace MediaBrowser.Model.Globalization { /// /// Class CultureDto /// - [ProtoContract] public class CultureDto { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string Name { get; set; } /// /// Gets or sets the display name. /// /// The display name. - [ProtoMember(2)] public string DisplayName { get; set; } /// /// Gets or sets the name of the two letter ISO language. /// /// The name of the two letter ISO language. - [ProtoMember(3)] public string TwoLetterISOLanguageName { get; set; } /// /// Gets or sets the name of the three letter ISO language. /// /// The name of the three letter ISO language. - [ProtoMember(4)] public string ThreeLetterISOLanguageName { get; set; } } } diff --git a/MediaBrowser.Model/IO/FileSystemEntryInfo.cs b/MediaBrowser.Model/IO/FileSystemEntryInfo.cs index e6cfaa5359..dc4840456c 100644 --- a/MediaBrowser.Model/IO/FileSystemEntryInfo.cs +++ b/MediaBrowser.Model/IO/FileSystemEntryInfo.cs @@ -1,32 +1,27 @@ -using ProtoBuf; - + namespace MediaBrowser.Model.IO { /// /// Class FileSystemEntryInfo /// - [ProtoContract] public class FileSystemEntryInfo { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string Name { get; set; } /// /// Gets or sets the path. /// /// The path. - [ProtoMember(2)] public string Path { get; set; } /// /// Gets or sets the type. /// /// The type. - [ProtoMember(3)] public FileSystemEntryType Type { get; set; } } diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index 9df35463cc..e60fe9c2d6 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -83,7 +83,6 @@ - @@ -129,9 +128,6 @@ ..\packages\PropertyChanged.Fody.1.32.2.0\lib\portable-net4+sl4+wp7+win8\PropertyChanged.dll - - ..\packages\protobuf-net.2.0.0.621\lib\portable-sl4+net40+wp7+windows8\protobuf-net.dll - diff --git a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs index 1a05cfe091..79c63aa6b3 100644 --- a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs +++ b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs @@ -1,5 +1,4 @@ using MediaBrowser.Model.Entities; -using ProtoBuf; using System.Collections.Generic; namespace MediaBrowser.Model.MediaInfo @@ -7,35 +6,30 @@ namespace MediaBrowser.Model.MediaInfo /// /// Represents the result of BDInfo output /// - [ProtoContract] public class BlurayDiscInfo { /// /// Gets or sets the media streams. /// /// The media streams. - [ProtoMember(1)] public List MediaStreams { get; set; } /// /// Gets or sets the run time ticks. /// /// The run time ticks. - [ProtoMember(2)] public long? RunTimeTicks { get; set; } /// /// Gets or sets the files. /// /// The files. - [ProtoMember(3)] public List Files { get; set; } /// /// Gets or sets the chapters. /// /// The chapters. - [ProtoMember(4)] public List Chapters { get; set; } } } diff --git a/MediaBrowser.Model/Plugins/PluginInfo.cs b/MediaBrowser.Model/Plugins/PluginInfo.cs index fd4cfa78c2..fbc2e2927a 100644 --- a/MediaBrowser.Model/Plugins/PluginInfo.cs +++ b/MediaBrowser.Model/Plugins/PluginInfo.cs @@ -1,5 +1,4 @@ using MediaBrowser.Model.Updates; -using ProtoBuf; using System; namespace MediaBrowser.Model.Plugins @@ -7,56 +6,48 @@ namespace MediaBrowser.Model.Plugins /// /// This is a serializable stub class that is used by the api to provide information about installed plugins. /// - [ProtoContract] public class PluginInfo { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string Name { get; set; } /// /// Gets or sets the configuration date last modified. /// /// The configuration date last modified. - [ProtoMember(3)] public DateTime ConfigurationDateLastModified { get; set; } /// /// Gets or sets the version. /// /// The version. - [ProtoMember(4)] public string Version { get; set; } /// /// Gets or sets the name of the assembly file. /// /// The name of the assembly file. - [ProtoMember(5)] public string AssemblyFileName { get; set; } /// /// Gets or sets the name of the configuration file. /// /// The name of the configuration file. - [ProtoMember(6)] public string ConfigurationFileName { get; set; } /// /// Gets or sets the description. /// /// The description. - [ProtoMember(7)] public string Description { get; set; } /// /// Gets or sets the unique id. /// /// The unique id. - [ProtoMember(9)] public string Id { get; set; } /// @@ -64,7 +55,6 @@ namespace MediaBrowser.Model.Plugins /// compatible new version is released /// /// true if [enable auto update]; otherwise, false. - [ProtoMember(10)] public bool EnableAutoUpdate { get; set; } /// @@ -72,14 +62,12 @@ namespace MediaBrowser.Model.Plugins /// Options are: Dev, Beta or Release /// /// The update class. - [ProtoMember(11)] public PackageVersionClass UpdateClass { get; set; } /// /// Gets or sets the minimum required UI version. /// /// The minimum required UI version. - [ProtoMember(12)] public string MinimumRequiredUIVersion { get; set; } } } diff --git a/MediaBrowser.Model/Querying/ItemsResult.cs b/MediaBrowser.Model/Querying/ItemsResult.cs index f8393b7fc3..fe723f5532 100644 --- a/MediaBrowser.Model/Querying/ItemsResult.cs +++ b/MediaBrowser.Model/Querying/ItemsResult.cs @@ -1,26 +1,22 @@ using MediaBrowser.Model.Dto; -using ProtoBuf; namespace MediaBrowser.Model.Querying { /// /// Represents the result of a query for items /// - [ProtoContract] public class ItemsResult { /// /// The set of items returned based on sorting, paging, etc /// /// The items. - [ProtoMember(1)] public BaseItemDto[] Items { get; set; } /// /// The total number of records available /// /// The total record count. - [ProtoMember(2)] public int TotalRecordCount { get; set; } } } diff --git a/MediaBrowser.Model/Serialization/IProtobufSerializer.cs b/MediaBrowser.Model/Serialization/IProtobufSerializer.cs deleted file mode 100644 index 4c3ef69607..0000000000 --- a/MediaBrowser.Model/Serialization/IProtobufSerializer.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.IO; - -namespace MediaBrowser.Model.Serialization -{ - public interface IProtobufSerializer - { - /// - /// Serializes to stream. - /// - /// The obj. - /// The stream. - /// obj - void SerializeToStream(object obj, Stream stream); - - /// - /// Deserializes from stream. - /// - /// The stream. - /// The type. - /// System.Object. - /// stream - object DeserializeFromStream(Stream stream, Type type); - - /// - /// Deserializes from stream. - /// - /// - /// The stream. - /// ``0. - T DeserializeFromStream(Stream stream) - where T : class; - - /// - /// Serializes to file. - /// - /// - /// The obj. - /// The file. - /// file - void SerializeToFile(T obj, string file); - - /// - /// Deserializes from file. - /// - /// - /// The file. - /// ``0. - /// file - T DeserializeFromFile(string file) - where T : class; - - /// - /// Serializes to bytes. - /// - /// - /// The obj. - /// System.Byte[][]. - /// obj - byte[] SerializeToBytes(T obj) - where T : class; - } -} \ No newline at end of file diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs index afe0740882..6e2f26775e 100644 --- a/MediaBrowser.Model/System/SystemInfo.cs +++ b/MediaBrowser.Model/System/SystemInfo.cs @@ -1,76 +1,64 @@ using MediaBrowser.Model.Updates; -using ProtoBuf; -using System; namespace MediaBrowser.Model.System { /// /// Class SystemInfo /// - [ProtoContract] public class SystemInfo { /// /// Gets or sets the version. /// /// The version. - [ProtoMember(1)] public string Version { get; set; } /// /// Gets or sets a value indicating whether this instance has pending restart. /// /// true if this instance has pending restart; otherwise, false. - [ProtoMember(2)] public bool HasPendingRestart { get; set; } /// /// Gets or sets a value indicating whether this instance is network deployed. /// /// true if this instance is network deployed; otherwise, false. - [ProtoMember(3)] public bool IsNetworkDeployed { get; set; } /// /// Gets or sets the in progress installations. /// /// The in progress installations. - [ProtoMember(4)] public InstallationInfo[] InProgressInstallations { get; set; } /// /// Gets or sets the web socket port number. /// /// The web socket port number. - [ProtoMember(5)] public int WebSocketPortNumber { get; set; } /// /// Gets or sets the completed installations. /// /// The completed installations. - [ProtoMember(6)] public InstallationInfo[] CompletedInstallations { get; set; } /// /// Gets or sets a value indicating whether [supports native web socket]. /// /// true if [supports native web socket]; otherwise, false. - [ProtoMember(7)] public bool SupportsNativeWebSocket { get; set; } /// /// Gets or sets plugin assemblies that failed to load. /// /// The failed assembly loads. - [ProtoMember(8)] public string[] FailedPluginAssemblies { get; set; } /// /// Gets or sets the id. /// /// The id. - [ProtoMember(9)] public string Id { get; set; } } } diff --git a/MediaBrowser.Model/Tasks/TaskInfo.cs b/MediaBrowser.Model/Tasks/TaskInfo.cs index 50dcb30806..81c8372bd1 100644 --- a/MediaBrowser.Model/Tasks/TaskInfo.cs +++ b/MediaBrowser.Model/Tasks/TaskInfo.cs @@ -1,68 +1,58 @@ -using ProtoBuf; -using System; +using System; namespace MediaBrowser.Model.Tasks { /// /// Class TaskInfo /// - [ProtoContract] public class TaskInfo { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string Name { get; set; } /// /// Gets or sets the state of the task. /// /// The state of the task. - [ProtoMember(2)] public TaskState State { get; set; } /// /// Gets or sets the progress. /// /// The progress. - [ProtoMember(3)] public double? CurrentProgressPercentage { get; set; } /// /// Gets or sets the id. /// /// The id. - [ProtoMember(4)] public Guid Id { get; set; } /// /// Gets or sets the last execution result. /// /// The last execution result. - [ProtoMember(5)] public TaskResult LastExecutionResult { get; set; } /// /// Gets or sets the triggers. /// /// The triggers. - [ProtoMember(6)] public TaskTriggerInfo[] Triggers { get; set; } /// /// Gets or sets the description. /// /// The description. - [ProtoMember(7)] public string Description { get; set; } /// /// Gets or sets the category. /// /// The category. - [ProtoMember(8)] public string Category { get; set; } } } diff --git a/MediaBrowser.Model/Tasks/TaskResult.cs b/MediaBrowser.Model/Tasks/TaskResult.cs index 1a4853f4ef..46d2c86e7d 100644 --- a/MediaBrowser.Model/Tasks/TaskResult.cs +++ b/MediaBrowser.Model/Tasks/TaskResult.cs @@ -1,47 +1,40 @@ -using ProtoBuf; -using System; +using System; namespace MediaBrowser.Model.Tasks { /// /// Class TaskExecutionInfo /// - [ProtoContract] public class TaskResult { /// /// Gets or sets the start time UTC. /// /// The start time UTC. - [ProtoMember(1)] public DateTime StartTimeUtc { get; set; } /// /// Gets or sets the end time UTC. /// /// The end time UTC. - [ProtoMember(2)] public DateTime EndTimeUtc { get; set; } /// /// Gets or sets the status. /// /// The status. - [ProtoMember(3)] public TaskCompletionStatus Status { get; set; } /// /// Gets or sets the name. /// /// The name. - [ProtoMember(4)] public string Name { get; set; } /// /// Gets or sets the id. /// /// The id. - [ProtoMember(5)] public Guid Id { get; set; } } } diff --git a/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs b/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs index 68a5ac01b6..e03d859841 100644 --- a/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs +++ b/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs @@ -1,47 +1,40 @@ -using ProtoBuf; -using System; +using System; namespace MediaBrowser.Model.Tasks { /// /// Class TaskTriggerInfo /// - [ProtoContract] public class TaskTriggerInfo { /// /// Gets or sets the type. /// /// The type. - [ProtoMember(1)] public string Type { get; set; } /// /// Gets or sets the time of day. /// /// The time of day. - [ProtoMember(2)] public long? TimeOfDayTicks { get; set; } /// /// Gets or sets the interval. /// /// The interval. - [ProtoMember(3)] public long? IntervalTicks { get; set; } /// /// Gets or sets the system event. /// /// The system event. - [ProtoMember(4)] public SystemEvent? SystemEvent { get; set; } /// /// Gets or sets the day of week. /// /// The day of week. - [ProtoMember(5)] public DayOfWeek? DayOfWeek { get; set; } } } diff --git a/MediaBrowser.Model/Updates/InstallationInfo.cs b/MediaBrowser.Model/Updates/InstallationInfo.cs index 2e0cdb8e21..55848b8e54 100644 --- a/MediaBrowser.Model/Updates/InstallationInfo.cs +++ b/MediaBrowser.Model/Updates/InstallationInfo.cs @@ -1,47 +1,40 @@ -using ProtoBuf; -using System; +using System; namespace MediaBrowser.Model.Updates { /// /// Class InstallationInfo /// - [ProtoContract] public class InstallationInfo { /// /// Gets or sets the id. /// /// The id. - [ProtoMember(1)] public Guid Id { get; set; } /// /// Gets or sets the name. /// /// The name. - [ProtoMember(2)] public string Name { get; set; } /// /// Gets or sets the version. /// /// The version. - [ProtoMember(3)] public string Version { get; set; } /// /// Gets or sets the update class. /// /// The update class. - [ProtoMember(4)] public PackageVersionClass UpdateClass { get; set; } /// /// Gets or sets the percent complete. /// /// The percent complete. - [ProtoMember(5)] public double? PercentComplete { get; set; } } } diff --git a/MediaBrowser.Model/Updates/PackageInfo.cs b/MediaBrowser.Model/Updates/PackageInfo.cs index 416769cf5c..3313f39cfd 100644 --- a/MediaBrowser.Model/Updates/PackageInfo.cs +++ b/MediaBrowser.Model/Updates/PackageInfo.cs @@ -1,5 +1,4 @@ using System; -using ProtoBuf; using System.Collections.Generic; namespace MediaBrowser.Model.Updates @@ -7,140 +6,120 @@ namespace MediaBrowser.Model.Updates /// /// Class PackageInfo /// - [ProtoContract] public class PackageInfo { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string name { get; set; } /// /// Gets or sets the short description. /// /// The short description. - [ProtoMember(2)] public string shortDescription { get; set; } /// /// Gets or sets the overview. /// /// The overview. - [ProtoMember(3)] public string overview { get; set; } /// /// Gets or sets a value indicating whether this instance is premium. /// /// true if this instance is premium; otherwise, false. - [ProtoMember(4)] public bool isPremium { get; set; } /// /// Gets or sets the rich desc URL. /// /// The rich desc URL. - [ProtoMember(5)] public string richDescUrl { get; set; } /// /// Gets or sets the thumb image. /// /// The thumb image. - [ProtoMember(6)] public string thumbImage { get; set; } /// /// Gets or sets the preview image. /// /// The preview image. - [ProtoMember(7)] public string previewImage { get; set; } /// /// Gets or sets the type. /// /// The type. - [ProtoMember(8)] public PackageType type { get; set; } /// /// Gets or sets the target filename. /// /// The target filename. - [ProtoMember(9)] public string targetFilename { get; set; } /// /// Gets or sets the owner. /// /// The owner. - [ProtoMember(10)] public string owner { get; set; } /// /// Gets or sets the category. /// /// The category. - [ProtoMember(11)] public string category { get; set; } /// /// Gets or sets the catalog tile color. /// /// The owner. - [ProtoMember(12)] public string tileColor { get; set; } /// /// Gets or sets the feature id of this package (if premium). /// /// The feature id. - [ProtoMember(13)] public string featureId { get; set; } /// /// Gets or sets the registration info for this package (if premium). /// /// The registration info. - [ProtoMember(14)] public string regInfo { get; set; } /// /// Gets or sets the price for this package (if premium). /// /// The price. - [ProtoMember(15)] public float price { get; set; } /// /// Gets or sets the target system for this plug-in (Server, MBTheater, MBClassic). /// /// The target system. - [ProtoMember(16)] public PackageTargetSystem targetSystem { get; set; } /// /// Gets or sets whether or not this package is registered. /// /// True if registered. - [ProtoMember(17)] public bool isRegistered { get; set; } /// /// Gets or sets the expiration date for this package. /// /// Expiration Date. - [ProtoMember(18)] public DateTime expDate { get; set; } /// /// Gets or sets the versions. /// /// The versions. - [ProtoMember(19)] public List versions { get; set; } } } diff --git a/MediaBrowser.Model/Updates/PackageVersionInfo.cs b/MediaBrowser.Model/Updates/PackageVersionInfo.cs index 7f29ae1747..eb447795e4 100644 --- a/MediaBrowser.Model/Updates/PackageVersionInfo.cs +++ b/MediaBrowser.Model/Updates/PackageVersionInfo.cs @@ -1,5 +1,4 @@ using MediaBrowser.Model.Extensions; -using ProtoBuf; using System; using System.Runtime.Serialization; @@ -8,21 +7,18 @@ namespace MediaBrowser.Model.Updates /// /// Class PackageVersionInfo /// - [ProtoContract] public class PackageVersionInfo { /// /// Gets or sets the name. /// /// The name. - [ProtoMember(1)] public string name { get; set; } /// /// Gets or sets the version STR. /// /// The version STR. - [ProtoMember(2)] public string versionStr { get; set; } /// @@ -44,42 +40,36 @@ namespace MediaBrowser.Model.Updates /// Gets or sets the classification. /// /// The classification. - [ProtoMember(4)] public PackageVersionClass classification { get; set; } /// /// Gets or sets the description. /// /// The description. - [ProtoMember(5)] public string description { get; set; } /// /// Gets or sets the required version STR. /// /// The required version STR. - [ProtoMember(6)] public string requiredVersionStr { get; set; } /// /// Gets or sets the source URL. /// /// The source URL. - [ProtoMember(8)] public string sourceUrl { get; set; } /// /// Gets or sets the source URL. /// /// The source URL. - [ProtoMember(9)] public Guid checksum { get; set; } /// /// Gets or sets the target filename. /// /// The target filename. - [ProtoMember(10)] public string targetFilename { get; set; } } } diff --git a/MediaBrowser.Model/Weather/WeatherForecast.cs b/MediaBrowser.Model/Weather/WeatherForecast.cs index 20cce37809..0f9ecba5b0 100644 --- a/MediaBrowser.Model/Weather/WeatherForecast.cs +++ b/MediaBrowser.Model/Weather/WeatherForecast.cs @@ -1,54 +1,46 @@ using System; -using ProtoBuf; namespace MediaBrowser.Model.Weather { /// /// Represents a weather forecast for a specific date /// - [ProtoContract] public class WeatherForecast { /// /// Gets or sets the date. /// /// The date. - [ProtoMember(1)] public DateTime Date { get; set; } /// /// Gets or sets the high temperature fahrenheit. /// /// The high temperature fahrenheit. - [ProtoMember(2)] public int HighTemperatureFahrenheit { get; set; } /// /// Gets or sets the low temperature fahrenheit. /// /// The low temperature fahrenheit. - [ProtoMember(3)] public int LowTemperatureFahrenheit { get; set; } /// /// Gets or sets the high temperature celsius. /// /// The high temperature celsius. - [ProtoMember(4)] public int HighTemperatureCelsius { get; set; } /// /// Gets or sets the low temperature celsius. /// /// The low temperature celsius. - [ProtoMember(5)] public int LowTemperatureCelsius { get; set; } /// /// Gets or sets the condition. /// /// The condition. - [ProtoMember(6)] public WeatherConditions Condition { get; set; } } } diff --git a/MediaBrowser.Model/Weather/WeatherInfo.cs b/MediaBrowser.Model/Weather/WeatherInfo.cs index 57a9432f6c..8aad52cb2e 100644 --- a/MediaBrowser.Model/Weather/WeatherInfo.cs +++ b/MediaBrowser.Model/Weather/WeatherInfo.cs @@ -1,25 +1,21 @@ -using ProtoBuf; - + namespace MediaBrowser.Model.Weather { /// /// Class WeatherInfo /// - [ProtoContract] public class WeatherInfo { /// /// Gets or sets the current weather. /// /// The current weather. - [ProtoMember(1)] public WeatherStatus CurrentWeather { get; set; } /// /// Gets or sets the forecasts. /// /// The forecasts. - [ProtoMember(2)] public WeatherForecast[] Forecasts { get; set; } /// diff --git a/MediaBrowser.Model/Weather/WeatherStatus.cs b/MediaBrowser.Model/Weather/WeatherStatus.cs index 1e4eb10772..36f27b6312 100644 --- a/MediaBrowser.Model/Weather/WeatherStatus.cs +++ b/MediaBrowser.Model/Weather/WeatherStatus.cs @@ -1,39 +1,33 @@ -using ProtoBuf; - + namespace MediaBrowser.Model.Weather { /// /// Represents the current weather status /// - [ProtoContract] public class WeatherStatus { /// /// Gets or sets the temperature fahrenheit. /// /// The temperature fahrenheit. - [ProtoMember(1)] public int TemperatureFahrenheit { get; set; } /// /// Gets or sets the temperature celsius. /// /// The temperature celsius. - [ProtoMember(2)] public int TemperatureCelsius { get; set; } /// /// Gets or sets the humidity. /// /// The humidity. - [ProtoMember(3)] public int Humidity { get; set; } /// /// Gets or sets the condition. /// /// The condition. - [ProtoMember(4)] public WeatherConditions Condition { get; set; } } diff --git a/MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs b/MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs index 64a48c54d4..ab03bdd7d6 100644 --- a/MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs +++ b/MediaBrowser.Server.Implementations/Sqlite/SQLiteDisplayPreferencesRepository.cs @@ -46,7 +46,7 @@ namespace MediaBrowser.Server.Implementations.Sqlite } /// - /// The _protobuf serializer + /// The _json serializer /// private readonly IJsonSerializer _jsonSerializer; @@ -61,7 +61,11 @@ namespace MediaBrowser.Server.Implementations.Sqlite /// The app paths. /// The json serializer. /// The log manager. - /// protobufSerializer + /// + /// jsonSerializer + /// or + /// appPaths + /// public SQLiteDisplayPreferencesRepository(IApplicationPaths appPaths, IJsonSerializer jsonSerializer, ILogManager logManager) : base(logManager) { diff --git a/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserDataRepository.cs b/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserDataRepository.cs index 6a7207d37c..065cbd385d 100644 --- a/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserDataRepository.cs +++ b/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserDataRepository.cs @@ -61,7 +61,11 @@ namespace MediaBrowser.Server.Implementations.Sqlite /// The app paths. /// The json serializer. /// The log manager. - /// protobufSerializer + /// + /// jsonSerializer + /// or + /// appPaths + /// public SQLiteUserDataRepository(IApplicationPaths appPaths, IJsonSerializer jsonSerializer, ILogManager logManager) : base(logManager) {