コード例 #1
0
ファイル: PeopleValidator.cs プロジェクト: ChubbyArse/Emby
        private bool DownloadMetadata(PersonInfo i, PeopleMetadataOptions options)
        {
            if (i.IsType(PersonType.Actor))
            {
                return options.DownloadActorMetadata;
            }
            if (i.IsType(PersonType.Director))
            {
                return options.DownloadDirectorMetadata;
            }
            if (i.IsType(PersonType.Composer))
            {
                return options.DownloadComposerMetadata;
            }
            if (i.IsType(PersonType.Writer))
            {
                return options.DownloadWriterMetadata;
            }
            if (i.IsType(PersonType.Producer))
            {
                return options.DownloadProducerMetadata;
            }
            if (i.IsType(PersonType.GuestStar))
            {
                return options.DownloadGuestStarMetadata;
            }

            return options.DownloadOtherPeopleMetadata;
        }
コード例 #2
0
        private IEnumerable<PersonInfo> GetPeopleToValidate(BaseItem item, PeopleMetadataOptions options)
        {
            return item.People.Where(i =>
            {
                if (i.IsType(PersonType.Actor))
                {
                    return options.DownloadActorMetadata;
                }
                if (i.IsType(PersonType.Director))
                {
                    return options.DownloadDirectorMetadata;
                }
                if (i.IsType(PersonType.Composer))
                {
                    return options.DownloadComposerMetadata;
                }
                if (i.IsType(PersonType.Writer))
                {
                    return options.DownloadWriterMetadata;
                }
                if (i.IsType(PersonType.Producer))
                {
                    return options.DownloadProducerMetadata;
                }
                if (i.IsType(PersonType.GuestStar))
                {
                    return options.DownloadGuestStarMetadata;
                }

                return options.DownloadOtherPeopleMetadata;
            });
        }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
        /// </summary>
        public ServerConfiguration()
        {
            LocalNetworkAddresses    = new string[] { };
            Migrations               = new string[] { };
            CodecsUsed               = new string[] { };
            SqliteCacheSize          = 0;
            ImageExtractionTimeoutMs = 0;

            EnableLocalizedGuids               = true;
            DisplaySpecialsWithinSeasons       = true;
            EnableExternalContentInSuggestions = true;

            ImageSavingConvention               = ImageSavingConvention.Compatible;
            PublicPort                          = 8096;
            PublicHttpsPort                     = 8920;
            HttpServerPortNumber                = 8096;
            HttpsPortNumber                     = 8920;
            EnableHttps                         = false;
            EnableDashboardResponseCaching      = true;
            EnableDashboardResourceMinification = true;
            EnableAnonymousUsageReporting       = true;

            EnableAutomaticRestart = true;
            EnableFolderView       = true;

            EnableUPnP            = true;
            SharingExpirationDays = 30;
            MinResumePct          = 5;
            MaxResumePct          = 90;

            // 5 minutes
            MinResumeDurationSeconds = 300;

            LibraryMonitorDelay = 60;

            EnableInternetProviders = true;

            PathSubstitutions = new PathSubstitution[] { };
            ContentTypes      = new NameValuePair[] { };

            PreferredMetadataLanguage = "en";
            MetadataCountryCode       = "US";

            SortReplaceCharacters = new[] { ".", "+", "%" };
            SortRemoveCharacters  = new[] { ",", "&", "-", "{", "}", "'" };
            SortRemoveWords       = new[] { "the", "a", "an" };

            SeasonZeroDisplayName = "Specials";

            UICulture = "en-us";

            PeopleMetadataOptions = new PeopleMetadataOptions();

            MetadataOptions = new[]
            {
                new MetadataOptions(1, 1280)
                {
                    ItemType = "Book"
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType     = "Movie",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 1,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Art
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Disc
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType     = "MusicVideo",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 1,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Art
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Disc
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType     = "Series",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 1,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Art
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType     = "MusicAlbum",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 0,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Disc
                        }
                    },
                    DisabledMetadataFetchers = new [] { "TheAudioDB" }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType     = "MusicArtist",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 1,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        // Don't download this by default
                        // They do look great, but most artists won't have them, which means a banner view isn't really possible
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Banner
                        },

                        // Don't download this by default
                        // Generally not used
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Art
                        },

                        // Don't download this by default
                        // Generally not used
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Logo
                        }
                    },
                    DisabledMetadataFetchers = new [] { "TheAudioDB" }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType     = "BoxSet",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 1,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Logo
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Art
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Disc
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Banner
                        }
                    }
                },

                new MetadataOptions(0, 1280)
                {
                    ItemType     = "Season",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 0,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Thumb
                        }
                    },
                    DisabledMetadataFetchers = new [] { "The Open Movie Database", "TheMovieDb" }
                },

                new MetadataOptions(0, 1280)
                {
                    ItemType     = "Episode",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 0,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Primary
                        }
                    },
                    DisabledMetadataFetchers = new [] { "The Open Movie Database" },
                    DisabledImageFetchers    = new [] { "TheMovieDb" }
                }
            };
        }
