kodi_client 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/kodi_client.gemspec +1 -1
- data/lib/kodi_client/Chainable.rb +3 -1
- data/lib/kodi_client/global_types/addon_types.rb +60 -48
- data/lib/kodi_client/global_types/application_types.rb +19 -16
- data/lib/kodi_client/global_types/audio_types.rb +41 -29
- data/lib/kodi_client/global_types/favourites_types.rb +17 -16
- data/lib/kodi_client/global_types/global_types.rb +18 -24
- data/lib/kodi_client/global_types/gui_types.rb +21 -15
- data/lib/kodi_client/global_types/item_types.rb +6 -2
- data/lib/kodi_client/global_types/list_types.rb +188 -95
- data/lib/kodi_client/global_types/media_types.rb +16 -11
- data/lib/kodi_client/global_types/player_type.rb +126 -107
- data/lib/kodi_client/global_types/profiles_types.rb +23 -13
- data/lib/kodi_client/global_types/system_types.rb +6 -9
- data/lib/kodi_client/global_types/video_types.rb +66 -41
- data/lib/kodi_client/method/addons.rb +2 -3
- data/lib/kodi_client/method/application.rb +1 -1
- data/lib/kodi_client/method/favourites.rb +1 -1
- data/lib/kodi_client/method/gui.rb +2 -2
- data/lib/kodi_client/method/player.rb +6 -6
- data/lib/kodi_client/method/profiles.rb +2 -2
- data/lib/kodi_client/method/system.rb +1 -1
- data/lib/kodi_client/util/comparable.rb +4 -1
- data/lib/kodi_client/util/creatable.rb +52 -0
- data/lib/kodi_client.rb +5 -9
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0dd073d0e999df44e921b07f3aab1c148ee3647a584e2de13a2c070a151f7a2b
|
4
|
+
data.tar.gz: 00ac80c0f82b4bfcb0031e8cc2abf6e4c894ccff58515fcdfd08fbe1c3b7fb63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1a718355773fd1a1e12127f334f74a9bc1d9382ec47e9143a2dc776e1bb056157f4ac5ca0ec1232b14c27c8cc55bacacae1b37e0b831213af7472c2aeef16ec
|
7
|
+
data.tar.gz: e6dccd2f74a7c2f7a4790635b21f01730c88a69bfe47c6b8905b500dade3b650689506640a2428c00824ca03097658906563a7f88806aad094a3dc64d7edcf0c
|
data/kodi_client.gemspec
CHANGED
@@ -24,7 +24,7 @@ module KodiClient
|
|
24
24
|
client = def_client
|
25
25
|
options = def_options
|
26
26
|
set_command.call(options)
|
27
|
-
client.
|
27
|
+
client.apply_options_to_methods(options)
|
28
28
|
client
|
29
29
|
end
|
30
30
|
|
@@ -43,5 +43,7 @@ module KodiClient
|
|
43
43
|
end
|
44
44
|
@options
|
45
45
|
end
|
46
|
+
|
47
|
+
private :def_client, :def_options, :merge_options
|
46
48
|
end
|
47
49
|
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'kodi_client/global_types/item_types'
|
4
4
|
require 'kodi_client/util/comparable'
|
5
5
|
require 'kodi_client/util/iterable'
|
6
|
+
require 'kodi_client/util/creatable'
|
6
7
|
|
7
8
|
module KodiClient
|
8
9
|
module Types
|
@@ -10,7 +11,7 @@ module KodiClient
|
|
10
11
|
|
11
12
|
# Addon Types https://kodi.wiki/view/JSON-RPC_API/v12#Addon.Types
|
12
13
|
module AddonTypes
|
13
|
-
|
14
|
+
extend Iterable
|
14
15
|
|
15
16
|
UNKNOWN = 'unknown'
|
16
17
|
KODI_ADSP = 'kodi.adsp'
|
@@ -51,7 +52,8 @@ module KodiClient
|
|
51
52
|
|
52
53
|
# Addon.Content https://kodi.wiki/view/JSON-RPC_API/v12#Addon.Content
|
53
54
|
module AddonContent
|
54
|
-
|
55
|
+
extend Iterable
|
56
|
+
|
55
57
|
UNKNOWN = 'unknown'
|
56
58
|
AUDIO = 'audio'
|
57
59
|
EXECUTABLE = 'executable'
|
@@ -83,33 +85,27 @@ module KodiClient
|
|
83
85
|
# represents addon dependency
|
84
86
|
class AddonDependency
|
85
87
|
include Comparable
|
88
|
+
extend Creatable
|
86
89
|
|
87
|
-
attr_reader :
|
90
|
+
attr_reader :addon_id, :optional, :version
|
88
91
|
|
89
|
-
def initialize(
|
90
|
-
@
|
91
|
-
@optional =
|
92
|
-
@version =
|
93
|
-
end
|
94
|
-
|
95
|
-
def ==(other)
|
96
|
-
compare(self, other)
|
92
|
+
def initialize(addon_id, optional, version)
|
93
|
+
@addon_id = addon_id
|
94
|
+
@optional = optional
|
95
|
+
@version = version
|
97
96
|
end
|
98
97
|
end
|
99
98
|
|
100
99
|
# represents addon extra info
|
101
100
|
class AddonExtraInfo
|
102
101
|
include Comparable
|
102
|
+
extend Creatable
|
103
103
|
|
104
104
|
attr_reader :key, :value
|
105
105
|
|
106
|
-
def initialize(
|
107
|
-
@key =
|
108
|
-
@value =
|
109
|
-
end
|
110
|
-
|
111
|
-
def ==(other)
|
112
|
-
compare(self, other)
|
106
|
+
def initialize(key, value)
|
107
|
+
@key = key
|
108
|
+
@value = value
|
113
109
|
end
|
114
110
|
end
|
115
111
|
|
@@ -117,33 +113,43 @@ module KodiClient
|
|
117
113
|
class AddonDetails
|
118
114
|
include Comparable
|
119
115
|
include Items::ItemDetailsBase
|
116
|
+
extend Creatable
|
120
117
|
|
121
118
|
attr_reader :addon_id, :author, :broken, :dependencies, :description, :disclaimer, :enabled, :extra_info,
|
122
119
|
:fan_art, :installed, :name, :path, :rating, :summary, :thumbnail, :type, :version
|
123
120
|
|
124
|
-
def
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
@installed = hash['installed']
|
135
|
-
@name = hash['name']
|
136
|
-
@path = hash['path']
|
137
|
-
@rating = hash['rating']
|
138
|
-
@summary = hash['summary']
|
139
|
-
@thumbnail = hash['thumbnail']
|
140
|
-
@type = hash['type']
|
141
|
-
@version = hash['version']
|
142
|
-
item_details_base(hash)
|
121
|
+
def self.create(hash)
|
122
|
+
return nil if hash.nil?
|
123
|
+
|
124
|
+
dependencies = AddonDependency.create_list(hash['dependencies'])
|
125
|
+
extra_info = AddonExtraInfo.create_list(hash['extrainfo'])
|
126
|
+
|
127
|
+
new(hash['addonid'], hash['author'], hash['broken'], dependencies, hash['description'], hash['disclaimer'],
|
128
|
+
hash['enabled'], extra_info, hash['fanart'], hash['installed'], hash['name'], hash['path'],
|
129
|
+
hash['rating'], hash['summary'], hash['thumbnail'], hash['type'], hash['version'],
|
130
|
+
*hash_to_arr(hash, ['label']))
|
143
131
|
end
|
144
132
|
|
145
|
-
def
|
146
|
-
|
133
|
+
def initialize(addon_id, author, broken, dependencies, description, disclaimer, enabled, extra_info,
|
134
|
+
fan_art, installed, name, path, rating, summary, thumbnail, type, version, label)
|
135
|
+
@addon_id = addon_id
|
136
|
+
@author = author
|
137
|
+
@broken = broken
|
138
|
+
@dependencies = dependencies
|
139
|
+
@description = description
|
140
|
+
@disclaimer = disclaimer
|
141
|
+
@enabled = enabled
|
142
|
+
@extra_info = extra_info
|
143
|
+
@fan_art = fan_art
|
144
|
+
@installed = installed
|
145
|
+
@name = name
|
146
|
+
@path = path
|
147
|
+
@rating = rating
|
148
|
+
@summary = summary
|
149
|
+
@thumbnail = thumbnail
|
150
|
+
@type = type
|
151
|
+
@version = version
|
152
|
+
item_details_base(label)
|
147
153
|
end
|
148
154
|
end
|
149
155
|
|
@@ -153,13 +159,17 @@ module KodiClient
|
|
153
159
|
|
154
160
|
attr_reader :addons, :limits
|
155
161
|
|
156
|
-
def
|
157
|
-
|
158
|
-
|
162
|
+
def self.create(hash)
|
163
|
+
return nil if hash.nil?
|
164
|
+
|
165
|
+
addons = AddonDetails.create_list(hash['addons'])
|
166
|
+
limits = List::ListLimitsReturned.create(hash['limits'])
|
167
|
+
new(addons, limits)
|
159
168
|
end
|
160
169
|
|
161
|
-
def
|
162
|
-
|
170
|
+
def initialize(addons, limits)
|
171
|
+
@addons = addons
|
172
|
+
@limits = limits
|
163
173
|
end
|
164
174
|
end
|
165
175
|
|
@@ -169,12 +179,14 @@ module KodiClient
|
|
169
179
|
|
170
180
|
attr_reader :addon
|
171
181
|
|
172
|
-
def
|
173
|
-
|
182
|
+
def self.create(hash)
|
183
|
+
return nil if hash.nil?
|
184
|
+
|
185
|
+
new(AddonDetails.create(hash['addon']))
|
174
186
|
end
|
175
187
|
|
176
|
-
def
|
177
|
-
|
188
|
+
def initialize(addon)
|
189
|
+
@addon = addon
|
178
190
|
end
|
179
191
|
end
|
180
192
|
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'kodi_client/util/comparable'
|
4
4
|
require 'kodi_client/util/iterable'
|
5
|
+
require 'kodi_client/util/creatable'
|
5
6
|
|
6
7
|
module KodiClient
|
7
8
|
module Types
|
@@ -22,35 +23,37 @@ module KodiClient
|
|
22
23
|
# Application.Property.Value https://kodi.wiki/view/JSON-RPC_API/v12#Application.Property.Value
|
23
24
|
class PropertyValue
|
24
25
|
include Comparable
|
26
|
+
extend Creatable
|
25
27
|
|
26
28
|
attr_reader :name, :version, :muted, :volume
|
27
29
|
|
28
|
-
def
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
def self.create(hash)
|
31
|
+
return null if hash.nil?
|
32
|
+
|
33
|
+
version = Version.create(hash['version'])
|
34
|
+
new(hash['name'], version, hash['muted'], hash['volume'])
|
33
35
|
end
|
34
36
|
|
35
|
-
def
|
36
|
-
|
37
|
+
def initialize(name, version, muted, volume)
|
38
|
+
@name = name
|
39
|
+
@version = version
|
40
|
+
@muted = muted
|
41
|
+
@volume = volume
|
37
42
|
end
|
38
43
|
end
|
39
44
|
|
40
45
|
# represent application properties version
|
41
46
|
class Version
|
42
47
|
include Comparable
|
43
|
-
|
48
|
+
extend Creatable
|
44
49
|
|
45
|
-
|
46
|
-
@major = hash['major']
|
47
|
-
@minor = hash['minor']
|
48
|
-
@revision = hash['revision']
|
49
|
-
@tag = hash['tag']
|
50
|
-
end
|
50
|
+
attr_reader :major, :minor, :revision, :tag
|
51
51
|
|
52
|
-
def
|
53
|
-
|
52
|
+
def initialize(major, minor, revision, tag)
|
53
|
+
@major = major
|
54
|
+
@minor = minor
|
55
|
+
@revision = revision
|
56
|
+
@tag = tag
|
54
57
|
end
|
55
58
|
end
|
56
59
|
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'kodi_client/global_types/media_types'
|
4
4
|
require 'kodi_client/util/comparable'
|
5
5
|
require 'kodi_client/util/iterable'
|
6
|
+
require 'kodi_client/util/creatable'
|
6
7
|
|
7
8
|
module KodiClient
|
8
9
|
module Types
|
@@ -11,18 +12,15 @@ module KodiClient
|
|
11
12
|
# Audio.Contributor https://kodi.wiki/view/JSON-RPC_API/v12#Audio.Contributors
|
12
13
|
class AudioContributor
|
13
14
|
include Comparable
|
15
|
+
extend Creatable
|
14
16
|
|
15
17
|
attr_reader :artist_id, :name, :role, :role_id
|
16
18
|
|
17
|
-
def initialize(
|
18
|
-
@artist_id =
|
19
|
-
@name =
|
20
|
-
@role =
|
21
|
-
@role_id =
|
22
|
-
end
|
23
|
-
|
24
|
-
def ==(other)
|
25
|
-
compare(self, other)
|
19
|
+
def initialize(artist_id, name, role, role_id)
|
20
|
+
@artist_id = artist_id
|
21
|
+
@name = name
|
22
|
+
@role = role
|
23
|
+
@role_id = role_id
|
26
24
|
end
|
27
25
|
end
|
28
26
|
|
@@ -40,11 +38,16 @@ module KodiClient
|
|
40
38
|
|
41
39
|
attr_reader :art, :date_added, :genre
|
42
40
|
|
43
|
-
def
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
41
|
+
def audio_details_base_by_hash(hash)
|
42
|
+
audio_details_base(Types::Media::MediaArtwork.create(hash['art']), hash['date_added'], hash['genre'],
|
43
|
+
*Creatable.hash_to_arr(hash, %w[fan_art thumbnail label]))
|
44
|
+
end
|
45
|
+
|
46
|
+
def audio_details_base(art, date_added, genre, fan_art, thumbnail, label)
|
47
|
+
@art = art
|
48
|
+
@date_added = date_added
|
49
|
+
@genre = genre
|
50
|
+
media_details_base(fan_art, thumbnail, label)
|
48
51
|
end
|
49
52
|
end
|
50
53
|
|
@@ -52,23 +55,32 @@ module KodiClient
|
|
52
55
|
module AudioDetailsMedia
|
53
56
|
include AudioDetailsBase
|
54
57
|
|
55
|
-
attr_reader :artist, :artist_id, :display_artist, :
|
58
|
+
attr_reader :artist, :artist_id, :display_artist, :musicbrainz_album_artist_id, :original_date, :rating,
|
56
59
|
:release_date, :sort_artist, :title, :user_rating, :votes, :year
|
57
60
|
|
58
|
-
def
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
@
|
69
|
-
@
|
70
|
-
@
|
71
|
-
|
61
|
+
def audio_details_media_by_hash(hash)
|
62
|
+
audio_details_media(hash['artist'], hash['artistid'], hash['displayartist'], hash['musicbrainzalbumartistid'],
|
63
|
+
hash['originaldate'], hash['rating'], hash['releasedate'], hash['sortartist'],
|
64
|
+
hash['title'], hash['userrating'], hash['votes'], hash['year'],
|
65
|
+
*Creatable.hash_to_arr(hash, %w[art date_added genre fan_art thumbnail label]))
|
66
|
+
end
|
67
|
+
|
68
|
+
def audio_details_media(artist, artist_id, display_artist, musicbrainz_album_artist_id, original_date,
|
69
|
+
rating, release_date, sort_artist, title, user_rating, votes, year,
|
70
|
+
art, date_added, genre, fan_art, thumbnail, label)
|
71
|
+
@artist = artist
|
72
|
+
@artist_id = artist_id
|
73
|
+
@display_artist = display_artist
|
74
|
+
@musicbrainz_album_artist_id = musicbrainz_album_artist_id
|
75
|
+
@original_date = original_date
|
76
|
+
@rating = rating
|
77
|
+
@release_date = release_date
|
78
|
+
@sort_artist = sort_artist
|
79
|
+
@title = title
|
80
|
+
@user_rating = user_rating
|
81
|
+
@votes = votes
|
82
|
+
@year = year
|
83
|
+
audio_details_base(art, date_added, genre, fan_art, thumbnail, label)
|
72
84
|
end
|
73
85
|
end
|
74
86
|
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'kodi_client/util/comparable'
|
4
4
|
require 'kodi_client/util/iterable'
|
5
|
+
require 'kodi_client/util/creatable'
|
5
6
|
require 'kodi_client/global_types/list_types'
|
6
7
|
|
7
8
|
module KodiClient
|
@@ -32,36 +33,36 @@ module KodiClient
|
|
32
33
|
# Favourite.Details.Favourite https://kodi.wiki/view/JSON-RPC_API/v12#Favourite.Details.Favourite
|
33
34
|
class DetailsFavourite
|
34
35
|
include Comparable
|
36
|
+
extend Creatable
|
35
37
|
|
36
38
|
attr_reader :path, :thumbnail, :title, :type, :window, :window_parameter
|
37
39
|
|
38
|
-
def initialize(
|
39
|
-
@path =
|
40
|
-
@thumbnail =
|
41
|
-
@title =
|
42
|
-
@type =
|
43
|
-
@window =
|
44
|
-
@window_parameter =
|
45
|
-
end
|
46
|
-
|
47
|
-
def ==(other)
|
48
|
-
compare(self, other)
|
40
|
+
def initialize(path, thumbnail, title, type, window, window_parameter)
|
41
|
+
@path = path
|
42
|
+
@thumbnail = thumbnail
|
43
|
+
@title = title
|
44
|
+
@type = type
|
45
|
+
@window = window
|
46
|
+
@window_parameter = window_parameter
|
49
47
|
end
|
50
48
|
end
|
51
49
|
|
52
50
|
# return type for Favourites.GetFavourites
|
53
51
|
class GetFavouriteReturned
|
54
52
|
include Comparable
|
53
|
+
extend Creatable
|
55
54
|
|
56
55
|
attr_reader :favourites, :limits
|
57
56
|
|
58
|
-
def
|
59
|
-
|
60
|
-
|
57
|
+
def self.create(hash)
|
58
|
+
favourites = DetailsFavourite.create_list(hash['favourites'])
|
59
|
+
limits = Types::List::ListLimitsReturned.create(hash['limits'])
|
60
|
+
new(favourites, limits)
|
61
61
|
end
|
62
62
|
|
63
|
-
def
|
64
|
-
|
63
|
+
def initialize(favourites, limits)
|
64
|
+
@favourites = favourites
|
65
|
+
@limits = limits
|
65
66
|
end
|
66
67
|
end
|
67
68
|
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'kodi_client/util/comparable'
|
4
4
|
require 'kodi_client/util/iterable'
|
5
|
+
require 'kodi_client/util/creatable'
|
5
6
|
|
6
7
|
module KodiClient
|
7
8
|
module Types
|
@@ -9,7 +10,7 @@ module KodiClient
|
|
9
10
|
|
10
11
|
# Global.Toggle https://kodi.wiki/view/JSON-RPC_API/v12#Global.Toggle
|
11
12
|
module Toggle
|
12
|
-
|
13
|
+
extend Iterable
|
13
14
|
|
14
15
|
TOGGLE = 'toggle'
|
15
16
|
TRUE = true
|
@@ -55,48 +56,41 @@ module KodiClient
|
|
55
56
|
# id/label type
|
56
57
|
class IdLabel
|
57
58
|
include Comparable
|
58
|
-
|
59
|
+
extend Creatable
|
59
60
|
|
60
|
-
|
61
|
-
@id = hash['id']
|
62
|
-
@label = hash['label']
|
63
|
-
end
|
61
|
+
attr_reader :id, :label
|
64
62
|
|
65
|
-
def
|
66
|
-
|
63
|
+
def initialize(id, label)
|
64
|
+
@id = id
|
65
|
+
@label = label
|
67
66
|
end
|
68
67
|
end
|
69
68
|
|
70
69
|
# id/name type
|
71
70
|
class IdName
|
72
71
|
include Comparable
|
73
|
-
|
72
|
+
extend Creatable
|
74
73
|
|
75
|
-
|
76
|
-
@id = hash['id']
|
77
|
-
@name = hash['name']
|
78
|
-
end
|
74
|
+
attr_reader :id, :name
|
79
75
|
|
80
|
-
def
|
81
|
-
|
76
|
+
def initialize(id, name)
|
77
|
+
@id = id
|
78
|
+
@name = name
|
82
79
|
end
|
83
80
|
end
|
84
81
|
|
85
82
|
# Global.Time https://kodi.wiki/view/JSON-RPC_API/v12#Global.Time
|
86
83
|
class GlobalTime
|
87
84
|
include Comparable
|
85
|
+
extend Creatable
|
88
86
|
|
89
87
|
attr_reader :hours, :minutes, :seconds, :milliseconds
|
90
88
|
|
91
|
-
def initialize(
|
92
|
-
@hours =
|
93
|
-
@minutes =
|
94
|
-
@seconds =
|
95
|
-
@milliseconds =
|
96
|
-
end
|
97
|
-
|
98
|
-
def ==(other)
|
99
|
-
compare(self, other)
|
89
|
+
def initialize(hours, minutes, seconds, milliseconds)
|
90
|
+
@hours = hours
|
91
|
+
@minutes = minutes
|
92
|
+
@seconds = seconds
|
93
|
+
@milliseconds = milliseconds
|
100
94
|
end
|
101
95
|
end
|
102
96
|
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'kodi_client/global_types/global_types'
|
4
4
|
require 'kodi_client/util/comparable'
|
5
5
|
require 'kodi_client/util/iterable'
|
6
|
+
require 'kodi_client/util/creatable'
|
6
7
|
|
7
8
|
module KodiClient
|
8
9
|
module Types
|
@@ -10,6 +11,7 @@ module KodiClient
|
|
10
11
|
|
11
12
|
# GUI.Window https://kodi.wiki/view/JSON-RPC_API/v12#GUI.Window
|
12
13
|
module GUIWindow
|
14
|
+
extend Iterable
|
13
15
|
|
14
16
|
ACCESSPOINTS = 'accesspoints'
|
15
17
|
ADDON = 'addon'
|
@@ -139,6 +141,7 @@ module KodiClient
|
|
139
141
|
class StereoscopyMode
|
140
142
|
include Comparable
|
141
143
|
include Iterable
|
144
|
+
extend Creatable
|
142
145
|
|
143
146
|
attr_reader :label, :mode
|
144
147
|
|
@@ -152,32 +155,35 @@ module KodiClient
|
|
152
155
|
ANAGLYPH_YELLOW_BLUE = 'anaglyph_yellow_blue'
|
153
156
|
MONSCOPIC = 'monoscopic'
|
154
157
|
|
155
|
-
def initialize(
|
156
|
-
@label =
|
157
|
-
@mode =
|
158
|
-
end
|
159
|
-
|
160
|
-
def ==(other)
|
161
|
-
compare(self, other)
|
158
|
+
def initialize(label, mode)
|
159
|
+
@label = label
|
160
|
+
@mode = mode
|
162
161
|
end
|
163
162
|
end
|
164
163
|
|
165
164
|
# GUI.Property.Value https://kodi.wiki/view/JSON-RPC_API/v12#GUI.Property.Value
|
166
165
|
class PropertyValue
|
167
166
|
include Comparable
|
167
|
+
extend Creatable
|
168
168
|
|
169
169
|
attr_reader :current_control, :current_window, :fullscreen, :skin, :stereoscopic_mode
|
170
170
|
|
171
|
-
def
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
171
|
+
def self.create(hash)
|
172
|
+
return nil if hash.nil?
|
173
|
+
|
174
|
+
current_control = Global::IdLabel.create(hash['currentcontrol'])
|
175
|
+
current_window = Global::IdLabel.create(hash['currentwindow'])
|
176
|
+
skin = Global::IdName.create(hash['skin'])
|
177
|
+
stereoscopic_mode = StereoscopyMode.create(hash['stereoscopicmode'])
|
178
|
+
new(current_control, current_window, hash['fullscreen'], skin, stereoscopic_mode)
|
177
179
|
end
|
178
180
|
|
179
|
-
def
|
180
|
-
|
181
|
+
def initialize(current_control, current_window, fullscreen, skin, stereoscopic_mode)
|
182
|
+
@current_control = current_control
|
183
|
+
@current_window = current_window
|
184
|
+
@fullscreen = fullscreen
|
185
|
+
@skin = skin
|
186
|
+
@stereoscopic_mode = stereoscopic_mode
|
181
187
|
end
|
182
188
|
end
|
183
189
|
end
|
@@ -9,8 +9,12 @@ module KodiClient
|
|
9
9
|
|
10
10
|
attr_reader :label
|
11
11
|
|
12
|
-
def
|
13
|
-
|
12
|
+
def item_details_base_by_hash(hash)
|
13
|
+
item_details_base(hash['label'])
|
14
|
+
end
|
15
|
+
|
16
|
+
def item_details_base(label)
|
17
|
+
@label = label
|
14
18
|
end
|
15
19
|
end
|
16
20
|
end
|