cinema 1.0.0 → 1.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b5b84f893f905cdb8b147bd0d433a79edb1daa4
4
- data.tar.gz: c90843d5ad33fa0ace07d5a7552ae1f944fc9494
3
+ metadata.gz: 279068199ec31886b4da8d674d1068d34990aac5
4
+ data.tar.gz: a07c1f9c82e46c84a44faf5afa8859125e2a9b48
5
5
  SHA512:
6
- metadata.gz: b19e074c8df46e175b20188df7a62c9e51b579adb3237e1d43ccb2920d04f4aec450797b3e571cc868d0e6d1c5c8357d59b35db9890ec2301c5f8c6d8dcaa7c1
7
- data.tar.gz: 57b4e0741c02a5ababde98759ef4393336f18739aedf8bd6fba00655ac8dbfd5f169897d45bf257dbf919c42d81c0611702e18fb6a61f803e34986a0b0950860
6
+ metadata.gz: 40bdafb8164395b54840e1e1d10396a58e8627f43419fcd3140fc3108189864fece027921f0c6cdff76fc84ae3d24fde338b07752cc1f0687d89885c7b7f4d29
7
+ data.tar.gz: 411efb3f2210e753bcec8d17a37beb2ccffb93f22040211b97cc5cee52e5bf8fa69c557500c98da2d474ebdba8112608be9dcbb3ad0240301e9eabcb73038403
@@ -18,9 +18,13 @@ module Cinema
18
18
  def select(title, items, title_proc)
19
19
  menu_items = items.each_with_index.map{|x,i| [i.to_s, title_proc.(x)]}
20
20
  index = capture_stderr do
21
- system 'dialog', '--title', title,
21
+ success = system 'dialog', '--title', title,
22
22
  '--menu', '', '0', '0', '0',
23
23
  *menu_items.flatten
24
+ unless success
25
+ puts "\nCancelled"
26
+ exit 0
27
+ end
24
28
  end.to_i
25
29
  items[index]
26
30
  end
@@ -28,7 +32,7 @@ module Cinema
28
32
  def watchlist
29
33
  with_unreliable_api do
30
34
  puts "Requesting watchlist..."
31
- trakt.user.watchlist.movies
35
+ trakt.user.watchlist.movies.sort_by{|x| x["title"]}
32
36
  end
33
37
  end
34
38
 
@@ -1,3 +1,3 @@
1
1
  module Cinema
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cinema
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ales Guzik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-29 00:00:00.000000000 Z
11
+ date: 2015-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,3 +108,4 @@ signing_key:
108
108
  specification_version: 4
109
109
  summary: Select movie from trakt.tv watchlist and stream it from torrents
110
110
  test_files: []
111
+ has_rdoc: