nehm 2.1 → 2.1.2

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: c10edc21faa4a5d48238b4016cccd64ed556294e
4
- data.tar.gz: 0e73986835c88704ba2c838c78a8a5b1e95ecd85
3
+ metadata.gz: 6ece0cb803be426dda1c977fa8c5749c89b22854
4
+ data.tar.gz: 09d8e471b3f3a35e66cff539f1ebeb0fdf5be99f
5
5
  SHA512:
6
- metadata.gz: 125b005c86619752e5046656af178595b759e5a73f67be7905b887d56166a2afeff1a74ff16cb6b59113e51d3fb064a1655ed08963b0d399d978575f6da25233
7
- data.tar.gz: 1c2dfc04d057d4b93a96098454e2e9e9f656dd3b397a38875ae0f319cc5d93f98f196cd74405be34162b4757ffa102ace446023ba6fda5734526783924b3ac30
6
+ metadata.gz: 841f20a8424b56f5dd66bf98b07d5978d36d96a3827e2f4fb169bcf8a51e938d1c6ead04f2013b4b790d6c820a8fc474b056967be56a96bf99c02a858a80ae94
7
+ data.tar.gz: 62b1d170ffc2cff0705468f8aa3c92e5127d8d363841daa5e961c56d2552232830e86e2e0ee05dfde637a86179fad59c41fee755321825d9cbb3d482b8a8a319
@@ -1,5 +1,11 @@
1
1
  # nehm change log
2
2
 
3
+ ## 2.1.2
4
+ * Fix infinite loop in `select` and `search` commands if there are no tracks
5
+
6
+ ## 2.1.1
7
+ * Add `dl yes` option to `select` and `search` commands
8
+
3
9
  ## 2.1
4
10
  * `search` command
5
11
  * Use dash-options *(see help)*
@@ -12,7 +12,7 @@ module Nehm
12
12
  end
13
13
 
14
14
  def execute
15
- @options[:dl] = true
15
+ @options[:dl] = 'yes'
16
16
 
17
17
  get_cmd = CommandManager.command_instance('get')
18
18
  get_cmd.options = @options
@@ -14,15 +14,19 @@ module Nehm
14
14
  'Add track(s) to iTunes playlist with PLAYLIST name')
15
15
 
16
16
  add_option(:"-lim", '-lim NUMBER',
17
- 'Show NUMBER tracks on each page')
17
+ 'Show NUMBER+1 tracks on each page')
18
+
19
+ add_option(:"-dl", '-dl yes',
20
+ "Don't add a track to iTunes. Just download and set tags")
18
21
 
19
22
  end
20
23
 
21
24
  def execute
22
25
  # Convert dash-options to normal options
23
26
  options_to_convert = { :"-t" => :to,
24
- :"-pl" => :pl,
25
- :"-lim" => :limit }
27
+ :"-pl" => :pl,
28
+ :"-lim" => :limit,
29
+ :"-dl" => :dl }
26
30
 
27
31
  options_to_convert.each do |k,v|
28
32
  value = @options[k]
@@ -25,6 +25,9 @@ module Nehm
25
25
 
26
26
  add_option(:offset, 'offset NUMBER',
27
27
  'Show from NUMBER+1 track')
28
+
29
+ add_option(:dl, 'dl yes',
30
+ "Don't add a track to iTunes. Just download and set tags")
28
31
  end
29
32
 
30
33
  def arguments
@@ -39,11 +39,6 @@ module Nehm
39
39
  @items.unshift(value)
40
40
  end
41
41
 
42
- def show_header
43
- UI.say @header
44
- UI.newline
45
- end
46
-
47
42
  def newline
48
43
  @items << "\n"
49
44
  end
@@ -112,7 +112,7 @@ module Nehm
112
112
 
113
113
  # Setting up iTunes playlist
114
114
  @playlist = nil
115
- if !options[:dl] && OS.mac?
115
+ if options[:dl] != 'yes' && OS.mac?
116
116
  playlist_name = options[:pl]
117
117
  @playlist = playlist_name ? PlaylistManager.get_playlist(playlist_name) : PlaylistManager.default_playlist
118
118
  end
@@ -12,12 +12,14 @@ module Nehm
12
12
  def execute
13
13
  setup_environment
14
14
 
15
- tracks = []
16
- old_offset = -1
15
+ old_offset = @offset
17
16
 
18
17
  @queue = []
19
18
  @track_manager = TrackManager.new(@options)
20
19
 
20
+ tracks = get_tracks
21
+ UI.term 'There are no tracks yet' if tracks.nil?
22
+
21
23
  loop do
22
24
  # If offset changed, update list of tracks
23
25
  unless old_offset == @offset
@@ -1,3 +1,3 @@
1
1
  module Nehm
2
- VERSION = '2.1'.freeze
2
+ VERSION = '2.1.2'.freeze
3
3
  end
@@ -24,4 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.add_dependency 'certifi'
25
25
  spec.add_dependency 'colored'
26
26
  spec.add_dependency 'taglib-ruby', '>= 0.7.0'
27
+
28
+ spec.add_development_dependency 'bundler'
29
+ spec.add_development_dependency 'rake'
27
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nehm
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.1'
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Albert Nigmatzianov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-12 00:00:00.000000000 Z
11
+ date: 2015-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: certifi
@@ -52,6 +52,34 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.7.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
55
83
  description: nehm is a console tool, which downloads, sets IDv3 tags and adds to your
56
84
  iTunes library your SoundCloud posts or likes in convenient way. See homepage for
57
85
  instructions