Esempio n. 1
0
        // 获取歌词信息
        public static LyricVO GetLyricVO(LyricResult lyricResult, SearchInfo searchInfo, out string errorMsg)
        {
            LyricVO vo = new LyricVO();

            if (searchInfo == null)
            {
                errorMsg = ErrorMsg.SONG_NOT_EXIST;
                return(vo);
            }
            if (lyricResult == null)
            {
                errorMsg = ErrorMsg.LRC_NOT_EXIST;
                return(vo);
            }

            try
            {
                if (lyricResult.Code == 200)
                {
                    string originLyric = "", originTLyric = "";
                    if (lyricResult.Lrc != null)
                    {
                        originLyric = lyricResult.Lrc.Lyric;
                    }
                    if (lyricResult.Tlyric != null)
                    {
                        originTLyric = lyricResult.Tlyric.Lyric;
                    }

                    vo.Lyric  = originLyric;
                    vo.TLyric = originTLyric;
                    vo.Output = GetOutputLyric(originLyric, originTLyric, searchInfo);
                }
                errorMsg = ErrorMsg.SUCCESS;
            }
            catch (Exception ew)
            {
                errorMsg = ew.Message;
                Console.WriteLine(ew);
            }

            return(vo);
        }
Esempio n. 2
0
 public SaveVO(string songId, SongVO songVO, LyricVO lyricVO)
 {
     this.songId  = songId;
     this.songVO  = songVO;
     this.lyricVO = lyricVO;
 }