コード例 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
        /// </summary>
        public ServerConfiguration()
            : base()
        {
            MediaEncodingQuality           = EncodingQuality.Auto;
            ImageSavingConvention          = ImageSavingConvention.Compatible;
            PublicPort                     = 8096;
            HttpServerPortNumber           = 8096;
            EnableDashboardResponseCaching = true;

            EnableAutomaticRestart       = true;
            EnablePeoplePrefixSubFolders = true;

            EnableUPnP        = true;
            DownMixAudioBoost = 2;

            MinResumePct = 5;
            MaxResumePct = 90;

            // 5 minutes
            MinResumeDurationSeconds = 300;

            RealtimeMonitorDelay = 30;

            EnableInternetProviders = true;
            FindInternetTrailers    = true;

            PathSubstitutions = new PathSubstitution[] { };

            PreferredMetadataLanguage = "en";
            MetadataCountryCode       = "US";

            SortReplaceCharacters = new[] { ".", "+", "%" };
            SortRemoveCharacters  = new[] { ",", "&", "-", "{", "}", "'" };
            SortRemoveWords       = new[] { "the", "a", "an" };

            SeasonZeroDisplayName = "Specials";

            EnableRealtimeMonitor = true;

            UICulture = "en-us";

            PeopleMetadataOptions = new PeopleMetadataOptions();

            InsecureApps2 = new[]
            {
                "Roku",
                "Chromecast",
                "iOS",
                "Android",
                "Windows Phone"
            };

            MetadataOptions = new[]
            {
                new MetadataOptions(1, 1280)
                {
                    ItemType = "Book"
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType     = "MusicAlbum",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 1,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Disc
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType     = "MusicArtist",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 1,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        // Don't download this by default
                        // They do look great, but most artists won't have them, which means a banner view isn't really possible
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Banner
                        },

                        // Don't download this by default
                        // Generally not used
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Art
                        }
                    }
                },

                new MetadataOptions(0, 1280)
                {
                    ItemType = "Season"
                }
            };
        }
