kodi_client 0.4.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.
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'kodi_client/util/comparable'
4
+ require 'kodi_client/util/iterable'
5
+
6
+ module KodiClient
7
+ module Types
8
+ module Global
9
+
10
+ # Global.Toggle https://kodi.wiki/view/JSON-RPC_API/v12#Global.Toggle
11
+ module Toggle
12
+ include Iterable
13
+
14
+ TOGGLE = 'toggle'
15
+ TRUE = true
16
+ FALSE = false
17
+ end
18
+
19
+ # rotate for clockwise and counter clockwise
20
+ module Rotate
21
+ include Iterable
22
+
23
+ CLOCKWISE = 'clockwise'
24
+ COUNTER_CLOCKWISE = 'counterclockwise'
25
+ end
26
+
27
+ # direction for left, right, up, down
28
+ module Direction
29
+ include Iterable
30
+
31
+ LEFT = 'left'
32
+ RIGHT = 'right'
33
+ UP = 'up'
34
+ DOWN = 'down'
35
+ end
36
+
37
+ # enum for prev/next
38
+ module NextPrev
39
+ include Iterable
40
+
41
+ NEXT = 'next'
42
+ PREV = 'previous'
43
+ ON = 'on'
44
+ OFF = 'off'
45
+ end
46
+
47
+ # Global.IncrementDecrement https://kodi.wiki/view/JSON-RPC_API/v12#Global.IncrementDecrement
48
+ module IncrementDecrement
49
+ include Iterable
50
+
51
+ INCREMENT = 'increment'
52
+ DECREMENT = 'decrement'
53
+ end
54
+
55
+ # id/label type
56
+ class IdLabel
57
+ include Comparable
58
+ attr_reader :id, :label
59
+
60
+ def initialize(hash)
61
+ @id = hash['id']
62
+ @label = hash['label']
63
+ end
64
+
65
+ def ==(other)
66
+ compare(self, other)
67
+ end
68
+ end
69
+
70
+ # id/name type
71
+ class IdName
72
+ include Comparable
73
+ attr_reader :id, :name
74
+
75
+ def initialize(hash)
76
+ @id = hash['id']
77
+ @name = hash['name']
78
+ end
79
+
80
+ def ==(other)
81
+ compare(self, other)
82
+ end
83
+ end
84
+
85
+ # Global.Time https://kodi.wiki/view/JSON-RPC_API/v12#Global.Time
86
+ class GlobalTime
87
+ include Comparable
88
+
89
+ attr_reader :hours, :minutes, :seconds, :milliseconds
90
+
91
+ def initialize(hash)
92
+ @hours = hash['hours']
93
+ @minutes = hash['minutes']
94
+ @seconds = hash['seconds']
95
+ @milliseconds = hash['milliseconds']
96
+ end
97
+
98
+ def ==(other)
99
+ compare(self, other)
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,185 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'kodi_client/global_types/global_types'
4
+ require 'kodi_client/util/comparable'
5
+ require 'kodi_client/util/iterable'
6
+
7
+ module KodiClient
8
+ module Types
9
+ module GUI
10
+
11
+ # GUI.Window https://kodi.wiki/view/JSON-RPC_API/v12#GUI.Window
12
+ module GUIWindow
13
+
14
+ ACCESSPOINTS = 'accesspoints'
15
+ ADDON = 'addon'
16
+ ADDONBROWSER = 'addonbrowser'
17
+ ADDONINFORMATION = 'addoninformation'
18
+ ADDONSETTINGS = 'addonsettings'
19
+ APPEARANCESETTINGS = 'appearancesettings'
20
+ AUDIODSPMANAGER = 'audiodspmanager'
21
+ BUSYDIALOG = 'busydialog'
22
+ CONTENTSETTINGS = 'contentsettings'
23
+ CONTEXTMENU = 'contextmenu'
24
+ EVENTLOG = 'eventlog'
25
+ EXTENDEDPROGRESSDIALOG = 'extendedprogressdialog'
26
+ FAVOURITES = 'favourite'
27
+ FILEBROWSER = 'filebrowser'
28
+ FILEMANAGER = 'filemanager'
29
+ FULLSCREENINFO = 'fullscreeninfo'
30
+ FULLSCREENLIVETV = 'fullscreenlivetv'
31
+ FULLSCREENRADIO = 'fullscreenradio'
32
+ FULLSCREENVIDEO = 'fullscreenvideo'
33
+ GAMECONTROLLERS = 'gamecontrollers'
34
+ GAMEPADINPUT = 'gamepadinput'
35
+ HOME = 'home'
36
+ INTERFACESETTINGS = 'interfacesettings'
37
+ LOCKSETTINGS = 'locksettings'
38
+ LOGINSCREEN = 'loginscreen'
39
+ MEDIAFILTER = 'mediafilter'
40
+ MEDIASETTINGS = 'mediasettings'
41
+ MEDIASOURCE = 'mediasource'
42
+ MOVIEINFORMATION = 'movieinformation'
43
+ MUSIC = 'music'
44
+ MUSICINFORMATION = 'musicinformation'
45
+ MUSICOSD = 'musicosd'
46
+ MUSICPLAYLIST = 'musicplaylist'
47
+ MUSICPLAYLISTEDITOR = 'musicplaylisteditor'
48
+ NETWORKSETUP = 'networksetup'
49
+ NOTIFICATION = 'notification'
50
+ NUMERICINPUT = 'numericinput'
51
+ OKDIALOG = 'okdialog'
52
+ OSDAUDIODSPSETTINGS = 'osdaudiodspsettings'
53
+ OSDAUDIOSETTINGS = 'osdaudiosettings'
54
+ OSDCMSSETTINGS = 'osdcmssettings'
55
+ OSDVIDEOSETTINGS = 'osdvideosettings'
56
+ PERIPHERALSETTINGS = 'peripheralsettings'
57
+ PICTUREINFO = 'pictureinfo'
58
+ PICTURES = 'pictures'
59
+ PLAYERCONTROLS = 'playercontrols'
60
+ PLAYERPROCESSINFO = 'playerprocessinfo'
61
+ PLAYERSETTINGS = 'playersettings'
62
+ PROFILES = 'profiles'
63
+ PROFILESETTINGS = 'profilesettings'
64
+ PROGRAMS = 'programs'
65
+ PROGRESSDIALOG = 'progressdialog'
66
+ PVRCHANNELMANAGER = 'pvrchannelmanager'
67
+ PVRCHANNELSCAN = 'pvrchannelscan'
68
+ PVRGROUPMANAGER = 'pvrgroupmanager'
69
+ PVRGUIDEINFO = 'pvrguideinfo'
70
+ PVRGUIDESEARCH = 'pvrguidesearch'
71
+ PVROSDCHANNELS = 'pvrosdchannels'
72
+ PVROSDGUIDE = 'pvrosdguide'
73
+ PVROSDTELETEXT = 'pvrosdteletext'
74
+ PVRRADIORDSINFO = 'pvrradiordsinfo'
75
+ PVRRECORDINGINFO = 'pvrrecordinginfo'
76
+ PVRSETTINGS = 'pvrsettings'
77
+ PVRTIMERSETTING = 'pvrtimersetting'
78
+ PVRUPDATEPROGRESS = 'pvrupdateprogress'
79
+ RADIOCHANNELS = 'radiochannels'
80
+ RADIOGUIDE = 'radioguide'
81
+ RADIORECORDINGS = 'radiorecordings'
82
+ RADIOSEARCH = 'radiosearch'
83
+ RADIOTIMERRULES = 'radiotimerrules'
84
+ RADIOTIMERS = 'radiotimers'
85
+ SCREENCALIBRATION = 'screencalibration'
86
+ SCREENSAVER = 'screensaver'
87
+ SEEKBAR = 'seekbar'
88
+ SELECTDIALOG = 'selectdialog'
89
+ SERVICESETTINGS = 'servicesettings'
90
+ SETTINGS = 'settings'
91
+ SHUTDOWNMENU = 'shutdownmenu'
92
+ SKINSETTINGS = 'skinsettings'
93
+ SLIDERDIALOG = 'sliderdialog'
94
+ SLIDESHOW = 'slideshow'
95
+ SMARTPLAYLISTEDITOR = 'smartplaylisteditor'
96
+ SMARTPLAYLISTRULE = 'smartplaylistrule'
97
+ SONGINFORMATION = 'songinformation'
98
+ STARTUP = 'startup'
99
+ STARTWINDOW = 'startwindow'
100
+ SUBMENU = 'submenu'
101
+ SUBTITLESEARCH = 'subtitlesearch'
102
+ SYSTEMINFO = 'systeminfo'
103
+ SYSTEMSETTINGS = 'systemsettings'
104
+ TELETEXT = 'teletext'
105
+ TESTPATTERN = 'testpattern'
106
+ TEXTVIEWER = 'textviewer'
107
+ TVCHANNELS = 'tvchannels'
108
+ TVGUIDE = 'tvguide'
109
+ TVRECORDINGS = 'tvrecordings'
110
+ TVSEARCH = 'tvsearch'
111
+ TVTIMERRULES = 'tvtimerrules'
112
+ TVTIMERS = 'tvtimers'
113
+ VIDEOBOOKMARKS = 'videobookmarks'
114
+ VIDEOMENU = 'videomenu'
115
+ VIDEOOSD = 'videoosd'
116
+ VIDEOPLAYLIST = 'videoplaylist'
117
+ VIDEOS = 'videos'
118
+ VIDEOTIMESEEK = 'videotimeseek'
119
+ VIRTUALKEYBOARD = 'virtualkeyboard'
120
+ VISUALISATION = 'visualisation'
121
+ VISUALISATIONPRESETLIST = 'visualisationpresetlist'
122
+ VOLUMEBAR = 'volumebar'
123
+ WEATHER = 'weather'
124
+ YESNODIALOG = 'yesnodialog'
125
+ end
126
+
127
+ # GUI.Property.Name https://kodi.wiki/view/JSON-RPC_API/v12#GUI.Property.Name
128
+ module PropertyName
129
+ extend Iterable
130
+
131
+ CURRENTCONTROL = 'currentcontrol'
132
+ CURRENTWINDOW = 'currentwindow'
133
+ FULLSCREEN = 'fullscreen'
134
+ SKIN = 'skin'
135
+ STEREOSCOPICMODE = 'stereoscopicmode'
136
+ end
137
+
138
+ # GUI.Stereoscopy.Mode https://kodi.wiki/view/JSON-RPC_API/v12#GUI.Stereoscopy.Mode
139
+ class StereoscopyMode
140
+ include Comparable
141
+ include Iterable
142
+
143
+ attr_reader :label, :mode
144
+
145
+ OFF = 'off'
146
+ SPLIT_VERTICAL = 'split_vertical'
147
+ SPLIT_HORIZONTAL = 'split_horizontal'
148
+ ROW_INTERLEAVED = 'row_interleaved'
149
+ HARDWARE_BASED = 'hardware_based'
150
+ ANAGLYPH_CYAN_RED = 'anaglyph_cyan_red'
151
+ ANAGLYPH_GREEN_MAGENTA = 'anaglyph_green_magenta'
152
+ ANAGLYPH_YELLOW_BLUE = 'anaglyph_yellow_blue'
153
+ MONSCOPIC = 'monoscopic'
154
+
155
+ def initialize(hash)
156
+ @label = hash['label']
157
+ @mode = hash['mode']
158
+ end
159
+
160
+ def ==(other)
161
+ compare(self, other)
162
+ end
163
+ end
164
+
165
+ # GUI.Property.Value https://kodi.wiki/view/JSON-RPC_API/v12#GUI.Property.Value
166
+ class PropertyValue
167
+ include Comparable
168
+
169
+ attr_reader :current_control, :current_window, :fullscreen, :skin, :stereoscopic_mode
170
+
171
+ def initialize(hash)
172
+ @current_control = Global::IdLabel.new(hash['currentcontrol'])
173
+ @current_window = Global::IdLabel.new(hash['currentwindow'])
174
+ @fullscreen = hash['fullscreen']
175
+ @skin = Global::IdName.new(hash['skin'])
176
+ @stereoscopic_mode = StereoscopyMode.new(hash['stereoscopicmode'])
177
+ end
178
+
179
+ def ==(other)
180
+ compare(self, other)
181
+ end
182
+ end
183
+ end
184
+ end
185
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KodiClient
4
+ module Types
5
+ module Items
6
+
7
+ # Item.Details.Base https://kodi.wiki/view/JSON-RPC_API/v12#Item.Details.Base
8
+ module ItemDetailsBase
9
+
10
+ attr_reader :label
11
+
12
+ def item_details_base(hash)
13
+ @label = hash['label']
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,246 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'kodi_client/util/comparable'
4
+ require 'kodi_client/global_types/video_types'
5
+ require 'kodi_client/global_types/audio_types'
6
+
7
+ module KodiClient
8
+ module Types
9
+ module List
10
+
11
+ # List.Limits https://kodi.wiki/view/JSON-RPC_API/v12#List.Limits
12
+ class ListLimits
13
+ include Comparable
14
+
15
+ attr_reader :list_start, :list_end
16
+
17
+ def initialize(list_start, list_end)
18
+ @list_start = list_start
19
+ @list_end = list_end
20
+ end
21
+
22
+ def ==(other)
23
+ compare(self, other)
24
+ end
25
+ end
26
+
27
+ # List.LimitsReturned https://kodi.wiki/view/JSON-RPC_API/v12#List.LimitsReturned
28
+ class ListLimitsReturned
29
+ include Comparable
30
+
31
+ attr_reader :list_start, :list_end, :total
32
+
33
+ def initialize(hash)
34
+ @list_start = hash['start']
35
+ @list_end = hash['end']
36
+ @total = hash['total']
37
+ end
38
+
39
+ def ==(other)
40
+ compare(self, other)
41
+ end
42
+ end
43
+
44
+ # List.Fields.All https://kodi.wiki/view/JSON-RPC_API/v12#List.Fields.All
45
+ module ListFieldsAll
46
+ extend Iterable
47
+
48
+ ALBUM = 'album'
49
+ ALBUMARTIST = 'albumartist'
50
+ ALBUMARTISTID = 'albumartistid'
51
+ ALBUMID = 'albumid'
52
+ ALBUMLABEL = 'albumlabel'
53
+ ALBUMRELEASETYPE = 'albumreleasetype'
54
+ ART = 'art'
55
+ ARTIST = 'artist'
56
+ ARTISTID = 'artistid'
57
+ CAST = 'cast'
58
+ CHANNEL = 'channel'
59
+ CHANNELNUMBER = 'channelnumber'
60
+ CHANNELTYPE = 'channeltype'
61
+ COMMENT = 'comment'
62
+ COMPILATION = 'compilation'
63
+ CONTRIBUTORS = 'contributors'
64
+ COUNTRY = 'country'
65
+ DATEADDED = 'dateadded'
66
+ DESCRIPTION = 'description'
67
+ DIRECTOR = 'director'
68
+ DISC = 'disc'
69
+ DISPLAYARTIST = 'displayartist'
70
+ DISPLAYCOMPOSER = 'displaycomposer'
71
+ DISPLAYCONDUCTOR = 'displayconductor'
72
+ DISPLAYLYRICIST = 'displaylyricist'
73
+ DISPLAYORCHESTRA = 'displayorchestra'
74
+ DURATION = 'duration'
75
+ ENDTIME = 'endtime'
76
+ EPISODE = 'episode'
77
+ EPISODEGUIDE = 'episodeguide'
78
+ FANART = 'fanart'
79
+ FILE = 'file'
80
+ FIRSTAIRED = 'firstaired'
81
+ GENRE = 'genre'
82
+ GENREID = 'genreid'
83
+ HIDDEN = 'hidden'
84
+ IMDBNUMBER = 'imdbnumber'
85
+ LASTPLAYED = 'lastplayed'
86
+ LOCKED = 'locked'
87
+ LYRICS = 'lyrics'
88
+ MOOD = 'mood'
89
+ MPAA = 'mpaa'
90
+ MUSICBRAINZALBUMARTISTID = 'musicbrainzalbumartistid'
91
+ MUSICBRAINZALBUMID = 'musicbrainzalbumid'
92
+ MUSICBRAINZARTISTID = 'musicbrainzartistid'
93
+ MUSICBRAINZTRACKID = 'musicbrainztrackid'
94
+ ORIGINALTITLE = 'originaltitle'
95
+ PLAYCOUNT = 'playcount'
96
+ PLOT = 'plot'
97
+ PLOTOUTLINE = 'plotoutline'
98
+ PREMIERED = 'premiered'
99
+ PRODUCTIONCODE = 'productioncode'
100
+ RATING = 'rating'
101
+ RELEASETYPE = 'releasetype'
102
+ RESUME = 'resume'
103
+ RUNTIME = 'runtime'
104
+ SEASON = 'season'
105
+ SET = 'set'
106
+ SETID = 'setid'
107
+ SHOWLINK = 'showlink'
108
+ SHOWTITLE = 'showtitle'
109
+ SORTTITLE = 'sorttitle'
110
+ SPECIALSORTEPISODE = 'specialsortepisode'
111
+ SPECIALSORTSEASON = 'specialsortseason'
112
+ STARTTIME = 'starttime'
113
+ STREAMDETAILS = 'streamdetails'
114
+ STUDIO = 'studio'
115
+ STYLE = 'style'
116
+ TAG = 'tag'
117
+ TAGLINE = 'tagline'
118
+ THEME = 'theme'
119
+ THUMBNAIL = 'thumbnail'
120
+ TITLE = 'title'
121
+ TOP250 = 'top250'
122
+ TRACK = 'track'
123
+ TRAILER = 'trailer'
124
+ TVSHOWID = 'tvshowid'
125
+ UNIQUEID = 'uniqueid'
126
+ USERRATING = 'userrating'
127
+ VOTES = 'votes'
128
+ WATCHEDEPISODES = 'watchedepisodes'
129
+ WRITER = 'writer'
130
+ YEAR = 'year'
131
+ end
132
+
133
+ # List.Item.Base https://kodi.wiki/view/JSON-RPC_API/v12#List.Item.Base
134
+ module ListItemBase
135
+ include Video::VideoDetailsFile
136
+ include Audio::AudioDetailsMedia
137
+
138
+ attr_reader :album, :album_artist, :album_artist_id, :album_id, :album_release_type, :album_status, :bit_rate,
139
+ :bpm, :cast, :channels, :comment, :compilation, :contributors, :country, :description, :disc,
140
+ :disc_title, :display_composer, :display_conductor, :display_lyricist, :display_orchestra,
141
+ :duration, :dyn_path, :episode, :episode_guide, :first_aired, :id, :imdb_number, :is_box_set,
142
+ :lyrics, :media_path, :mood, :mpaa, :musicbrainz_artist_id, :musicbrainz_track_id, :original_date,
143
+ :original_title, :plot_outline, :premiered, :production_code, :release_date, :release_type,
144
+ :sample_rate, :season, :set, :set_id, :show_link, :show_title, :sort_title, :special_sort_episode,
145
+ :special_sort_season, :studio, :style, :tag, :tag_line, :theme, :top250, :total_discs, :track,
146
+ :trailer, :tv_show_id, :type, :unique_id, :votes, :watched_episodes, :writer
147
+
148
+ def list_item_base(hash)
149
+ @album = hash['album']
150
+ @album_artist = hash['albumartist']
151
+ @album_artist_id = hash['albumartistid']
152
+ @album_id = hash['albumid']
153
+ @album_release_type = hash['albumreleasetype']
154
+ @album_status = hash['albumstatus']
155
+ @bit_rate = hash['bitrate']
156
+ @bpm = hash['bpm']
157
+ @cast = hash['cast'].nil? ? [] : hash['cast'].map { |it| Types::Video::VideoCast.new(it) }
158
+ @channels = hash['channels']
159
+ @comment = hash['comment']
160
+ @compilation = hash['compilation']
161
+ @contributors = hash['contributors'].nil? ? [] : hash['contributors'].map { |it| Types::Audio::AudioContributor.new(it) }
162
+ @country = hash['country']
163
+ @description = hash['description']
164
+ @disc = hash['disc']
165
+ @disc_title = hash['disctitle']
166
+ @display_composer = hash['displaycomposer']
167
+ @display_conductor = hash['displayconductor']
168
+ @display_lyricist = hash['displaylyricist']
169
+ @display_orchestra = hash['displayorchestra']
170
+ @duration = hash['duration']
171
+ @dyn_path = hash['dynpath']
172
+ @episode = hash['episode']
173
+ @episode_guide = hash['episodeguide']
174
+ @first_aired = hash['firstaired']
175
+ @id = hash['id']
176
+ @imdb_number = hash['imdbnumber']
177
+ @is_box_set = hash['isboxset']
178
+ @lyrics = hash['lyrics']
179
+ @media_path = hash['mediapath']
180
+ @mood = hash['mood']
181
+ @mpaa = hash['mpaa']
182
+ @musicbrainz_artist_id = hash['musicbrainzartistid']
183
+ @musicbrainz_track_id = hash['musicbrainztrackid']
184
+ @original_date = hash['originaldate']
185
+ @original_title = hash['originaltitle']
186
+ @plot_outline = hash['plotoutline']
187
+ @premiered = hash['premiered']
188
+ @production_code = hash['productioncode']
189
+ @release_date = hash['releasedate']
190
+ @release_type = hash['releasetype']
191
+ @sample_rate = hash['samplerate']
192
+ @season = hash['season']
193
+ @set = hash['set']
194
+ @set_id = hash['setid']
195
+ @show_link = hash['showlink']
196
+ @show_title = hash['showtitle']
197
+ @sort_title = hash['sorttitle']
198
+ @special_sort_episode = hash['specialsortepisode']
199
+ @special_sort_season = hash['specialsortseason']
200
+ @studio = hash['studio']
201
+ @style = hash['style']
202
+ @tag = hash['tag']
203
+ @tag_line = hash['tagline']
204
+ @theme = hash['theme']
205
+ @top250 = hash['top250']
206
+ @total_discs = hash['totaldiscs']
207
+ @track = hash['track']
208
+ @trailer = hash['trailer']
209
+ @tv_show_id = hash['tvshowid']
210
+ @type = hash['type'].nil? ? 'unknown' : hash['type']
211
+ @unique_id = hash['uniqueid']
212
+ @votes = hash['votes']
213
+ @watched_episodes = hash['watchedepisodes']
214
+ @writer = hash['writer']
215
+ video_details_file(hash)
216
+ audio_details_media(hash)
217
+ end
218
+ end
219
+
220
+ # List.Item.All https://kodi.wiki/view/JSON-RPC_API/v12#List.Item.All
221
+ class ListItemAll
222
+ include ListItemBase
223
+ include Comparable
224
+
225
+ attr_reader :channel, :channel_number, :channel_type, :end_time, :hidden, :locked, :start_time,
226
+ :sub_channel_number
227
+
228
+ def initialize(hash)
229
+ @channel = hash['channel']
230
+ @channel_number = hash['channelnumber']
231
+ @channel_type = hash['channeltype']
232
+ @end_time = hash['endtime']
233
+ @hidden = hash['hidden']
234
+ @locked = hash['locked']
235
+ @start_time = hash['starttime']
236
+ @sub_channel_number = hash['subchannelnumber']
237
+ list_item_base(hash)
238
+ end
239
+
240
+ def ==(other)
241
+ compare(self, other)
242
+ end
243
+ end
244
+ end
245
+ end
246
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'kodi_client/global_types/item_types'
4
+ require 'kodi_client/util/comparable'
5
+
6
+ module KodiClient
7
+ module Types
8
+ module Media
9
+
10
+ # media types
11
+ module MediaType
12
+ extend Iterable
13
+ VIDEO = 'video'
14
+ AUDIO = 'audio'
15
+ ALL = 'all'
16
+ end
17
+
18
+ # Media.Details.Base https://kodi.wiki/view/JSON-RPC_API/v12#Media.Details.Base
19
+ module MediaDetailsBase
20
+ include Items::ItemDetailsBase
21
+
22
+ attr_reader :fan_art, :thumbnail
23
+
24
+ def media_details_base(hash)
25
+ @fan_art = hash['fanart']
26
+ @thumbnail = hash['thumbnail']
27
+ item_details_base(hash)
28
+ end
29
+ end
30
+
31
+ # Media.Artwork https://kodi.wiki/view/JSON-RPC_API/v12#Media.Artwork
32
+ class MediaArtwork
33
+ include Comparable
34
+
35
+ attr_reader :banner, :fan_art, :poster, :thumb
36
+
37
+ def initialize(hash)
38
+ @banner = hash['banner']
39
+ @fan_art = hash['fanart']
40
+ @poster = hash['poster']
41
+ @thumb = hash['thumb']
42
+ end
43
+
44
+ def ==(other)
45
+ compare(self, other)
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end