piwigo-api 0.5.4 → 0.5.5
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/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/piwigo/folder_sync.rb +1 -1
- data/lib/piwigo/images.rb +11 -3
- data/lib/piwigo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abe9efb2427bfdaeeb85fe16c6fe87061704e08ec7d8f3ebadf79920940bf68e
|
4
|
+
data.tar.gz: 755900bb8cebf9a4fd325efb92eedcb87bf4030b050d64c885d7159c4700c136
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a749c2d82a6b6d4f7646696a09cc1fe1d2fc970553a9b51ea6795032e196be3fb3c5856a8d4ae1deebc39effd651621bb3a8c5f19a9d8d56d434441ebe3cf933
|
7
|
+
data.tar.gz: 90b6e8580727156339ddc99fe1322cbec925092c2af64ddb7ffa238569b4753fe150d0c0f9993e1ac680b9f8ac9d7694921efa9bcf0454de6193a76ba9973ac1
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
0.5.5 - 2019-11-26
|
8
|
+
- Fix another encoding issue when synchronizing folder with accented characters.
|
9
|
+
|
7
10
|
0.5.4 - 2019-11-26
|
8
11
|
- Fix crash in sniff_attributes when the image dosn't contain a valid EXIF data
|
9
12
|
- Fix parent albums when syncronizing a folder-tree of albums into Piwigo
|
data/Gemfile.lock
CHANGED
data/lib/piwigo/folder_sync.rb
CHANGED
@@ -39,7 +39,7 @@ module Piwigo
|
|
39
39
|
end
|
40
40
|
|
41
41
|
Dir.entries(directory).reject { |entry| entry =~ /^.{1,2}$/ }.each do |directory_entry|
|
42
|
-
item_to_process = File.join directory, directory_entry
|
42
|
+
item_to_process = (File.join directory, directory_entry).encode('utf-8')
|
43
43
|
|
44
44
|
if File.directory? item_to_process
|
45
45
|
@parent_album = ensure_album(File.dirname(item_to_process), nil)
|
data/lib/piwigo/images.rb
CHANGED
@@ -51,11 +51,15 @@ module Piwigo
|
|
51
51
|
attr_accessor :categories
|
52
52
|
|
53
53
|
def initialize(hash: nil)
|
54
|
-
hash&.each
|
54
|
+
hash&.each do |key, value|
|
55
|
+
# Bug: If the encoding is Windows-1252, then Piwigo will blowup when creating the album
|
56
|
+
value = value.encode('UTF-8', 'Windows-1252') if value.class == String && value.encoding.to_s == 'Windows-1252'
|
57
|
+
send("#{key}=", value)
|
58
|
+
end
|
55
59
|
end
|
56
60
|
end
|
57
61
|
|
58
|
-
class Paging
|
62
|
+
class Paging
|
59
63
|
# @return [Number] Page number of the results
|
60
64
|
attr_accessor :page
|
61
65
|
|
@@ -69,7 +73,11 @@ module Piwigo
|
|
69
73
|
attr_accessor :total_count
|
70
74
|
|
71
75
|
def initialize(hash: nil)
|
72
|
-
hash&.each
|
76
|
+
hash&.each do |key, value|
|
77
|
+
# Bug: If the encoding is Windows-1252, then Piwigo will blowup when creating the album
|
78
|
+
value = value.encode('UTF-8', 'Windows-1252') if value.class == String && value.encoding.to_s == 'Windows-1252'
|
79
|
+
send("#{key}=", value)
|
80
|
+
end
|
73
81
|
end
|
74
82
|
end
|
75
83
|
|
data/lib/piwigo/version.rb
CHANGED