コード例 #5
0
ファイル: ServerConfiguration.cs プロジェクト: softworkz/Emby
        /// <summary>
        /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
        /// </summary>
        public ServerConfiguration()
        {
            LocalNetworkAddresses = new string[] { };
            Migrations = new string[] { };
            SqliteCacheSize = 0;

            EnableLocalizedGuids = true;
            DisplaySpecialsWithinSeasons = true;

            ImageSavingConvention = ImageSavingConvention.Compatible;
            PublicPort = 8096;
            PublicHttpsPort = 8920;
            HttpServerPortNumber = 8096;
            HttpsPortNumber = 8920;
            EnableHttps = false;
            EnableDashboardResponseCaching = true;
            EnableDashboardResourceMinification = true;
            EnableAnonymousUsageReporting = true;

            EnableAutomaticRestart = true;

            EnableUPnP = true;
            SharingExpirationDays = 30;
            MinResumePct = 5;
            MaxResumePct = 90;

            // 5 minutes
            MinResumeDurationSeconds = 300;

            EnableLibraryMonitor = AutoOnOff.Auto;
            LibraryMonitorDelay = 60;

            EnableInternetProviders = true;
            FindInternetTrailers = true;

            PathSubstitutions = new PathSubstitution[] { };
            ContentTypes = new NameValuePair[] { };

            PreferredMetadataLanguage = "en";
            MetadataCountryCode = "US";

            SortReplaceCharacters = new[] { ".", "+", "%" };
            SortRemoveCharacters = new[] { ",", "&", "-", "{", "}", "'" };
            SortRemoveWords = new[] { "the", "a", "an" };

            SeasonZeroDisplayName = "Specials";

            UICulture = "en-us";

            PeopleMetadataOptions = new PeopleMetadataOptions();

            MetadataOptions = new[]
            {
                new MetadataOptions(1, 1280) {ItemType = "Book"},

                new MetadataOptions(1, 1280)
                {
                    ItemType = "Movie",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Disc
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "MusicVideo",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Disc
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "Series",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "MusicAlbum",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 0,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Disc
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "MusicArtist",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default
                        // They do look great, but most artists won't have them, which means a banner view isn't really possible
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Banner
                        },

                        // Don't download this by default
                        // Generally not used
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        },

                        // Don't download this by default
                        // Generally not used
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "BoxSet",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Logo
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Disc
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Banner
                        }
                    }
                },

                new MetadataOptions(0, 1280)
                {
                    ItemType = "Season",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 0,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Thumb
                        }
                    },
                    DisabledMetadataFetchers = new []{ "The Open Movie Database", "TheMovieDb" }
                },

                new MetadataOptions(0, 1280)
                {
                    ItemType = "Episode",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 0,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        }
                    },
                    DisabledMetadataFetchers = new []{ "The Open Movie Database" },
                    DisabledImageFetchers = new []{ "TheMovieDb" }
                }
            };
        }
コード例 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
        /// </summary>
        public ServerConfiguration()
            : base()
        {
            ImageSavingConvention               = ImageSavingConvention.Compatible;
            PublicPort                          = 8096;
            PublicHttpsPort                     = 8920;
            HttpServerPortNumber                = 8096;
            HttpsPortNumber                     = 8920;
            EnableHttps                         = false;
            EnableDashboardResponseCaching      = true;
            EnableDashboardResourceMinification = true;

            EnableAutomaticRestart = true;

            EnableUPnP = true;

            MinResumePct = 5;
            MaxResumePct = 90;

            // 5 minutes
            MinResumeDurationSeconds = 300;

            RealtimeMonitorDelay = 30;

            EnableInternetProviders = true;
            FindInternetTrailers    = true;

            PathSubstitutions = new PathSubstitution[] { };
            ContentTypes      = new NameValuePair[] { };

            PreferredMetadataLanguage = "en";
            MetadataCountryCode       = "US";

            SortReplaceCharacters = new[] { ".", "+", "%" };
            SortRemoveCharacters  = new[] { ",", "&", "-", "{", "}", "'" };
            SortRemoveWords       = new[] { "the", "a", "an" };

            SeasonZeroDisplayName = "Specials";

            EnableRealtimeMonitor = true;

            UICulture = "en-us";

            PeopleMetadataOptions = new PeopleMetadataOptions();

            InsecureApps8 = new[]
            {
                "Chromecast",
                "iOS",
                "Unknown app",
                "MediaPortal",
                "Media Portal",
                "iPad",
                "iPhone",
                "Roku",
                "Windows Phone"
            };

            MetadataOptions = new[]
            {
                new MetadataOptions(1, 1280)
                {
                    ItemType = "Book"
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType     = "Movie",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 3,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Art
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Disc
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType     = "Series",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 2,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Art
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type  = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType     = "MusicAlbum",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 1,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Disc
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType     = "MusicArtist",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit    = 1,
                            MinWidth = 1280,
                            Type     = ImageType.Backdrop
                        },

                        // Don't download this by default
                        // They do look great, but most artists won't have them, which means a banner view isn't really possible
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Banner
                        },

                        // Don't download this by default
                        // Generally not used
                        new ImageOption
                        {
                            Limit = 0,
                            Type  = ImageType.Art
                        }
                    }
                },

                new MetadataOptions(0, 1280)
                {
                    ItemType = "Season"
                }
            };
        }
