void MusicLrcSearchTableWidget::musicDownloadLocal(int row)
{
    if(row < 0)
    {
        MusicMessageBox message;
        message.setText(tr("Please Select One Item First!"));
        message.exec();
        return;
    }
    MusicSongInfomations musicSongInfos(m_downLoadManager->getMusicSongInfo());

    MusicTextDownLoadThread* lrcDownload = new MusicTextDownLoadThread(musicSongInfos[row].m_lrcUrl,
                             LRC_DOWNLOAD_AL + m_currentSongName + LRC_FILE, Download_Lrc, this);
    connect(lrcDownload, SIGNAL(musicDownLoadFinished(QString)),
                         SIGNAL(lrcDownloadStateChanged(QString)));
    lrcDownload->startToDownload();
}
void MusicWebMusicRadioWidget::startToPlay()
{
    SongRadioInfo info;
    if(m_songsThread)
    {
        info = m_songsThread->getMusicSongInfo();
    }
    if(info.m_songUrl.isEmpty())
    {
        return;
    }

    delete m_radio;
    m_radio = new MusicCoreMPlayer(this);
    connect(m_radio, SIGNAL(positionChanged(qint64)), SLOT(positionChanged(qint64)));
    connect(m_radio, SIGNAL(durationChanged(qint64)), SLOT(durationChanged(qint64)));
    m_radio->setMedia(MusicCoreMPlayer::MusicCategory, info.m_songUrl, -1);
    m_radio->setVolume(ui->volumeSlider->value());

    QString name = LRC_DOWNLOAD_AL + info.m_artistName + " - " + info.m_songName + LRC_FILE;
    if(!QFile::exists(name))
    {
        MusicTextDownLoadThread* lrcDownload = new MusicTextDownLoadThread(info.m_lrcUrl, name,
                                 MusicDownLoadThreadAbstract::Download_Lrc, this);
        connect(lrcDownload, SIGNAL(musicDownLoadFinished(QString)), SLOT(lrcDownloadStateChanged()));
        lrcDownload->startToDownload();
    }
    else
    {
        lrcDownloadStateChanged();
    }

    name = ART_DOWNLOAD_AL + info.m_artistName + SKN_FILE;
    if(!QFile::exists(name))
    {
        MusicDataDownloadThread *picDwonload = new MusicDataDownloadThread(info.m_songPicUrl, name,
                                 MusicDownLoadThreadAbstract::Download_SmlBG, this);
        connect(picDwonload, SIGNAL(musicDownLoadFinished(QString)), SLOT(picDownloadStateChanged()));
        picDwonload->startToDownload();
    }
    else
    {
        picDownloadStateChanged();
    }
}
void MusicDownloadStatusLabel::musicHaveNoLrcAlready()
{
    if(!M_NETWORK->isOnline())
    {   //no network connection
        showDownLoadInfoFor(MusicObject::DisConnection);
        return;
    }
    MusicSongInfomations musicSongInfos(m_downloadLrcThread->getMusicSongInfos());
    if(!musicSongInfos.isEmpty())
    {
        QString filename = m_parentWidget->getCurrentFileName();
        int count = filename.split('-').count();
        QString artistName = filename.split('-').front().trimmed();
        QString songName = filename.split('-').back().trimmed();

        MusicSongInfomation musicSongInfo = musicSongInfos.first();
        foreach(MusicSongInfomation var, musicSongInfos)
        {
            if( var.m_singerName.contains(artistName, Qt::CaseInsensitive) &&
                var.m_songName.contains(songName, Qt::CaseInsensitive) )
            {
                musicSongInfo = var;
                break;
            }
        }

        ///download lrc
        MusicTextDownLoadThread* lrc = new MusicTextDownLoadThread(musicSongInfo.m_lrcUrl,
                                 LRC_DOWNLOAD_AL + filename + LRC_FILE,
                                 MusicDownLoadThreadAbstract::Download_Lrc, this);
        lrc->startToDownload();

        ///download art picture
#ifndef USE_MULTIPLE_QUERY
        (new MusicData2DownloadThread(musicSongInfo.m_smallPicUrl, ART_DOWNLOAD_AL + artistName + SKN_FILE,
                                 MusicDownLoadThreadAbstract::Download_SmlBG, this))->startToDownload();
#else
        (new MusicDataDownloadThread(musicSongInfo.m_smallPicUrl, ART_DOWNLOAD_AL + artistName + SKN_FILE,
                                 MusicDownLoadThreadAbstract::Download_SmlBG, this))->startToDownload();
#endif
        ///download big picture
        (new MusicBackgroundDownload( count == 1 ? musicSongInfo.m_singerName : artistName, artistName, this))->startToDownload();
    }