ampv 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/ampv.rb +6 -1
- data/lib/ampv/config.rb +1 -0
- data/lib/ampv/mpvwidget.rb +8 -4
- data/lib/ampv/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDlmNGYzOTM1YzRmYTQ2ZmI4MDkzZjhjYWQ4ODgwMDlkNjU4YjU5MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2ZlYmE2N2QxZGIxNmJjNmYxMjc4ZTgzMTg5N2U5ZTQyNjkyM2ZiMQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDMyMTlkZDc0NTk5YTIzOGRjOGJhZDRkYzlkNjFiM2NkYzI2ZGY2MGE5ZTBk
|
10
|
+
Mzc5YzkzYWQ0MGNjMDMxZTQyNzdlOGZhZjVhYmZiMzg2MDlmMTFmYjdjN2Jk
|
11
|
+
NTk0ZGU1ZWQ0MTg2MTZjZjc5OWQ2MmZkMjJhMWY5ODI1OTczNTU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmYwZDRiYWQyNjg0NTM5Y2JkNGY5NzZjY2Y4MjVmOGI3ODRjOWQyMzU0MmEx
|
14
|
+
MWUwZjEwZDdlZWVlMTEwZTc2OTFmMWY0MzI4YTc5OTFmYmI2NjVhYzlhMTVi
|
15
|
+
MDY0N2MxMzI2MTY5MTAxMGNkMWI5YTE3ZDBlOWM2NDFlZGQ2YmM=
|
data/lib/ampv.rb
CHANGED
@@ -131,7 +131,11 @@ module Ampv
|
|
131
131
|
end
|
132
132
|
elsif Config["playlist"].length > 0
|
133
133
|
Config["playlist"].each { |x| @playlist.add_file(x["file"], x["length"], x["watched"]) }
|
134
|
-
|
134
|
+
if Config["resume_playback"]
|
135
|
+
@mpv.load_file(Config["playlist_selected"])
|
136
|
+
else
|
137
|
+
@playlist.set_selected(Config["playlist_selected"])
|
138
|
+
end
|
135
139
|
end
|
136
140
|
|
137
141
|
Gtk.main
|
@@ -299,6 +303,7 @@ module Ampv
|
|
299
303
|
Config["playlist_visible"] = @playlist.visible?
|
300
304
|
Config["playlist_selected"] = @playing
|
301
305
|
Config["playlist"] = @playlist.get_entries.to_json
|
306
|
+
Config["resume_playback"] = !@mpv.is_stopped && (watch_later || Config["always_save_position"])
|
302
307
|
Config["progress_bar_visible"] = @progress_bar.visible?
|
303
308
|
Config.save
|
304
309
|
|
data/lib/ampv/config.rb
CHANGED
data/lib/ampv/mpvwidget.rb
CHANGED
@@ -18,7 +18,7 @@ module Ampv
|
|
18
18
|
end
|
19
19
|
}
|
20
20
|
|
21
|
-
attr_reader :is_paused
|
21
|
+
attr_reader :is_paused, :is_stopped
|
22
22
|
|
23
23
|
def initialize(args)
|
24
24
|
if args.include?("--debug")
|
@@ -35,7 +35,10 @@ module Ampv
|
|
35
35
|
|
36
36
|
@socket = Gtk::Socket.new
|
37
37
|
@socket.modify_bg(Gtk::STATE_NORMAL, Gdk::Color.parse("#000"))
|
38
|
-
@socket.signal_connect("plug_removed") {
|
38
|
+
@socket.signal_connect("plug_removed") {
|
39
|
+
signal_emit("stopped")
|
40
|
+
@is_stopped = true
|
41
|
+
}
|
39
42
|
|
40
43
|
add(@socket)
|
41
44
|
end
|
@@ -56,13 +59,13 @@ module Ampv
|
|
56
59
|
|
57
60
|
def stop
|
58
61
|
send("stop")
|
59
|
-
@is_paused = true
|
62
|
+
@is_stopped = @is_paused = true
|
60
63
|
end
|
61
64
|
|
62
65
|
def quit(watch_later)
|
63
66
|
send("quit" + (watch_later ? "_watch_later" : ""))
|
64
|
-
@thread.kill if @thread
|
65
67
|
@prog_thread.kill if @prog_thread
|
68
|
+
@thread.join
|
66
69
|
@fifo.close
|
67
70
|
end
|
68
71
|
|
@@ -89,6 +92,7 @@ module Ampv
|
|
89
92
|
send("get_property length")
|
90
93
|
send("get_property time-pos")
|
91
94
|
send("get_property pause")
|
95
|
+
@is_stopped = false
|
92
96
|
elsif line.start_with?("ANS_length=")
|
93
97
|
signal_emit("length_changed", (@length = line.rpartition("=")[-1].to_i))
|
94
98
|
elsif line.start_with?("ANS_pause=")
|
data/lib/ampv/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ampv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ahoka
|
@@ -61,11 +61,11 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- LICENSE
|
63
63
|
- input.conf
|
64
|
-
- lib/ampv/config.rb
|
65
64
|
- lib/ampv/playlist.rb
|
66
65
|
- lib/ampv/version.rb
|
67
|
-
- lib/ampv/progressbarwidget.rb
|
68
66
|
- lib/ampv/mpvwidget.rb
|
67
|
+
- lib/ampv/progressbarwidget.rb
|
68
|
+
- lib/ampv/config.rb
|
69
69
|
- lib/ampv.rb
|
70
70
|
- bin/ampv
|
71
71
|
homepage: https://github.com/ahodesuka/ampv
|