alexa_couchpotato 1.0.8 → 1.0.9

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: ec156337c1579d1ddb8440d29779f872daf885d9
4
- data.tar.gz: 48ec8ce763c0f9ad52e44451bd5264565f37aef7
3
+ metadata.gz: 54d8ac62adbbbc7e723a4f0fc0d5bbdf7e65e62b
4
+ data.tar.gz: b85ff938ddc1b27cf398f4aa2a33f9e375065c06
5
5
  SHA512:
6
- metadata.gz: 4f6a8f1f843264f39f7151eeb8b718a3e9b306b531ca4598f8de351f36e9ccf4478b18bb74337fa55f9631c17843f12743a0377c6ab4d9f60ebe50de6f98699a
7
- data.tar.gz: 88a14635501103217bbfe4cba56c4d6f83a5b38601bdcaf6f2891aa58b8a22dc532d250372d62640e7e76df32e7639eccd5106217cbad3eb8a1fc7d35270f47c
6
+ metadata.gz: a278ecbdf177bbeb3c726b7b09dfbc4e188c9ee904aeceb1f1751a282365f561e700a060d9732ea7db1cce62e1c676cbf4c52e9f4ed24771bd52f152234d7468
7
+ data.tar.gz: 698ced9487cd001b50d0296c5caa3b739fc0588f9aec37f73b904fba4a478c3c3f332029f06c7569c598df89d275828d4ebddc317c6ce85dc877b19c8a011725
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module Couchpotato
3
- VERSION = "1.0.8"
3
+ VERSION = "1.0.9"
4
4
  end
5
5
  end
@@ -20,7 +20,7 @@ module Sinatra
20
20
  @application_id = @echo_request.application_id
21
21
  end
22
22
  end
23
-
23
+
24
24
  app.post '/alexa_cp' do
25
25
  content_type :json
26
26
 
@@ -33,7 +33,7 @@ module Sinatra
33
33
  response.without_card.to_json
34
34
  puts @echo_request.slots
35
35
  elsif @echo_request.intent_name == "ControlCouchpotato"
36
- count = 1
36
+ count = 1URI.escape(
37
37
  begin
38
38
  case count
39
39
  when 1
@@ -47,7 +47,7 @@ module Sinatra
47
47
  title << " " unless index == word_arr.length-1
48
48
  end
49
49
  end
50
- query = HTTParty.get("http://highasfuck.science/movies/api/550dfd233ffe453096c39293f4e38121/search?q=#{title}")
50
+ query = HTTParty.get(URI.escape("http://highasfuck.science/movies/api/550dfd233ffe453096c39293f4e38121/search?q=#{title}"))
51
51
  if query["movies"] && query["movies"].count == 1
52
52
  movie = query["movies"].first
53
53
  elsif query["movies"] && query["movies"].count > 1
@@ -59,7 +59,7 @@ module Sinatra
59
59
  response = AlexaObjects::Response.new
60
60
 
61
61
  if [movie].flatten(1).count == 1 && movie != false
62
- add_query = HTTParty.get("http://highasfuck.science/movies/api/550dfd233ffe453096c39293f4e38121/movie.add?title=#{movie["titles"].first}&identifier#{movie["imdb"]}")
62
+ add_query = HTTParty.get(URI.escape("http://highasfuck.science/movies/api/550dfd233ffe453096c39293f4e38121/movie.add?title=#{movie["titles"].first}&identifier#{movie["imdb"]}"))
63
63
  if add_query["success"] = true
64
64
  response.end_session = true
65
65
  response.spoken_response = "okay, downloading #{movie["titles"].first}"
@@ -84,7 +84,7 @@ module Sinatra
84
84
  ordinal = Chronic::Numerizer.numerize(@echo_request.slots["listvalue"]).split(' ').last
85
85
  number = ordinal[0]
86
86
  movie = @@movies[number.to_i+1]
87
- query = HTTParty.get("http://highasfuck.science/movies/api/550dfd233ffe453096c39293f4e38121/movie.add?title=#{movie["titles"].first}&identifier#{movie["imdb"]}")
87
+ query = HTTParty.get(URI.escape("http://highasfuck.science/movies/api/550dfd233ffe453096c39293f4e38121/movie.add?title=#{movie["titles"].first}&identifier#{movie["imdb"]}"))
88
88
  response = AlexaObjects::Response.new
89
89
  if movie != false && query["success"] = true
90
90
  response.end_session = true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexa_couchpotato
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Lucas