kodi_client 0.7.1 → 0.7.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7963176234a4fca33e9f5cc70fc67839692434cb5f04e891f83ea8a93060e709
|
4
|
+
data.tar.gz: 727944649072314329aff155764d4cb2cdbc9f6ce506c9376a23b45cab233a8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2ff87b673fcde9ce38d543d6462412c9de1868c3ed2771145a90c515894af1822576259e5a81b6e531e6beceaa43dc3175e0ff7009fd427d033bee3d3d7aac0
|
7
|
+
data.tar.gz: a0b4e7461155e031e5ed9c5b2f2e1ece7afbd273ef1639b07b9a12222e51fe5670aa61641291197aff4ffa018fa9d4df4d36b28e3bc57ec3d3324856c1ac16a7
|
data/kodi_client.gemspec
CHANGED
@@ -13,7 +13,8 @@ module KodiClient
|
|
13
13
|
# @raise [ArgumentError] thrown if ip or port is nil
|
14
14
|
# @return [Client] the created client
|
15
15
|
def connect(ip, port)
|
16
|
-
|
16
|
+
raise ArgumentError, 'ip or port can\'t be nil.' if ip.nil? || port.nil?
|
17
|
+
|
17
18
|
@client = KodiClient::Client.new
|
18
19
|
merge_options(->(options) { options.with_connection(ip, port) })
|
19
20
|
end
|
@@ -23,7 +24,8 @@ module KodiClient
|
|
23
24
|
# @param password [String] the password
|
24
25
|
# @return [Client] the existing, or if not existed, a new created client
|
25
26
|
def auth(username, password)
|
26
|
-
|
27
|
+
raise ArgumentError, 'username or password can\'t be nil.' if username.nil? || password.nil?
|
28
|
+
|
27
29
|
merge_options(->(options) { options.with_auth(username, password) })
|
28
30
|
end
|
29
31
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module KodiClient
|
4
|
+
module Methods
|
5
|
+
# contains all Kodi System methods
|
6
|
+
class VideoLibrary < KodiMethod
|
7
|
+
|
8
|
+
CLEAN = 'clean'
|
9
|
+
|
10
|
+
def clean(show_dialogs = true, content = Types::Video::VideoContentType::VIDEO, directory = '', kodi_id = 1)
|
11
|
+
request = KodiRequest.new(kodi_id, CLEAN, { 'showdialogs' => show_dialogs, 'content' => content,
|
12
|
+
'directory' => directory })
|
13
|
+
json = invoke_api(request)
|
14
|
+
KodiResponse.new(json)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module KodiClient
|
4
|
+
module Types
|
5
|
+
module Video
|
6
|
+
# VideoLibrary.Scan hhttps://kodi.wiki/view/JSON-RPC_API/v12#VideoLibrary
|
7
|
+
module VideoContentType
|
8
|
+
extend Extensions::Iterable
|
9
|
+
|
10
|
+
VIDEO = 'video'
|
11
|
+
MOVIES = 'movies'
|
12
|
+
TV_SHOWS = 'tvshows'
|
13
|
+
MUSIC_VIDEOS = 'musicvideos'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
data/lib/kodi_client.rb
CHANGED
@@ -106,6 +106,7 @@ require 'kodi_client/types/video/video_details_item_type'
|
|
106
106
|
require 'kodi_client/types/video/video_details_file_type'
|
107
107
|
require 'kodi_client/types/video/video_resume_type'
|
108
108
|
require 'kodi_client/types/video/stream_details_type'
|
109
|
+
require 'kodi_client/types/video/video_content_type_type'
|
109
110
|
|
110
111
|
require 'kodi_client/types/list/list_item_base_type'
|
111
112
|
require 'kodi_client/types/list/list_item_all_type'
|
@@ -147,6 +148,7 @@ require 'kodi_client/methods/input'
|
|
147
148
|
require 'kodi_client/methods/player'
|
148
149
|
require 'kodi_client/methods/profiles'
|
149
150
|
require 'kodi_client/methods/system'
|
151
|
+
require 'kodi_client/methods/video_library'
|
150
152
|
|
151
153
|
# client for Kodi rest api https://kodi.wiki/view/JSON-RPC_API/v12
|
152
154
|
module KodiClient
|
@@ -169,6 +171,7 @@ module KodiClient
|
|
169
171
|
@player = Methods::Player.new
|
170
172
|
@profiles = Methods::Profiles.new
|
171
173
|
@system = Methods::System.new
|
174
|
+
@video_library = Methods::System.new
|
172
175
|
end
|
173
176
|
|
174
177
|
def apply_options_to_methods(options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kodi_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Feier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- lib/kodi_client/methods/player.rb
|
62
62
|
- lib/kodi_client/methods/profiles.rb
|
63
63
|
- lib/kodi_client/methods/system.rb
|
64
|
+
- lib/kodi_client/methods/video_library.rb
|
64
65
|
- lib/kodi_client/types/addons/addon_content_type.rb
|
65
66
|
- lib/kodi_client/types/addons/addon_dependency_type.rb
|
66
67
|
- lib/kodi_client/types/addons/addon_details_type.rb
|
@@ -161,6 +162,7 @@ files:
|
|
161
162
|
- lib/kodi_client/types/system/property_value_type.rb
|
162
163
|
- lib/kodi_client/types/video/stream_details_type.rb
|
163
164
|
- lib/kodi_client/types/video/video_cast_type.rb
|
165
|
+
- lib/kodi_client/types/video/video_content_type_type.rb
|
164
166
|
- lib/kodi_client/types/video/video_details_base_type.rb
|
165
167
|
- lib/kodi_client/types/video/video_details_file_type.rb
|
166
168
|
- lib/kodi_client/types/video/video_details_item_type.rb
|
@@ -188,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
190
|
- !ruby/object:Gem::Version
|
189
191
|
version: '0'
|
190
192
|
requirements: []
|
191
|
-
rubygems_version: 3.2.
|
193
|
+
rubygems_version: 3.2.15
|
192
194
|
signing_key:
|
193
195
|
specification_version: 4
|
194
196
|
summary: A work-in-progress client for Kodi JSON API v2.
|