audio_addict 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e16f2df339290b35db4fa973f59acad53659d70d24221d922d5f393ceb9e18be
4
- data.tar.gz: 99b1ec5b9da37677b7b8766c1c78de6ce4ea8d1344cfd8738a0aa4e17fa77ffc
3
+ metadata.gz: 42a20c9ff92ff9420328e3fad7fc6bd027a639b9cdd8603deb8586584e1b2dbb
4
+ data.tar.gz: b3dd3ac2feaf72ce4d90b8f870541c13df60cb22c9d8b0ba7e8575a533ccb61c
5
5
  SHA512:
6
- metadata.gz: b4ba61aa84cb4732f986fe190a075d6318e56d10d7314f9796be032020e1a3e1c20018f203ea6bb1eab6c9bd8bd005e3debbeb110e6f99f91642885e76325205
7
- data.tar.gz: e78661eb554bcc03bb151ca4098e3710b3acfb85fe94137a3e35ac3058bcf674969fa5a8dbb4ed30c45541166444c7597449a06cf22c97124bbbb7b76d218d24
6
+ metadata.gz: b1bfca5b36d0a563882a7ac014b6ba5b32a7b78ace57183a286958b020ebe8bd1f056083803ddca02e3b5ab592abefa8722e553521c27dcbfa43c096f548ec3e
7
+ data.tar.gz: 660c35babd95d6fb25e14825d07cbbb2535dc365603352df155256fdfedc778eed8278d986df0fad5b209fd6784ff43d96b6594f3e9b70a14e9cb492d2acebff
data/README.md CHANGED
@@ -1,8 +1,73 @@
1
1
  AudioAddict Command Line
2
2
  ==================================================
3
3
 
4
- Work in progress, documentation soon.
4
+ [![Gem Version](https://badge.fury.io/rb/audio_addict.svg)](https://badge.fury.io/rb/audio_addict)
5
+ [![Build Status](https://travis-ci.com/DannyBen/audio_addict.svg?branch=master)](https://travis-ci.com/DannyBen/audio_addict)
6
+ [![Maintainability](https://api.codeclimate.com/v1/badges/91e1a8251b771881bf6b/maintainability)](https://codeclimate.com/github/DannyBen/audio_addict/maintainability)
5
7
 
6
- [API Reference (Archived)][api_reference]
8
+ ---
7
9
 
8
- [api_reference]: https://web.archive.org/web/20140426192326/http://tobiass.eu/api-doc.html#trackinfo
10
+ Command line utility for performing various operations on the AudioAddict
11
+ radio network.
12
+
13
+ **This gem is not affiliated with AudioAddict.**
14
+
15
+ ---
16
+
17
+
18
+ Install
19
+ --------------------------------------------------
20
+
21
+ Please note that in order to use this gem you need to have a premium account
22
+ at one of the AudioAddict networks.
23
+
24
+ ```
25
+ $ gem install audio_addict
26
+ ```
27
+
28
+
29
+ Features
30
+ --------------------------------------------------
31
+
32
+ - Easy to use command line interface
33
+ - Support for all the networks on the [AudioAddict Platform]:
34
+ - [Digitally Imported]
35
+ - [RockRadio]
36
+ - [RadioTunes]
37
+ - [JazzRadio]
38
+ - [ClassicalRadio]
39
+ - View list of channels
40
+ - View currently playing track
41
+ - Vote on the currently playing track
42
+ - Generate playlists
43
+
44
+
45
+ Usage
46
+ --------------------------------------------------
47
+
48
+ - Run the `radio` command to see a list of available subcommands.
49
+ - To see additional help, run `radio <subcommand> --help`
50
+
51
+ ```
52
+ $ radio
53
+ AudioAddict Radio Utilities
54
+
55
+ Commands:
56
+ login Save login credentials
57
+ status Show configuration status
58
+ set Set the radio network and channel
59
+ channels Show list of channels
60
+ now Show network, channel and playing track
61
+ vote Vote on the currently playing track
62
+ playlist Generate playlists
63
+
64
+ ```
65
+
66
+ ---
67
+
68
+ [AudioAddict Platform]: http://www.audioaddict.com
69
+ [Digitally Imported]: http://di.fm
70
+ [RockRadio]: http://www.rockradio.com
71
+ [RadioTunes]: http://www.radiotunes.com
72
+ [JazzRadio]: http://www.jazzradio.com
73
+ [ClassicalRadio]: http://www.classicalradio.com
@@ -4,11 +4,23 @@ module AudioAddict
4
4
  module Cache
5
5
 
6
6
  def cache
7
- @cache ||= Lightly.new life: '6h', dir: cache_dir
7
+ @cache ||= Lightly.new life: cache_life, dir: cache_dir
8
+ end
9
+
10
+ def cache_life
11
+ @cache_life ||= cache_life!
12
+ end
13
+
14
+ def cache_life!
15
+ Config.cache_life || '6h'
8
16
  end
9
17
 
10
18
  def cache_dir
11
- @cache_dir ||= ENV.fetch('AUDIO_ADDICT_CACHE_PATH', "#{Dir.home}/.audio_addict/cache")
19
+ @cache_dir ||= cache_dir!
20
+ end
21
+
22
+ def cache_dir!
23
+ Config.cache_dir || "#{Dir.home}/.audio_addict/cache"
12
24
  end
13
25
 
14
26
  end
@@ -40,7 +40,7 @@ module AudioAddict
40
40
  if Config.channel
41
41
  say "!txtgrn!#{Config.channel}"
42
42
  else
43
- say"!txtred!<Unset>!txtrst! - run !txtpur!radio channel!txtrst! to fix"
43
+ say"!txtred!<Unset>!txtrst! - run !txtpur!radio set!txtrst! to fix"
44
44
  end
45
45
 
46
46
  end
@@ -1,3 +1,3 @@
1
1
  module AudioAddict
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
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.0.2
4
+ version: 0.1.0
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-11-29 00:00:00.000000000 Z
11
+ date: 2018-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colsole