コード例 #7
0
ファイル: ServerConfiguration.cs プロジェクト: raven-au/Emby
        /// <summary>
        /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
        /// </summary>
        public ServerConfiguration()
        {
            ImageSavingConvention = ImageSavingConvention.Compatible;
            PublicPort = 8096;
            PublicHttpsPort = 8920;
            HttpServerPortNumber = 8096;
            HttpsPortNumber = 8920;
            EnableHttps = false;
            EnableDashboardResponseCaching = true;
            EnableDashboardResourceMinification = true;

            EnableAutomaticRestart = true;
            DenyIFrameEmbedding = true;

            EnableUPnP = true;

            SharingExpirationDays = 30;
            MinResumePct = 5;
            MaxResumePct = 90;

            // 5 minutes
            MinResumeDurationSeconds = 300;

            EnableLibraryMonitor = AutoOnOff.Auto;
            RealtimeLibraryMonitorDelay = 40;

            EnableInternetProviders = true;
            FindInternetTrailers = true;

            PathSubstitutions = new PathSubstitution[] { };
            ContentTypes = new NameValuePair[] { };

            PreferredMetadataLanguage = "en";
            MetadataCountryCode = "US";

            SortReplaceCharacters = new[] { ".", "+", "%" };
            SortRemoveCharacters = new[] { ",", "&", "-", "{", "}", "'" };
            SortRemoveWords = new[] { "the", "a", "an" };

            SeasonZeroDisplayName = "Specials";

            UICulture = "en-us";

            PeopleMetadataOptions = new PeopleMetadataOptions();

            EnableVideoFrameAnalysis = true;
            VideoFrameAnalysisLimitBytes = 600000000;

            InsecureApps9 = new[]
            {
                "Chromecast",
                "iOS",
                "Unknown app",
                "iPad",
                "iPhone",
                "Windows Phone"
            };

            MetadataOptions = new[]
            {
                new MetadataOptions(1, 1280) {ItemType = "Book"},

                new MetadataOptions(1, 1280)
                {
                    ItemType = "Movie",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Disc
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "MusicVideo",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Disc
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "Series",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "MusicAlbum",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 0,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Disc
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "MusicArtist",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default
                        // They do look great, but most artists won't have them, which means a banner view isn't really possible
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Banner
                        },

                        // Don't download this by default
                        // Generally not used
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        },

                        // Don't download this by default
                        // Generally not used
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "BoxSet",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Logo
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Disc
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Banner
                        }
                    }
                },

                new MetadataOptions(0, 1280)
                {
                    ItemType = "Season",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 0,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Thumb
                        }
                    }
                }
            };
        }
