diff --git a/README.md b/README.md index 146f524..da487e5 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@

高颜值的第三方网易云播放器
- 🌎 访问DEMO  |   + 🌎 访问DEMO  |   📦️ 下载安装包  |   💬 加入交流群
@@ -16,7 +16,7 @@

-[![Library][library-screenshot]](https://music.ineko.cc) +[![Library][library-screenshot]](https://music.qier222.com) ## 全新版本 diff --git a/package.json b/package.json index bb87fdd..6285846 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yesplaymusic", - "version": "0.4.9", + "version": "0.4.8", "private": true, "description": "A third party music player for Netease Music", "author": "qier222", diff --git a/src/main.js b/src/main.js index 50d73a2..73f7e8e 100644 --- a/src/main.js +++ b/src/main.js @@ -7,6 +7,7 @@ import i18n from '@/locale'; import '@/assets/icons'; import '@/utils/filters'; import './registerServiceWorker'; +import { dailyTask } from '@/utils/common'; import '@/assets/css/global.scss'; import NProgress from 'nprogress'; import '@/assets/css/nprogress.css'; @@ -37,6 +38,7 @@ Vue.use( Vue.config.productionTip = false; NProgress.configure({ showSpinner: false, trickleSpeed: 100 }); +dailyTask(); new Vue({ i18n, diff --git a/src/utils/Player.js b/src/utils/Player.js index 11af73a..19e1ad8 100644 --- a/src/utils/Player.js +++ b/src/utils/Player.js @@ -3,7 +3,7 @@ import { getArtist } from '@/api/artist'; import { trackScrobble, trackUpdateNowPlaying } from '@/api/lastfm'; import { fmTrash, personalFM } from '@/api/others'; import { getPlaylistDetail, intelligencePlaylist } from '@/api/playlist'; -import { getLyric, getMP3, getTrackDetail } from '@/api/track'; +import { getLyric, getMP3, getTrackDetail, scrobble } from '@/api/track'; import store from '@/store'; import { isAccountLoggedIn } from '@/utils/auth'; import { cacheTrackSource, getTrackSource } from '@/utils/db'; @@ -130,8 +130,6 @@ export default class { if (shuffle) { this._shuffleTheList(); } - // 同步当前歌曲在列表中的下标 - this.current = this.list.indexOf(this.currentTrackID); } get reversed() { return this._reversed; @@ -309,6 +307,11 @@ export default class { ); const trackDuration = ~~(track.dt / 1000); time = completed ? trackDuration : ~~time; + scrobble({ + id: track.id, + sourceid: this.playlistSource.id, + time, + }); if ( store.state.lastfm.key !== undefined && (time >= trackDuration / 2 || time >= 240) @@ -889,7 +892,7 @@ export default class { if (autoPlayTrackID === 'first') { this._replaceCurrentTrack(this.list[0]); } else { - this.current = this.list.indexOf(autoPlayTrackID); + this.current = trackIDs.indexOf(autoPlayTrackID); this._replaceCurrentTrack(autoPlayTrackID); } } diff --git a/src/views/library.vue b/src/views/library.vue index da24af7..01381e4 100644 --- a/src/views/library.vue +++ b/src/views/library.vue @@ -215,7 +215,7 @@