poddb_client 0.1.2 → 0.1.3

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.
@@ -1,3 +1,3 @@
1
1
  class PoddbClient
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
data/lib/poddb_client.rb CHANGED
@@ -114,7 +114,7 @@ class PoddbClient
114
114
  puts res
115
115
  else
116
116
  podcast_id, title = res.split(/\s+/, 2)
117
- add_to_favorite_podcasts(podcast_id)
117
+ add_to_favorite_podcasts(podcast_id, title)
118
118
  end
119
119
  end
120
120
 
@@ -182,11 +182,13 @@ private
182
182
  end
183
183
  end
184
184
 
185
- def add_to_favorite_podcasts(podcast_id)
185
+ def add_to_favorite_podcasts(podcast_id, title)
186
186
  if File.size?(FAVORITE_PODCASTS_FILE) && File.read(FAVORITE_PODCASTS_FILE).split("\n").any? {|line| line.strip == podcast_id.to_s}
187
+ puts "'#{title}' [##{podcast_id}] is already in your favorite podcasts. Type `poddb -F` to show your favorites."
187
188
  return
188
189
  end
189
190
  if podcast_id !~ /\d/
191
+ puts "Error: No podcast detected for #{podcast_id}"
190
192
  return
191
193
  end
192
194
  podcast_id = podcast_id.to_i
data/poddb_client.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
 
11
11
  s.authors = ["Daniel Choi"]
12
12
  s.email = ["dhchoi@gmail.com"]
13
- s.homepage = "http://danielchoi.com/software/poddb_client.html"
13
+ s.homepage = "http://danielchoi.com/software/poddb.html"
14
14
  s.summary = %q{Podcast aggregation from the command line}
15
15
  s.description = %q{Podcast aggregation from the command line}
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poddb_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -29,7 +29,7 @@ files:
29
29
  - lib/poddb_client/downloading.rb
30
30
  - lib/poddb_client/version.rb
31
31
  - poddb_client.gemspec
32
- homepage: http://danielchoi.com/software/poddb_client.html
32
+ homepage: http://danielchoi.com/software/poddb.html
33
33
  licenses: []
34
34
  post_install_message: ! '*******************************************************************
35
35