rmpv 0.0.3 → 0.0.4
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 +4 -4
- data/lib/rmpv/option.rb +14 -0
- data/lib/rmpv/trakt.rb +8 -0
- data/lib/rmpv/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c7901aeacf5e7ab66a9b362bac284bb5e3b06a0
|
4
|
+
data.tar.gz: 47922eb7b9d029e877bf74e8bd62d71d23fc432d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb60a305edcceefac71b62ca55415a2abe8fed64003438575d4ddd8577497f0be08fdb8a7f8a0a2a37e45ea9f925e2838bd814b25cdbc7bb34498c2b3f98e66b
|
7
|
+
data.tar.gz: 2ce8d2b19515bea84d575e0399dcd06fc99e556b5e8dad9285685ea5eca2c791df48fa3c87d9e4a568581db6993ba24d93f04a39a3ad2f0f09774165e5e31edf
|
data/lib/rmpv/option.rb
CHANGED
@@ -7,8 +7,19 @@
|
|
7
7
|
|
8
8
|
require "optparse"
|
9
9
|
|
10
|
+
##
|
11
|
+
# This class represents the options that can be passed to `rmpv`
|
12
|
+
|
10
13
|
module Rmpv
|
11
14
|
class Option
|
15
|
+
##
|
16
|
+
# Parses the commandline options
|
17
|
+
# args : the arguments to be passed
|
18
|
+
# cmd : variable to which options are being added
|
19
|
+
# options : value of the options
|
20
|
+
#
|
21
|
+
# returns the new cmd and options
|
22
|
+
|
12
23
|
def self.parse args, cmd, options
|
13
24
|
begin
|
14
25
|
OptionParser.new do |opts|
|
@@ -49,6 +60,9 @@ module Rmpv
|
|
49
60
|
return cmd, options
|
50
61
|
end
|
51
62
|
|
63
|
+
##
|
64
|
+
# Adds options to the command to be passed to mpv
|
65
|
+
|
52
66
|
def self.command cmd, options
|
53
67
|
# size
|
54
68
|
if options[:size]
|
data/lib/rmpv/trakt.rb
CHANGED
@@ -10,10 +10,18 @@ require "yaml"
|
|
10
10
|
|
11
11
|
module Rmpv
|
12
12
|
class Trakt
|
13
|
+
|
14
|
+
##
|
15
|
+
# Initialize the trakt client
|
16
|
+
|
13
17
|
def initialize
|
14
18
|
traktconfig = YAML.load File.open("#{Dir.home}/.traktrc")
|
15
19
|
@trakt = Traktr::Client.new(traktconfig["api_key"], traktconfig["username"], traktconfig["password"], true)
|
16
20
|
end
|
21
|
+
|
22
|
+
##
|
23
|
+
# Scrobble the show
|
24
|
+
|
17
25
|
def scrobble show
|
18
26
|
tries = 5
|
19
27
|
begin
|
data/lib/rmpv/version.rb
CHANGED