Esempio n. 1
0
        public virtual bool ContentEquals(LyricsForSongContract contract)
        {
            if (contract == null)
            {
                return(false);
            }

            return(Language == contract.Language && Source == contract.Source && Value == contract.Value);
        }
Esempio n. 2
0
        public LyricsForSongModel(LyricsForSongContract contract)
            : this()
        {
            ParamIs.NotNull(() => contract);

            Id       = contract.Id;
            Language = contract.Language;
            Source   = contract.Source;
            Value    = contract.Value;
        }
Esempio n. 3
0
        public virtual bool ContentEquals(LyricsForSongContract contract)
        {
            if (contract == null)
            {
                return(false);
            }

            return(TranslationType == contract.TranslationType &&
                   CultureCode.CultureCode == contract.CultureCode &&
                   Source == contract.Source &&
                   URL == contract.URL &&
                   Value == contract.Value);
        }
Esempio n. 4
0
        public SongDetailsAjax(SongDetails model, LyricsForSongContract preferredLyrics, int version)
        {
            Id                        = model.Id;
            UserRating                = model.UserRating;
            LatestComments            = model.LatestComments;
            OriginalVersion           = model.OriginalVersion;
            PersonalDescriptionAuthor = model.PersonalDescriptionAuthor;
            PersonalDescriptionText   = model.PersonalDescriptionText;
            Version                   = version;

            SelectedLyricsId = preferredLyrics != null ? preferredLyrics.Id : 0;
            SelectedPvId     = model.PrimaryPV != null ? model.PrimaryPV.Id : 0;
            SongType         = model.SongType;
            TagUsages        = model.Tags;

            LinkedPages = model.WebLinks.Select(w => w.Url).Where(RelatedSitesHelper.IsRelatedSite).ToArray();
        }
Esempio n. 5
0
        public SongDetailsAjax(SongDetails model, LyricsForSongContract preferredLyrics, int version)
        {
            Id              = model.Id;
            UserRating      = model.UserRating;
            LatestComments  = model.LatestComments;
            OriginalVersion = model.OriginalVersion;
            Version         = version;

            SelectedLyricsId = preferredLyrics != null ? preferredLyrics.Id : 0;
            SelectedPvId     = model.PrimaryPV != null ? model.PrimaryPV.Id : 0;
            SongType         = model.SongType;
            TagUsages        = model.Tags;

            var domains = new[] { "http://vocadb.net/", "http://utaitedb.net/" };

            LinkedPages = model.WebLinks.Where(w => domains.Any(d => w.Url.StartsWith(d, StringComparison.InvariantCultureIgnoreCase))).Select(w => w.Url).ToArray();
        }
Esempio n. 6
0
 public virtual LyricsForSong CreateLyrics(LyricsForSongContract lyrics)
 {
     ParamIs.NotNull(() => lyrics);
     return(CreateLyrics(lyrics.Value, lyrics.Source, lyrics.URL, lyrics.TranslationType, lyrics.CultureCode));
 }
Esempio n. 7
0
        public PartialViewResult CreateLyrics()
        {
            var entry = new LyricsForSongContract();

            return(PartialView("LyricsForSongEditRow", new LyricsForSongModel(entry)));
        }
Esempio n. 8
0
 public LyricsInfoViewModel(LyricsForSongContract lyrics)
 {
     Lyrics = lyrics;
 }