aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Providers/MetadataRefreshOptions.cs
blob: 83f1a12d9119a6894e622a24003b3f9d9c0a3901 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;

namespace MediaBrowser.Controller.Providers
{
    public class MetadataRefreshOptions : ImageRefreshOptions
    {
        /// <summary>
        /// When paired with MetadataRefreshMode=FullRefresh, all existing data will be overwritten with new data from the providers.
        /// </summary>
        public bool ReplaceAllMetadata { get; set; }

        public MetadataRefreshMode MetadataRefreshMode { get; set; }

        /// <summary>
        /// TODO: deprecate. Keeping this for now, for api compatibility
        /// </summary>
        [Obsolete]
        public bool ForceSave { get; set; }
    }

    public class ImageRefreshOptions
    {
        public ImageRefreshMode ImageRefreshMode { get; set; }

        public ImageRefreshOptions()
        {
            ImageRefreshMode = ImageRefreshMode.Default;
        }
    }

    public enum MetadataRefreshMode
    {
        /// <summary>
        /// Providers will be executed based on default rules
        /// </summary>
        EnsureMetadata,

        /// <summary>
        /// No providers will be executed
        /// </summary>
        None,

        /// <summary>
        /// All providers will be executed to search for new metadata
        /// </summary>
        FullRefresh
    }

    public enum ImageRefreshMode
    {
        /// <summary>
        /// The default
        /// </summary>
        Default,

        /// <summary>
        /// Existing images will be validated
        /// </summary>
        ValidationOnly,

        /// <summary>
        /// All providers will be executed to search for new metadata
        /// </summary>
        FullRefresh
    }
}