audio_addict 0.1.3 → 0.1.4

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
  SHA256:
3
- metadata.gz: 78b583c758b2761c1722e3d70822ae254fc1fb45f3443d4b569d35bcbd2d69a5
4
- data.tar.gz: '03608ec25c58034590834c322185adba375026292f0249d96cd8b1c29a8758a8'
3
+ metadata.gz: b1a2413418f94134ab1e8ad4bc556c9e31e4bc25f93821d7464761f226d33c51
4
+ data.tar.gz: 71e19ca4ff20d6b903687361239b119041eb142420b305edcaf0d6b23e261a07
5
5
  SHA512:
6
- metadata.gz: 182cca3495b2a000347eb9299c9981ecbbe8bbe464459dc1848293095a473f3153fbf611678bb2696a0811b052f6c6920b00b70e06a8176030381ad3ada6f048
7
- data.tar.gz: 798d39dd7ada375219e5b45af40b82c2b45aa27ad1913b6eaa9ea239965ed8faf90d27bfe4532f3eca0975129a99e9700e896e2b26f0b96f726a80cabf356b8a
6
+ metadata.gz: 738afe0afba2a9ee10b62b1f1a9748f88d5a0d81b57bfae2f417ced6b47926fc932423b8cc03e9a72190dd44fd01decefd4de757f4282e05edd973db139f4b98
7
+ data.tar.gz: 402a9e2f05661831b0a5f7943bed9abf8cb9771c1c23e1d3942deaac54bfb65b71b0cc04d73961bc6a456adbc6d0b7ae250204b67e9321c9cde3303ce6f928e2
data/README.md CHANGED
@@ -64,6 +64,7 @@ Commands:
64
64
  set Set the radio network and channel
65
65
  channels Show list of channels
66
66
  now Show network, channel and playing track
67
+ history Show track history for the current channel
67
68
  vote Vote on the currently playing track
68
69
  playlist Generate playlists
69
70
  config Manage local configuration
@@ -9,6 +9,7 @@ module AudioAddict
9
9
  router.route 'set', to: Commands::SetCmd
10
10
  router.route 'channels', to: Commands::ChannelsCmd
11
11
  router.route 'now', to: Commands::NowCmd
12
+ router.route 'history', to: Commands::HistoryCmd
12
13
  router.route 'vote', to: Commands::VoteCmd
13
14
  router.route 'playlist', to: Commands::PlaylistCmd
14
15
  router.route 'config', to: Commands::ConfigCmd
@@ -0,0 +1,29 @@
1
+ module AudioAddict
2
+ module Commands
3
+ class HistoryCmd < Base
4
+ summary "Show track history for the current channel"
5
+
6
+ usage "radio history"
7
+ usage "radio history --help"
8
+
9
+ def run(args)
10
+ needs :network, :channel
11
+ say "!undgrn!#{radio.name} > #{current_channel.name}"
12
+ say ''
13
+ tracks.each do |channel|
14
+ say "!txtgrn! #{channel.artist.rjust max_artist_len}!txtrst! : !txtblu!#{channel.title}"
15
+ end
16
+ end
17
+
18
+ private
19
+
20
+ def tracks
21
+ @tracks ||= current_channel.track_history
22
+ end
23
+
24
+ def max_artist_len
25
+ tracks.map { |t| t.artist.size }.max
26
+ end
27
+ end
28
+ end
29
+ end
@@ -42,7 +42,7 @@ module AudioAddict
42
42
  end
43
43
 
44
44
  def simple_prompt
45
- like = prompt.yes? "Like?"
45
+ like = prompt.yes? "Vote?"
46
46
  like ? :up : :cancel
47
47
  end
48
48
 
@@ -1,3 +1,3 @@
1
1
  module AudioAddict
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: audio_addict
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-02 00:00:00.000000000 Z
11
+ date: 2018-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colsole
@@ -113,6 +113,7 @@ files:
113
113
  - lib/audio_addict/commands/base.rb
114
114
  - lib/audio_addict/commands/channels.rb
115
115
  - lib/audio_addict/commands/config.rb
116
+ - lib/audio_addict/commands/history.rb
116
117
  - lib/audio_addict/commands/log.rb
117
118
  - lib/audio_addict/commands/login.rb
118
119
  - lib/audio_addict/commands/now.rb