mplug163 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +20 -19
- data/lib/mplug163/menu.rb +4 -10
- data/lib/mplug163/player.rb +5 -13
- data/lib/mplug163/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b803ce89839b3d3dc4c25e36bfc815c994b2b06
|
4
|
+
data.tar.gz: 7668f54823b00165c6c8b25ba935de18ed587798
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 711b44a3e90fe1f6d2e6919515a07c1a9acb8f087aa537e6f8ab6363d524accc12a714f0af935474062338ef93d03fe6db752ad12139a25296ebcb2779b3a3fd
|
7
|
+
data.tar.gz: 321d42a000c67816b84775369e343dd8c77dc43467b4ddae333ed5de078e2d877b7d66dfb9e2a8aa538e9745768ea7d17e3f5a0e8653a450d32473672dbd7e6f
|
data/README.md
CHANGED
@@ -19,25 +19,26 @@ Sorry, I do not test Mplug163 in Linux. If you try it in Linux and catch some pr
|
|
19
19
|
|
20
20
|
## Shortcuts
|
21
21
|
|
22
|
-
| Key | Explanation | 中文释义
|
23
|
-
|
|
24
|
-
| j | Down | 向下
|
25
|
-
| k | Up | 向上
|
26
|
-
| h | Back | 后退
|
27
|
-
| l | Forward |
|
28
|
-
| [ | Prev Song | 上一首歌曲
|
29
|
-
| ] | Next Song | 下一首歌曲
|
30
|
-
| ' ' | Play / Pause | 播放 /
|
31
|
-
| u | Prev Page | 上一页列表
|
32
|
-
| d | Next Page | 下一页列表
|
33
|
-
| f | Search | 搜索
|
34
|
-
| m | Main Menu | 主菜单
|
35
|
-
| p | Present Playlist | 当前播放列表
|
36
|
-
| s | Star |
|
37
|
-
| t | Playlist | 收藏精选歌单
|
38
|
-
| c | Collection | 收藏歌曲列表
|
39
|
-
|
|
40
|
-
|
|
22
|
+
| Key | Explanation | 中文释义 |
|
23
|
+
| :---|:---------------------|:---------------------|
|
24
|
+
| j | Down | 向下 |
|
25
|
+
| k | Up | 向上 |
|
26
|
+
| h | Back | 后退 |
|
27
|
+
| l | Forward | 前进或播放高亮选中歌曲 |
|
28
|
+
| [ | Prev Song | 上一首歌曲 |
|
29
|
+
| ] | Next Song | 下一首歌曲 |
|
30
|
+
| ' ' | Play / Pause | 播放 / 暂停当前进行的歌曲|
|
31
|
+
| u | Prev Page | 上一页列表 |
|
32
|
+
| d | Next Page | 下一页列表 |
|
33
|
+
| f | Search | 搜索 |
|
34
|
+
| m | Main Menu | 主菜单 |
|
35
|
+
| p | Present Playlist | 当前播放列表 |
|
36
|
+
| s | Star | 收藏歌曲、精选歌单、专辑 |
|
37
|
+
| t | Playlist | 收藏精选歌单 |
|
38
|
+
| c | Collection | 收藏歌曲列表 |
|
39
|
+
| a | Album | 收藏专辑 |
|
40
|
+
| r | Remove Present Entry | 删除当前曲目 |
|
41
|
+
| q | Quit | 退出 |
|
41
42
|
|
42
43
|
## Attention
|
43
44
|
|
data/lib/mplug163/menu.rb
CHANGED
@@ -5,16 +5,16 @@ SHORTCUT = [
|
|
5
5
|
['j', 'Down ', '向下'],
|
6
6
|
['k', 'Up ', '向上'],
|
7
7
|
['h', 'Back ', '后退'],
|
8
|
-
['l', 'Forward ', '
|
8
|
+
['l', 'Forward ', '前进或播放高亮选中歌曲'],
|
9
9
|
['[', 'Prev song ', '上一首歌曲'],
|
10
10
|
[']', 'Next song ', '下一首歌曲'],
|
11
|
-
[' ', 'Play / Pause', '播放 /
|
11
|
+
[' ', 'Play / Pause', '播放 / 暂停当前进行的歌曲'],
|
12
12
|
['u', 'Prev page ', '上一页列表'],
|
13
13
|
['d', 'Next page ', '下一页列表'],
|
14
14
|
['f', 'Search ', '搜索'],
|
15
15
|
['m', 'Menu ', '主菜单'],
|
16
16
|
['p', 'Present ', '当前播放列表'],
|
17
|
-
['s', 'Star ', '
|
17
|
+
['s', 'Star ', '收藏歌曲、精选歌单、专辑'],
|
18
18
|
['t', 'Playlist ', '收藏精选歌单'],
|
19
19
|
['c', 'Collection ', '收藏歌曲列表'],
|
20
20
|
['a', 'Album ', '收藏专辑'],
|
@@ -94,7 +94,7 @@ class Menu
|
|
94
94
|
next if @datatype == 'help'
|
95
95
|
if @datatype == 'songs' || @datatype == 'djchannels'
|
96
96
|
@player.play(@datatype, datalist, @index, true)
|
97
|
-
|
97
|
+
@present_songs = [datatype, title, datalist, offset, index]
|
98
98
|
else
|
99
99
|
@ui.build_loading
|
100
100
|
dispatch_enter(idx)
|
@@ -124,11 +124,6 @@ class Menu
|
|
124
124
|
|
125
125
|
# Play or pause a song.
|
126
126
|
when ' '
|
127
|
-
if datatype == 'songs'
|
128
|
-
@present_songs = ['songs', title, datalist, offset, index]
|
129
|
-
elsif datatype == 'djchannels'
|
130
|
-
@present_songs = ['djchannels', title, datalist, offset, index]
|
131
|
-
end
|
132
127
|
@player.play(datatype, datalist, idx)
|
133
128
|
sleep @wait
|
134
129
|
|
@@ -138,7 +133,6 @@ class Menu
|
|
138
133
|
@stack.push([datatype, title, datalist, offset, index])
|
139
134
|
@datatype, @title, @datalist, @offset, @index = @present_songs[0], @present_songs[1], @present_songs[2], @present_songs[3], @present_songs[4]
|
140
135
|
|
141
|
-
|
142
136
|
# Star a song, a playlist or an album.
|
143
137
|
when 's'
|
144
138
|
next if datalist.empty?
|
data/lib/mplug163/player.rb
CHANGED
@@ -35,20 +35,12 @@ class Player
|
|
35
35
|
def play(datatype, songs, idx, switch_flag = false)
|
36
36
|
@datatype = datatype
|
37
37
|
|
38
|
-
if
|
39
|
-
|
40
|
-
if !switch_flag
|
41
|
-
@pause_flag ? resume : pause if @songs == songs
|
42
|
-
elsif switch_flag
|
43
|
-
@songs = songs
|
44
|
-
@idx = idx
|
45
|
-
@playing_flag ? switch : recall
|
46
|
-
end
|
47
|
-
|
48
|
-
else
|
49
|
-
|
38
|
+
if !switch_flag
|
50
39
|
@pause_flag ? resume : pause if @playing_flag
|
51
|
-
|
40
|
+
elsif switch_flag
|
41
|
+
@songs = songs
|
42
|
+
@idx = idx
|
43
|
+
@playing_flag ? switch : recall
|
52
44
|
end
|
53
45
|
end
|
54
46
|
|
data/lib/mplug163/version.rb
CHANGED