nehm 1.5.5.2 → 1.5.6.1

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
  SHA1:
3
- metadata.gz: 6f8bc2d05e674fed6fb6f60ad330e6b4264bd7fc
4
- data.tar.gz: 69e43d9f7aa2d2261a249986aca4912b771525ad
3
+ metadata.gz: 7df29fcbb10b3804bb7c3c32d8e9c0ee8c1117ac
4
+ data.tar.gz: 43f702c6d1fd51ca7a5f06b6199da3addd49beb2
5
5
  SHA512:
6
- metadata.gz: de1b819c2411d12dea43faa2550b899bfb6fb456269b2a183f9593c6afe55bb87b82a9a861df0a7e0f552421baaf284b93c138700242bb8ecf8cddef38fb98ed
7
- data.tar.gz: 1fe62d5461ebfde0d6d05633fc40a42b55f78d8c5bc9de1760acb96318a0647bc0bb2737483ce11d9645c142d04d98e92aa298ad3ab0cc0d19770f431df628e9
6
+ metadata.gz: 31c248cc4cb95ee3feab919e40557cd3b1c9a743bbe8f75fb7f0d12f68eb84914765fa4df647ab48ab30bc2f3d99441f39fa749623b66c351fac6f7396fa2a2a
7
+ data.tar.gz: df2f37205e15dedd32dfae03d3aff40bffd7874231064639b2de9e4cdcb6a11a05acface7b6de04849efeea829c743e22a8fcd9d82c48568b028b5bebeeb365d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # nehm change log
2
2
 
3
+ ## 1.5.6.1
4
+ * Fix: "execution error: iTunes got an error: file "..." doesn’t understand the “add” message. (-1708)" (thanks to https://github.com/galaris for reporting)
5
+ * Fix: nehm fails if track's title has some special characters (thanks to https://github.com/galaris for reporting)
6
+
3
7
  ## 1.5.5.2
4
8
  * Fix wrong detection of artist in title name of song
5
9
 
data/README.md CHANGED
@@ -61,7 +61,7 @@ Enter path to desirable download directory (press enter to set it to ...
61
61
 
62
62
  `nehm get 3 posts` or `nehm get 3 likes`
63
63
 
64
- * Just download and set tags any track, you can input
64
+ * Just download and set tags any track
65
65
 
66
66
  `nehm dl post` or `nehm dl like` or `nehm dl 3 likes`
67
67
 
data/bin/nehm CHANGED
@@ -3,4 +3,8 @@ nehm_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
3
3
  $LOAD_PATH.unshift(nehm_dir) unless $LOAD_PATH.include?(nehm_dir)
4
4
  require 'nehm'
5
5
 
6
- Nehm::App.do(ARGV)
6
+ begin
7
+ Nehm::App.do(ARGV)
8
+ rescue Interrupt # SIGINT
9
+ puts "\nGoodbye!"
10
+ end
data/lib/nehm.rb CHANGED
@@ -38,10 +38,6 @@ module Nehm
38
38
  puts Paint["Invalid command '#{command}'", :red]
39
39
  puts "Input #{Paint['nehm help', :yellow]} for all avalaible commands"
40
40
  end
41
-
42
- # SIGINT
43
- rescue Interrupt
44
- puts "\nGoodbye!"
45
41
  end
46
42
 
47
43
  module_function
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/osascript
1
2
  on run argv
2
3
  set posixFile to first item of argv
3
4
  set playlistName to second item of argv
@@ -3,9 +3,9 @@ module Nehm
3
3
  module Configure
4
4
  def self.menu
5
5
  loop do
6
- puts "Download path: #{Paint[Cfg[:dl_path], :magenta]}"
7
- puts "Permalink: #{Paint[Cfg[:permalink], :cyan]}"
8
- puts "iTunes playlist: #{Paint[PlaylistManager.playlist, :cyan]}" unless OS.linux?
6
+ puts "Download path: #{Paint[Cfg[:dl_path], :magenta]}" if Cfg[:dl_path]
7
+ puts "Permalink: #{Paint[Cfg[:permalink], :cyan]}" if Cfg[:permalink]
8
+ puts "iTunes playlist: #{Paint[PlaylistManager.playlist, :cyan]}" if !OS.linux? && PlaylistManager.playlist
9
9
  puts "\n"
10
10
 
11
11
  HighLine.new.choose do |menu|
data/lib/nehm/playlist.rb CHANGED
@@ -3,7 +3,7 @@ module Nehm
3
3
  attr_reader :name
4
4
 
5
5
  def initialize(name)
6
- @name = name
6
+ @name = name.chomp
7
7
  end
8
8
 
9
9
  def add_track(track_path)
data/lib/nehm/track.rb CHANGED
@@ -7,8 +7,10 @@ module Nehm
7
7
  end
8
8
 
9
9
  def artist
10
- if @hash['title'].index(' - ')
11
- @hash['title'].split(' - ')[0]
10
+ title = @hash['title']
11
+
12
+ if title.include? ' - '
13
+ title.split(' - ')[0]
12
14
  else
13
15
  @hash['user']['username']
14
16
  end
@@ -19,7 +21,7 @@ module Nehm
19
21
  end
20
22
 
21
23
  def file_name
22
- "#{name}.mp3".tr("/'\"", '')
24
+ "#{name.gsub(/[^0-9A-Za-z]/, '')}.mp3"
23
25
  end
24
26
 
25
27
  def file_path
@@ -40,10 +42,12 @@ module Nehm
40
42
  end
41
43
 
42
44
  def title
43
- if @hash['title'].index(' - ')
44
- @hash['title'].split(' - ')[1]
45
+ title = @hash['title']
46
+
47
+ if title.include? ' - '
48
+ title.split(' - ')[1]
45
49
  else
46
- @hash['title']
50
+ title
47
51
  end
48
52
  end
49
53
 
data/lib/nehm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Nehm
2
- VERSION = '1.5.5.2'.freeze
2
+ VERSION = '1.5.6.1'.freeze
3
3
  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: 1.5.5.2
4
+ version: 1.5.6.1
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-09-15 00:00:00.000000000 Z
11
+ date: 2015-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bogy