aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/AdultVideo.cs
blob: ec2913ab46d7f307e2d8924faeb1e4bb72557155 (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
using MediaBrowser.Controller.Providers;
using System;
using System.Collections.Generic;

namespace MediaBrowser.Controller.Entities
{
    [Obsolete]
    public class AdultVideo : Video, IHasProductionLocations, IHasTaglines
    {
        public List<string> ProductionLocations { get; set; }

        public List<string> Taglines { get; set; }

        public AdultVideo()
        {
            Taglines = new List<string>();
            ProductionLocations = new List<string>();
        }

        public override bool BeforeMetadataRefresh()
        {
            var hasChanges = base.BeforeMetadataRefresh();

            if (!ProductionYear.HasValue)
            {
                int? yearInName = null;
                string name;

                NameParser.ParseName(Name, out name, out yearInName);

                if (yearInName.HasValue)
                {
                    ProductionYear = yearInName;
                    hasChanges = true;
                }
            }

            return hasChanges;
        }
    }
}