audio_addict 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/bin/radio +2 -1
- data/lib/audio_addict/commands/download.rb +7 -4
- data/lib/audio_addict/version.rb +1 -1
- data/lib/audio_addict/youtube.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b9ee1765ac530791d434e0ae9166dcbbd6c78af0331e6744b798b042a4855cc
|
4
|
+
data.tar.gz: 36572839fec8085f9cdd3e55c0bf092319dac42f707c404097123454fd3f8a59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44e14f1f07236555a67735e407c6aa9ae2849fb7db87b67168f9c1ddb233ee8007cfcd0e77c7462fe26df2a92c2cc4e780513e7a2ab4f522e9aa28f9d3886370
|
7
|
+
data.tar.gz: c5ae90ef4ae1304a684f92679e62f66e8adaf75e65a94410b4259cbefec4aba7983e829dde112f2192564c9ce5fd242eeb0ee1fccb0185dd634e4f14e8a2398d
|
data/README.md
CHANGED
@@ -47,7 +47,7 @@ Features
|
|
47
47
|
- Vote on the currently playing track
|
48
48
|
- Save a log of a all your liked tracks
|
49
49
|
- Generate playlists (requires a premium account)
|
50
|
-
- Download songs from
|
50
|
+
- Download songs from YouTube (requires [youtube-dl][youtube-dl])
|
51
51
|
|
52
52
|
|
53
53
|
Usage
|
@@ -84,3 +84,4 @@ Commands:
|
|
84
84
|
[JazzRadio]: http://www.jazzradio.com
|
85
85
|
[ClassicalRadio]: http://www.classicalradio.com
|
86
86
|
[ZenRadio]: http://www.zenradio.com
|
87
|
+
[youtube-dl]: https://github.com/ytdl-org/youtube-dl/
|
data/bin/radio
CHANGED
@@ -8,7 +8,7 @@ router = AudioAddict::CLI.router
|
|
8
8
|
begin
|
9
9
|
exit router.run ARGV
|
10
10
|
|
11
|
-
rescue AudioAddict::Interrupt, TTY::Reader::InputInterrupt
|
11
|
+
rescue Interrupt, AudioAddict::Interrupt, TTY::Reader::InputInterrupt
|
12
12
|
say "\nGoodbye"
|
13
13
|
exit 1
|
14
14
|
|
@@ -30,4 +30,5 @@ rescue => e
|
|
30
30
|
say "!undred!ERROR: #{e.class}"
|
31
31
|
say e.message
|
32
32
|
exit 1
|
33
|
+
|
33
34
|
end
|
@@ -11,7 +11,7 @@ module AudioAddict
|
|
11
11
|
usage "radio download --help"
|
12
12
|
|
13
13
|
option "-l --lines N", "Number of log lines to download [default: 1]"
|
14
|
-
option "-c --count N", "Number of YouTube search results to download
|
14
|
+
option "-c --count N", "Number of YouTube search results to download\nDefaults to the value of the AUDIO_ADDICT_DOWNLOAD_COUNT environment variable, or 1"
|
15
15
|
|
16
16
|
param "QUERY", "YouTube search query"
|
17
17
|
|
@@ -19,6 +19,8 @@ module AudioAddict
|
|
19
19
|
command "log", "Download the last N songs from the like-log"
|
20
20
|
command "search", "Download any song matching the Youtube search query"
|
21
21
|
|
22
|
+
environment "AUDIO_ADDICT_DOWNLOAD_COUNT", "Set the default download count (--count)"
|
23
|
+
|
22
24
|
example "radio download current"
|
23
25
|
example "radio download current --count 3"
|
24
26
|
example "radio download log --lines 2 --count 3"
|
@@ -26,7 +28,6 @@ module AudioAddict
|
|
26
28
|
|
27
29
|
def current_command
|
28
30
|
needs :network, :channel
|
29
|
-
count = args['--count']
|
30
31
|
|
31
32
|
say "!txtblu!Downloading !txtrst!: ... "
|
32
33
|
|
@@ -40,7 +41,6 @@ module AudioAddict
|
|
40
41
|
|
41
42
|
def log_command
|
42
43
|
needs :like_log
|
43
|
-
count = args['--count']
|
44
44
|
lines = args['--lines']&.to_i
|
45
45
|
|
46
46
|
data = log.data[-lines..-1]
|
@@ -54,7 +54,6 @@ module AudioAddict
|
|
54
54
|
|
55
55
|
def search_command
|
56
56
|
query = args['QUERY']
|
57
|
-
count = args['--count']
|
58
57
|
|
59
58
|
say "\n!txtblu!Downloading !txtgrn!: #{query}"
|
60
59
|
Youtube.new(query).get count
|
@@ -62,6 +61,10 @@ module AudioAddict
|
|
62
61
|
|
63
62
|
private
|
64
63
|
|
64
|
+
def count
|
65
|
+
args['--count']&.to_i || ENV['AUDIO_ADDICT_DOWNLOAD_COUNT']&.to_i || 1
|
66
|
+
end
|
67
|
+
|
65
68
|
def log
|
66
69
|
@log ||= Log.new
|
67
70
|
end
|
data/lib/audio_addict/version.rb
CHANGED
data/lib/audio_addict/youtube.rb
CHANGED
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.4.
|
4
|
+
version: 0.4.1
|
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: 2021-01-
|
11
|
+
date: 2021-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colsole
|