vidispine 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vidispine/api/client.rb +37 -1
- data/lib/vidispine/api/utilities.rb +11 -4
- data/lib/vidispine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbc80a3dfc2e3cfe79c2ac9918df6770e9e6707b
|
4
|
+
data.tar.gz: 0a711618f5cc6ffa79214c97995f020713ea473b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2295336eeb9f06fac7f52c49a7dc47d1e18d33d3e275707eb993b9df8ddfb31446e3e9edb0e404b0f3c55620d66d63ed1781eae5fc8cc35ee64edad7f6b379d2
|
7
|
+
data.tar.gz: b5ee3f5fab269599c8e61b636b9ef326b9956fdaa2aadc034775c0a3120b884d3f5098f68a1680a5d4bc5b7ce54c2aaf01b68ca76f9fb25b16d15ee95ca3a53c
|
data/lib/vidispine/api/client.rb
CHANGED
@@ -19,7 +19,9 @@ module Vidispine
|
|
19
19
|
# APInoAuth Path
|
20
20
|
@api_noauth_endpoint_prefix = args.fetch(:api_noauth_endpoint_prefix, 'APInoauth')
|
21
21
|
|
22
|
-
|
22
|
+
# Default useragent but only if it is not set
|
23
|
+
args[:user_agent] ||= args.fetch(:user_agent, "Vidispine Ruby SDK v#{Vidispine::VERSION}")
|
24
|
+
|
23
25
|
@http_client = HTTPClient.new(args)
|
24
26
|
@logger = http_client.logger
|
25
27
|
end
|
@@ -347,6 +349,40 @@ module Vidispine
|
|
347
349
|
process_request_using_class(Requests::ItemExport, args, options)
|
348
350
|
end
|
349
351
|
|
352
|
+
# Gets the field group of an item
|
353
|
+
# Undocumented endpoint
|
354
|
+
def item_field_group_get(args = { }, options = { })
|
355
|
+
_request = Requests::BaseRequest.new(
|
356
|
+
args,
|
357
|
+
{
|
358
|
+
:http_path => '/item/#{item_id}/field-group',
|
359
|
+
:http_method => :get,
|
360
|
+
:parameters => [
|
361
|
+
{ :name => :item_id, :send_in => :path, :required => true },
|
362
|
+
]
|
363
|
+
}.merge(options)
|
364
|
+
)
|
365
|
+
process_request(_request, options)
|
366
|
+
end
|
367
|
+
|
368
|
+
# Sets the field group of an item
|
369
|
+
# Undocumented endpoint
|
370
|
+
def item_field_group_set(args = { }, options = { })
|
371
|
+
_request = Requests::BaseRequest.new(
|
372
|
+
args,
|
373
|
+
{
|
374
|
+
:http_path => '/item/#{item_id}/field-group/#{field_group}',
|
375
|
+
:http_method => :put,
|
376
|
+
:default_parameter_send_in_value => :path,
|
377
|
+
:parameters => [
|
378
|
+
{ :name => :item_id, :required => true },
|
379
|
+
{ :name => :field_group, :required => true }
|
380
|
+
]
|
381
|
+
}.merge(options)
|
382
|
+
)
|
383
|
+
process_request(_request, options)
|
384
|
+
end
|
385
|
+
|
350
386
|
# @see http://apidoc.vidispine.com/latest/ref/item/item.html#get-information-about-a-single-item
|
351
387
|
def item_get(args = { }, options = { })
|
352
388
|
# item_id = args.is_a?(String) ? args : begin
|
@@ -607,6 +607,7 @@ module Vidispine
|
|
607
607
|
|
608
608
|
_metadata = args[:metadata] || { }
|
609
609
|
_metadata_map = args[:metadata_map] || { }
|
610
|
+
field_group = args[:field_group]
|
610
611
|
|
611
612
|
# map metadata assuming 1 value per field
|
612
613
|
#_metadata_as_fields = transform_metadata_to_fields(_metadata, _metadata_map, options)
|
@@ -661,12 +662,17 @@ module Vidispine
|
|
661
662
|
item_id = item['id']
|
662
663
|
raise "Error Creating Placeholder: #{item.inspect}" unless item_id
|
663
664
|
|
665
|
+
if field_group
|
666
|
+
logger.debug { 'Setting Item Field-Group' }
|
667
|
+
item_field_group_set(:item_id => item_id, :field_group => field_group)
|
668
|
+
end
|
669
|
+
|
664
670
|
# Add any additional metadata (Vidispine will only take one group at a time)
|
665
671
|
metadata_documents.each do |metadata_document|
|
672
|
+
logger.debug { 'Setting Item Metadata' }
|
666
673
|
item_metadata_set(:item_id => item_id, :metadata_document => metadata_document)
|
667
674
|
end
|
668
675
|
|
669
|
-
|
670
676
|
should_add_to_collection = options.fetch(:add_item_to_collection, [ :collections, :collection, :collection_name, :collection_id, :file_path_collection_name_position ].any? { |v| args.keys.include?(v) })
|
671
677
|
if should_add_to_collection
|
672
678
|
logger.debug { 'Determining Collection to Add the Item to.' }
|
@@ -688,7 +694,6 @@ module Vidispine
|
|
688
694
|
_response[:collection_object_add] = single_collection ? collection_object_add_responses.first : collection_object_add_responses
|
689
695
|
end
|
690
696
|
|
691
|
-
|
692
697
|
shape = item['shape']
|
693
698
|
unless shape
|
694
699
|
import_args_in = args[:import_args]
|
@@ -756,8 +761,10 @@ module Vidispine
|
|
756
761
|
end
|
757
762
|
|
758
763
|
# 8. Generate the Thumbnails and Poster Frame
|
759
|
-
create_thumbnails = args.fetch(:create_thumbnails, true)
|
760
|
-
create_posters = args.fetch(:create_posters, 3)
|
764
|
+
# create_thumbnails = args.fetch(:create_thumbnails, true)
|
765
|
+
# create_posters = args.fetch(:create_posters, 3)
|
766
|
+
create_thumbnails = args.fetch(:create_thumbnails, false)
|
767
|
+
create_posters = args.fetch(:create_posters, false)
|
761
768
|
|
762
769
|
if (create_thumbnails or create_posters)
|
763
770
|
logger.debug { 'Generating Thumbnails(s) and Poster Frame.' }
|
data/lib/vidispine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidispine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Whitson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|