aniview 2.1.2 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/aniview +4 -4
- data/lib/aniview.rb +1 -1
- data/lib/aniview/interface/animeio/animefile.rb +4 -2
- data/lib/aniview/interface/animeio/animeio.rb +226 -175
- data/lib/aniview/interface/animeio/animeseries.rb +29 -45
- data/lib/aniview/interface/bridge.rb +11 -0
- data/lib/aniview/interface/deluge/delugec.rb +16 -10
- data/lib/aniview/interface/item.rb +3 -0
- data/lib/aniview/interface/mpv/mpvbridge.rb +38 -8
- data/lib/aniview/interface/pref/defaults.json +6 -5
- data/lib/aniview/interface/pref/pref.rb +40 -16
- data/lib/aniview/interface/pref/validate.json +2 -1
- data/lib/aniview/interface/schedule/schedule.rb +17 -18
- data/lib/aniview/interface/subscription/subscription.rb +22 -16
- data/lib/aniview/util/util.rb +1 -1
- data/lib/aniview/view/aiomenu.rb +15 -23
- data/lib/aniview/view/delugemenu.rb +12 -21
- data/lib/aniview/view/menu.rb +123 -91
- data/lib/aniview/view/prefmenu.rb +11 -27
- data/lib/aniview/view/schedulemenu.rb +0 -11
- data/lib/aniview/view/statusline.rb +42 -5
- data/lib/aniview/view/subscriptionmenu.rb +16 -20
- data/lib/application.rb +89 -68
- data/lib/daemon.rb +20 -6
- metadata +3 -2
data/lib/daemon.rb
CHANGED
@@ -35,6 +35,7 @@ module Aniview
|
|
35
35
|
@looped = 0
|
36
36
|
@matches = 0
|
37
37
|
@lastchecked = "never"
|
38
|
+
@nextcheck = 0
|
38
39
|
|
39
40
|
$stdout.reopen(@pref.parseDir(@pref.get("daemon_log_file")), "w")
|
40
41
|
$stderr.reopen(@pref.parseDir(@pref.get("daemon_log_file")), "w")
|
@@ -63,6 +64,12 @@ module Aniview
|
|
63
64
|
puts "server isn't running"
|
64
65
|
quit
|
65
66
|
end
|
67
|
+
when "restart"
|
68
|
+
if @c.server?
|
69
|
+
@c.stopDaemon
|
70
|
+
else
|
71
|
+
puts "server not running, just starting it"
|
72
|
+
end
|
66
73
|
when "info"
|
67
74
|
if @c.server?
|
68
75
|
puts @c.info
|
@@ -80,6 +87,9 @@ module Aniview
|
|
80
87
|
when "items"
|
81
88
|
p @c.getItems
|
82
89
|
quit
|
90
|
+
when "log"
|
91
|
+
puts @pref.parseDir(@pref.get("daemon_log_file"))
|
92
|
+
quit
|
83
93
|
else
|
84
94
|
puts "unknown command, dude!"
|
85
95
|
quit
|
@@ -106,10 +116,12 @@ module Aniview
|
|
106
116
|
@schedule.load
|
107
117
|
@matches += @subscription.matchAll(verbose: true)
|
108
118
|
end
|
109
|
-
|
110
|
-
#p @schedule.getAll
|
111
119
|
@looped += 1
|
112
|
-
|
120
|
+
r_interval = Integer(@pref.get("rss_feed")["refresh_interval"])
|
121
|
+
(0..r_interval).each { |i|
|
122
|
+
@nextcheck = r_interval - i
|
123
|
+
sleep 1
|
124
|
+
}
|
113
125
|
end
|
114
126
|
end
|
115
127
|
end
|
@@ -139,7 +151,7 @@ module Aniview
|
|
139
151
|
client = @s.accept
|
140
152
|
|
141
153
|
message = client.gets.chomp.split(" ")
|
142
|
-
puts "got msg #{message} from client"
|
154
|
+
#puts "got msg #{message} from client"
|
143
155
|
response = "okay."
|
144
156
|
|
145
157
|
message.each_with_index { |m, i|
|
@@ -154,9 +166,11 @@ module Aniview
|
|
154
166
|
when "lastchecked"
|
155
167
|
response = @lastchecked
|
156
168
|
when "items"
|
157
|
-
response = Util.encode_object(@schedule.
|
169
|
+
response = Util.encode_object(@schedule.schedule)
|
158
170
|
when "itemshash"
|
159
171
|
response = @schedule.getAllCereal
|
172
|
+
when "nextcheck"
|
173
|
+
response = "#{@nextcheck}"
|
160
174
|
else
|
161
175
|
response = "what?"
|
162
176
|
end
|
@@ -164,7 +178,7 @@ module Aniview
|
|
164
178
|
|
165
179
|
response += "\n"
|
166
180
|
|
167
|
-
puts "responding with #{response}"
|
181
|
+
#puts "responding with #{response}"
|
168
182
|
client.puts response
|
169
183
|
client.close
|
170
184
|
quit if lastloop
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aniview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- annacrombie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: streamio-ffmpeg
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- "./lib/aniview/interface/animeio/animefile.rb"
|
143
143
|
- "./lib/aniview/interface/animeio/animeio.rb"
|
144
144
|
- "./lib/aniview/interface/animeio/animeseries.rb"
|
145
|
+
- "./lib/aniview/interface/bridge.rb"
|
145
146
|
- "./lib/aniview/interface/deluge/delugec.rb"
|
146
147
|
- "./lib/aniview/interface/deluge/torrentitem.rb"
|
147
148
|
- "./lib/aniview/interface/item.rb"
|