Skip to content

Commit

Permalink
rename 'music.author' to 'music.artist' according to ID3 tags standard
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenOutman committed Mar 26, 2018
1 parent e5b8612 commit 1a1f7c9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Using Vue-APlayer in your project? [Let me know!](https://github.com/SevenOutman
<aplayer autoplay
:music="{
title: 'secret base~君がくれたもの~',
author: 'Silent Siren',
artist: 'Silent Siren',
src: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.jpg'
}"
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install vue-aplayer --save
<aplayer autoplay
:music="{
title: 'secret base~君がくれたもの~',
author: 'Silent Siren',
artist: 'Silent Siren',
src: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.jpg'
}"
Expand Down
2 changes: 1 addition & 1 deletion src/components/aplayer-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<span class="aplayer-list-cur" :style="{background: theme}"></span>
<span class="aplayer-list-index">{{ index + 1}}</span>
<span class="aplayer-list-title">{{ aMusic.title || 'Untitled' }}</span>
<span class="aplayer-list-author">{{ aMusic.author || 'Unknown' }}</span>
<span class="aplayer-list-author">{{ aMusic.artist || aMusic.author || 'Unknown' }}</span>
</li>
</ol>
</div>
Expand Down
10 changes: 5 additions & 5 deletions src/demo/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<aplayer
:music="{
title: 'secret base~君がくれたもの~',
author: 'Silent Siren',
artist: 'Silent Siren',
src: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.jpg'
}"
Expand Down Expand Up @@ -113,28 +113,28 @@
list3: [
{
title: '前前前世',
author: 'RADWIMPS',
artist: 'RADWIMPS',
src: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.jpg',
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/yourname.lrc',
},
{
title: '光るなら.m3u8',
author: 'Goose house',
artist: 'Goose house',
src: 'https://moeplayer.b0.upaiyun.com/aplayer/hls/hikarunara.m3u8',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.jpg',
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/hikarunara.lrc',
},
{
title: '回レ!雪月花',
author: '小倉唯',
artist: '小倉唯',
src: 'https://moeplayer.b0.upaiyun.com/aplayer/snowmoonflowers.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/snowmoonflowers.jpg',
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/snowmoonflowers.lrc'
},
{
title: 'あっちゅ~ま青春!',
author: '七森中☆ごらく部',
artist: '七森中☆ごらく部',
src: 'https://moeplayer.b0.upaiyun.com/aplayer/yuruyuri.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/yuruyuri.jpg',
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/yuruyuri.lrc',
Expand Down
5 changes: 4 additions & 1 deletion src/vue-aplayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="aplayer-info" v-show="!isMiniMode">
<div class="aplayer-music">
<span class="aplayer-title">{{ currentMusic.title || 'Untitled' }}</span>
<span class="aplayer-author">{{ currentMusic.author || 'Unknown' }}</span>
<span class="aplayer-author">{{ currentMusic.artist || currentMusic.author || 'Unknown' }}</span>
</div>
<slot name="display" :current-music="currentMusic" :play-stat="playStat">
<lyrics :current-music="currentMusic" :play-stat="playStat" v-show="shouldShowLrc"/>
Expand Down Expand Up @@ -91,6 +91,9 @@
if (song.url) {
deprecatedProp('music.url', '1.4.0', 'music.src')
}
if (song.author) {
deprecatedProp('music.author', '1.4.1', 'music.artist')
}
return song.src || song.url
},
},
Expand Down

0 comments on commit 1a1f7c9

Please sign in to comment.