lib/grooveshark/song.rb in grooveshark-0.2.1 vs lib/grooveshark/song.rb in grooveshark-0.2.2

- old
+ new

@@ -1,11 +1,11 @@ module Grooveshark class Song attr_reader :data attr_reader :id, :artist_id, :album_id - attr_reader :name, :artist, :album, :track - attr_reader :duraion, :artwork, :playcount + attr_reader :name, :artist, :album, :track, :year + attr_reader :duration, :artwork, :playcount def initialize(data=nil) unless data.nil? @data = data @id = data['song_id'] @@ -16,9 +16,10 @@ @album_id = data['album_id'] @track = data['track_num'] @duration = data['estimate_duration'] @artwork = data['cover_art_filename'] @playcount = data['song_plays'] + @year = data['year'] end end # Presentable format def to_s