コード例 #8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
        /// </summary>
        public ServerConfiguration()
            : base()
        {
            ImageSavingConvention = ImageSavingConvention.Compatible;
            PublicPort = 8096;
            HttpServerPortNumber = 8096;
            EnableDashboardResponseCaching = true;

            EnableAutomaticRestart = true;
            EnableWin8HttpListener = true;

            EnableUPnP = true;

            MinResumePct = 5;
            MaxResumePct = 90;

            // 5 minutes
            MinResumeDurationSeconds = 300;

            RealtimeMonitorDelay = 30;

            EnableInternetProviders = true;
            FindInternetTrailers = true;

            PathSubstitutions = new PathSubstitution[] { };
            ContentTypes = new NameValuePair[] { };

            PreferredMetadataLanguage = "en";
            MetadataCountryCode = "US";

            SortReplaceCharacters = new[] { ".", "+", "%" };
            SortRemoveCharacters = new[] { ",", "&", "-", "{", "}", "'" };
            SortRemoveWords = new[] { "the", "a", "an" };

            SeasonZeroDisplayName = "Specials";

            EnableRealtimeMonitor = true;

            UICulture = "en-us";

            PeopleMetadataOptions = new PeopleMetadataOptions();

            InsecureApps7 = new[]
            {
                "Chromecast",
                "iOS",
                "Unknown app",
                "MediaPortal",
                "Media Portal",
                "iPad",
                "iPhone",
                "Roku"
            };

            MetadataOptions = new[]
            {
                new MetadataOptions(1, 1280) {ItemType = "Book"},

                new MetadataOptions(1, 1280)
                {
                    ItemType = "Movie",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 3,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Disc
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "Series",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 2,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Primary
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Banner
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Thumb
                        },

                        new ImageOption
                        {
                            Limit = 1,
                            Type = ImageType.Logo
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "MusicAlbum",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Disc
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "MusicArtist",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default
                        // They do look great, but most artists won't have them, which means a banner view isn't really possible
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Banner
                        },

                        // Don't download this by default
                        // Generally not used
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        }
                    }
                },

                new MetadataOptions(0, 1280) {ItemType = "Season"}
            };
        }
コード例 #9
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
        /// </summary>
        public ServerConfiguration()
            : base()
        {
            MediaEncodingQuality = EncodingQuality.Auto;
            ImageSavingConvention = ImageSavingConvention.Compatible;
            HttpServerPortNumber = 8096;
            EnableDashboardResponseCaching = true;

            EnableAutomaticRestart = true;
            EnablePeoplePrefixSubFolders = true;

            EnableUPnP = true;
            DownMixAudioBoost = 2;

            MinResumePct = 5;
            MaxResumePct = 90;

            // 5 minutes
            MinResumeDurationSeconds = 300;

            RealtimeMonitorDelay = 30;

            EnableInternetProviders = true; 

            PathSubstitutions = new PathSubstitution[] { };

            PreferredMetadataLanguage = "en";
            MetadataCountryCode = "US";

            SortReplaceCharacters = new[] { ".", "+", "%" };
            SortRemoveCharacters = new[] { ",", "&", "-", "{", "}", "'" };
            SortRemoveWords = new[] { "the", "a", "an" };

            SeasonZeroDisplayName = "Specials";

            EnableRealtimeMonitor = true;

            UICulture = "en-us";

            PeopleMetadataOptions = new PeopleMetadataOptions();

            SecureApps1 = new[]
            {
                "Dashboard",
                "MBKinect",
                "NuVue",
                "Media Browser Theater",

                //"Chrome Companion",
                //"MB-Classic"
            };

            MetadataOptions = new[]
            {
                new MetadataOptions(1, 1280) {ItemType = "Book"},

                new MetadataOptions(1, 1280)
                {
                    ItemType = "MusicAlbum",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default as it's rarely used.
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Disc
                        }
                    }
                },

                new MetadataOptions(1, 1280)
                {
                    ItemType = "MusicArtist",
                    ImageOptions = new []
                    {
                        new ImageOption
                        {
                            Limit = 1,
                            MinWidth = 1280,
                            Type = ImageType.Backdrop
                        },

                        // Don't download this by default
                        // They do look great, but most artists won't have them, which means a banner view isn't really possible
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Banner
                        },

                        // Don't download this by default
                        // Generally not used
                        new ImageOption
                        {
                            Limit = 0,
                            Type = ImageType.Art
                        }
                    }
                },

                new MetadataOptions(0, 1280) {ItemType = "Season"}
            };
        }