Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Greedysky committed Dec 11, 2017
2 parents 8af66b6 + 6d2f67a commit 0177e5b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,12 @@ void MusicDownLoadQueryBDMovieThread::readFromMusicMVAttribute(MusicObject::Musi
}

value = value["files"].toMap();
if(value.keys().isEmpty())
{
return;
}
value = value[value.keys().first()].toMap();

QString path = value["file_link"].toString();
if(path.contains("video-url"))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ void MusicLocalSongSearchInlineEdit::suggestDataChanged()

if(m_popWidget && !text().trimmed().isEmpty())
{
if(names.isEmpty())
{
m_popWidget->lower();
m_popWidget->hide();
}
m_popWidget->createSuggestItems(names);
}
}
Expand Down
13 changes: 13 additions & 0 deletions TTKModule/musicapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ void MusicApplication::musicLoadCurrentSongLrc()
QString prefix = MusicUtils::Core::lrcPrefix();
QString path = QFile::exists(prefix + filename + LRC_FILE) ? (prefix + filename + LRC_FILE) : (prefix + filename + KRC_FILE);
m_rightAreaWidget->loadCurrentSongLrc(filename, path);

//reset current song lrc index.
QTimer::singleShot(MT_S2MS, this, SLOT(resetCurrentSongLrcIndex()));
}

void MusicApplication::musicImportSongsSettingPath(const QStringList &items)
Expand Down Expand Up @@ -968,6 +971,16 @@ void MusicApplication::musicCurrentLrcUpdated()
m_rightAreaWidget->musicCheckHasLrcAlready();
}

void MusicApplication::resetCurrentSongLrcIndex()
{
int pos = m_musicPlayer->position();
if(pos != -1)
{
//Set lrc corrent to show
m_rightAreaWidget->setSongSpeedAndSlow(pos);
}
}

void MusicApplication::updateCurrentTime(qint64 pos)
{
if(!m_playControl) ///When pause just resume it
Expand Down
4 changes: 4 additions & 0 deletions TTKModule/musicapplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ public Q_SLOTS:
* The current lrc should update, emit it.
*/
void musicCurrentLrcUpdated();
/*!
* Reset current song lrc index.
*/
void resetCurrentSongLrcIndex();
/*!
* Update current play time when user adjust the progress.
*/
Expand Down

0 comments on commit 0177e5b

Please sign in to comment.