ChobiQ.DoubanFMAPICodePack.Song.Song C# (CSharp) Method

Song() private method

private Song ( JSong jSong ) : System
jSong JSong
return System
        internal Song(JSong jSong)
        {
            SongID          = jSong.sid;
            PictureURL      = jSong.picture;
            AlbumTitle      = jSong.albumtitle;
            AlbumURL        = "http://music.douban.com" + jSong.album;
            PublicationTime = jSong.public_time;
            Like            = jSong.like == "1";
            Artist          = jSong.artist;
            MediaURL        = jSong.url;
            Title           = jSong.title;
            Length          = TimeSpan.FromSeconds(
                Convert.ToInt32(jSong.length));

            ///Add by jasine 2012.10.10
            Publisher       = jSong.company;
            double rt=0;
            if(Double.TryParse(jSong.rating_avg,out rt))
            {
                Rating=Convert.ToByte((rt/5.0)*255);
                //豆瓣是5分制,ID3的分级信息为0-255,0为未知,微软MediaPlayer分:1,64,128,196,255共5级,区间内舍入分级
            }
            else
            {
                Rating=0;
            }
        }
Song