gtk2mp3 1.2.0 → 1.3.0

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
  SHA256:
3
- metadata.gz: 1024616e4fdea6a3b8a63d5b6c1beb7dc4417bce3bfc7f0bd53943ae9f57d85c
4
- data.tar.gz: 8d97320e538e17ed981c1d7f2b658926ef51ea34ebc1f225c2b2a194409027d7
3
+ metadata.gz: 61b19fd0927ed6a8281d93b5ba5fb9ba92d1af3a3cb96b30dfad5e629458a654
4
+ data.tar.gz: c2fec4dd379e65e185543f9b48a66a89a4dfa7246a157962948c0b84ef69e1c6
5
5
  SHA512:
6
- metadata.gz: 0de5a921598d138ea7b3d0ed52352911d6d0530d2a77333ffcb4b683ee955484a731edc891906deff6082941594c4d5824d33be47f3f3fae1e39e1a1705923dd
7
- data.tar.gz: 1c1f979084293705a941ede0ee2a91ee7468a3c24d6b97b479dbfc90c446463dae6c1bada4edad9aae7eff579524242a6fd7969ef55d59c96a5dab28f701294e
6
+ metadata.gz: 9494350c7131ec210300a56e2cd6b084a957b7d621955f64e28f54e5cc2c1ac7c942074ec6204752caa652fa55aa9764ab175cd961de13e3b59bb7847846a3bf
7
+ data.tar.gz: 9158c2a4d38bf680becb41f5cdda5789f72dc3f77e34595ca647c6016e997ae7f0ad417fb82692b58b7a4fe4ddd96904a9cde3a8e30ac6c53928fd40f9c87bae
data/README.md CHANGED
@@ -10,7 +10,7 @@ A "Next!" button gui for MPD/MPC.
10
10
 
11
11
  ## SYNOPSIS
12
12
 
13
- gtk2mp3 --help
13
+ gtk2mp3
14
14
 
15
15
  ## INSTALL
16
16
 
@@ -1,10 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'help_parser'
3
+ require 'gtk2mp3'
3
4
 
4
- module Gtk2Mp3
5
- VERSION = '1.2.0'
6
- end
7
- OPTIONS = HelpParser[Gtk2Mp3::VERSION,<<HELP]
5
+ OPTIONS = HelpParser[Gtk2Mp3::VERSION, <<HELP]
8
6
  Usage:
9
7
  gtk2mp3 [:options+]
10
8
  Options:
@@ -23,17 +21,18 @@ unless OPTIONS.noinit?
23
21
  exit 69 # EX_UNAVAILABLE
24
22
  end
25
23
  end
26
- unless system 'mpc --wait update' and
27
- system 'mpc clear' and
28
- system 'mpc ls | mpc add' and
29
- system 'mpc consume off' and
30
- system 'mpc repeat off' and
31
- system 'mpc random on' and
32
- system 'mpc single on'
24
+ unless system "mpc --wait update" and
25
+ system "mpc clear" and
26
+ system "mpc ls | mpc add" and
27
+ system "mpc consume off" and
28
+ system "mpc repeat off" and
29
+ system "mpc random on" and
30
+ system "mpc single on"
33
31
  $stderr.puts 'Could not initialize mpd\'s playlist'
34
32
  exit 76 # EX_PROTOCOL
35
33
  end
36
34
  end
37
35
 
38
- require 'gtk2mp3'
36
+ Gtk2Mp3.requires
39
37
  Gtk3App.main(Gtk2Mp3)
38
+
@@ -0,0 +1 @@
1
+ The dbm.json file will be in this cache directory.
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.3.0
@@ -1,13 +1,19 @@
1
- # This is a Gtk3App.
2
- require 'gtk3app'
1
+ module Gtk2Mp3
2
+ VERSION = '1.3.0'
3
3
 
4
- # Standard Libraries
5
- require 'json'
6
- require 'shellwords'
4
+ def self.requires
5
+ # This is a Gtk3App.
6
+ require 'gtk3app'
7
7
 
8
- # This Gem.
9
- require_relative 'gtk2mp3/config.rb'
10
- require_relative 'gtk2mp3/gui.rb'
8
+ # Standard Libraries
9
+ require 'json'
10
+ require 'shellwords'
11
+
12
+ # This Gem.
13
+ require_relative 'gtk2mp3/config.rb'
14
+ require_relative 'gtk2mp3/gui.rb'
15
+ end
16
+ end
11
17
 
12
18
  # Requires:
13
19
  #`ruby`
@@ -79,11 +79,11 @@ module Gtk2Mp3
79
79
  @label = Such::Label.new(vbox)
80
80
  menu.each{|_|_.destroy if _.key==:fs! or _.key==:help!}
81
81
  minime.each{|_|_.destroy}
82
- minime.append_menu_item(:stop_item!){stop_song!} if CONFIG[:ITEMS].include?(:stop_item!)
83
- minime.append_menu_item(:next_item!){next_song!} if CONFIG[:ITEMS].include?(:next_item!)
82
+ minime.add_menu_item(:stop_item!){stop_song!} if CONFIG[:ITEMS].include?(:stop_item!)
83
+ minime.add_menu_item(:next_item!){next_song!} if CONFIG[:ITEMS].include?(:next_item!)
84
84
 
85
85
  # Inits
86
- @db = JSON.parse File.read(CONFIG[:DBM])
86
+ @db = File.exist?(_=CONFIG[:DBM]) ? JSON.parse(File.read(_)) : {}
87
87
  @list = `mpc listall`.lines.map{|_|ID[_]}.uniq
88
88
  # A fuzzy delete of possibly gone keys...
89
89
  @db.keys.each{|id| down(id) unless @list.include?(id)}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk2mp3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - carlosjhr64
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-17 00:00:00.000000000 Z
11
+ date: 2018-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: help_parser
@@ -36,20 +36,20 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '2.1'
39
+ version: '3.0'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 2.1.0
42
+ version: 3.0.0
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '2.1'
49
+ version: '3.0'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 2.1.0
52
+ version: 3.0.0
53
53
  description: 'A "Next!" button gui for MPD/MPC.
54
54
 
55
55
  '
@@ -62,7 +62,7 @@ files:
62
62
  - LICENSE
63
63
  - README.md
64
64
  - bin/gtk2mp3
65
- - cache/dbm.json
65
+ - cache/README.txt
66
66
  - data/VERSION
67
67
  - data/logo.png
68
68
  - lib/gtk2mp3.rb
@@ -1 +0,0 @@
1
- {}