nehm 1.2.1 → 1.2.2

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: 5768d05298cc87c8d0cc0a0321ceda2a02da9062
4
- data.tar.gz: 88c398ca600814eb8f808e0426a12989043f933f
3
+ metadata.gz: fa02f86ca11d320cfcafe87503b8b5410b976d07
4
+ data.tar.gz: a6eade14a40a20d7d395190299b8ca3ceb9de858
5
5
  SHA512:
6
- metadata.gz: ca4ec26cc69d3beac67d282757bdda36119ea41cce5b2fd5a0e515fe1b502168ead270a3104a6fba3aa43d6f980fd3b8b49fc0ce52460a0e31bcdcf7e352f657
7
- data.tar.gz: 248c24c28a67b8abdbff1de3d41329fb53fb7fa9b5290b91a14d36a8cbd0756feac804848018a9fe01e8fce899aa81ea928bc60cd9ae8f59e9d40aa37c9626f1
6
+ metadata.gz: aa6aa113affb78d4d02189714e0b03825bed1f62a9ab25e32127641b1f938f9a67d91dd65662e92f93458562284e25538f27489c3c5f53c2d42aa7ea386b5f67
7
+ data.tar.gz: ceb5e211de5fd23567fdff33c541416ae0eab037227673c388895fd2fb99da4f07fecd752cab2b668e1efe779728924c42e631c84fca3a386d8bf8eb5138cc92
@@ -1,5 +1,13 @@
1
1
  # nehm change log
2
2
 
3
+ ## 1.2.2
4
+
5
+ * Tracks has got now year tag
6
+
7
+ ## 1.2.1
8
+
9
+ * Minor technical update
10
+
3
11
  ## 1.2
4
12
 
5
13
  * Add 'to PARHTODIRECTORY' feature. See the 'Usage' for instructions
@@ -85,10 +85,10 @@ module Get
85
85
  path = track.file_path
86
86
  TagLib::MPEG::File.open(path) do |file|
87
87
  puts 'Setting tags'
88
- #TODO: Add more tags (year)
89
88
  tag = file.id3v2_tag
90
89
  tag.artist = track.artist
91
90
  tag.title = track.title
91
+ tag.year = track.year
92
92
 
93
93
  # Adding artwork
94
94
  apic = TagLib::ID3v2::AttachedPictureFrame.new
@@ -43,8 +43,12 @@ class Track
43
43
  @hash['title']
44
44
  end
45
45
  end
46
-
46
+
47
47
  def url
48
48
  "#{@hash['stream_url']}?client_id=#{Client::CLIENT_ID}"
49
49
  end
50
+
51
+ def year
52
+ @hash['created_at'][0..3].to_i
53
+ end
50
54
  end
@@ -23,9 +23,7 @@ class User
23
23
  exit
24
24
  end
25
25
 
26
- conn = Faraday.new(url: 'https://api-v2.soundcloud.com/') do |faraday|
27
- faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
28
- end
26
+ conn = Faraday.new(url: 'https://api-v2.soundcloud.com/')
29
27
  response = conn.get("/profile/soundcloud:users:#{@id}?limit=#{count}&offset=0")
30
28
 
31
29
  parsed = JSON.parse(response.body)
@@ -1,3 +1,3 @@
1
1
  module Nehm
2
- VERSION = '1.2.1'
2
+ VERSION = '1.2.2'
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.2.1
4
+ version: 1.2.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-07-24 00:00:00.000000000 Z
11
+ date: 2015-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler