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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e33bc56dcd83e31ebfdc4f491d5fe3681382a66
4
- data.tar.gz: ac87072c527579dd5c70ea215ad09195a58d2d19
3
+ metadata.gz: 8b803ce89839b3d3dc4c25e36bfc815c994b2b06
4
+ data.tar.gz: 7668f54823b00165c6c8b25ba935de18ed587798
5
5
  SHA512:
6
- metadata.gz: 51c848df5edb40fa2b9994c6f36b0240a8a0042be1ec2bb357c413ed799bb38df8e4d6f0e58140969d7f8efdad3c7fd40c06f7f660ad91d05af64155c3e33194
7
- data.tar.gz: 768999fd9f74f558310dcae7143200f74e99ffc9a49d3cf4461af5b9efcc9082d5b55932daddf3e6c8f9a1152b083f73feb2a56f05d88cc93e0ed3c642b75804
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
- | r | Remove Present Entry | 删除当前曲目 |
40
- | q | Quit | 退出 |
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
- sleep @wait
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?
@@ -35,20 +35,12 @@ class Player
35
35
  def play(datatype, songs, idx, switch_flag = false)
36
36
  @datatype = datatype
37
37
 
38
- if datatype == 'songs' || datatype == 'djchannels'
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
 
@@ -1,3 +1,3 @@
1
1
  module Mplug163
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mplug163
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ripple Yui