Example #1
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
        /// <param name="_season0"></param>
        public Episode(Guid urlid, DateTime dateadded, global::Jellyfin.Data.Entities.Season _season0)
        {
            // NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem.
            // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.

            this.UrlId = urlid;

            if (_season0 == null)
            {
                throw new ArgumentNullException(nameof(_season0));
            }
            _season0.Episodes.Add(this);

            this.Releases        = new System.Collections.Generic.HashSet <global::Jellyfin.Data.Entities.Release>();
            this.EpisodeMetadata = new System.Collections.Generic.HashSet <global::Jellyfin.Data.Entities.EpisodeMetadata>();

            Init();
        }
Example #2
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
 /// <param name="_season0"></param>
 public static Episode Create(Guid urlid, DateTime dateadded, global::Jellyfin.Data.Entities.Season _season0)
 {
     return(new Episode(urlid, dateadded, _season0));
 }
Example #3
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="title">The title or name of the object</param>
 /// <param name="language">ISO-639-3 3-character language codes</param>
 /// <param name="_season0"></param>
 public static SeasonMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Season _season0)
 {
     return(new SeasonMetadata(title, language, dateadded, datemodified, _season0));
 }
Example #4
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="title">The title or name of the object</param>
        /// <param name="language">ISO-639-3 3-character language codes</param>
        /// <param name="_season0"></param>
        public SeasonMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Season _season0)
        {
            if (string.IsNullOrEmpty(title))
            {
                throw new ArgumentNullException(nameof(title));
            }
            this.Title = title;

            if (string.IsNullOrEmpty(language))
            {
                throw new ArgumentNullException(nameof(language));
            }
            this.Language = language;

            if (_season0 == null)
            {
                throw new ArgumentNullException(nameof(_season0));
            }
            _season0.SeasonMetadata.Add(this);


            Init();
        }