flickr_offline_gallery 0.0.3 → 0.0.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b64d39dc85fe5012c5ab5d34ddbdae6009ad042
|
4
|
+
data.tar.gz: 9cf59a2a70a8d2589adfd832915f9b744d2c730d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31cc36a1b3d5db822a840c2ef821612d02be47425f7056ce4526f7e224f969f7e893da8617bd94e0954784fc8659a5052fb4bdbb5a860955a2e7f9eea0d7652e
|
7
|
+
data.tar.gz: 69c35d3d88ed13ed420e710b5e2bac501f47f4460c53dd4874e97a2952caa7951f84dd0067f89cb3bf265bf36d67c1d35770c6afab4413956335b1f68ee87a45
|
@@ -2,12 +2,13 @@ module FlickrOfflineGallery
|
|
2
2
|
class Photo
|
3
3
|
include VerbosePuts
|
4
4
|
|
5
|
+
attr_reader :id
|
6
|
+
|
5
7
|
def initialize(horrible_flickraw_response_junk, args = {})
|
6
8
|
@path_manager = args[:path_manager]
|
7
9
|
@id = horrible_flickraw_response_junk["id"]
|
8
10
|
@photoset_id = args[:photoset_id]
|
9
11
|
eager_load
|
10
|
-
verbose_puts %(Fetched data about photo #{@id}: "#{title}")
|
11
12
|
end
|
12
13
|
|
13
14
|
def title
|
@@ -23,12 +23,19 @@ module FlickrOfflineGallery
|
|
23
23
|
|
24
24
|
def photos
|
25
25
|
raise "photoset has more than 500 images and I'm too lazy to handle that right now" if info.pages > 1
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
return @photos if @photos
|
27
|
+
verbose_puts "Initializing photoset... "
|
28
|
+
total_photos = info.photo.size
|
29
|
+
@photos = []
|
30
|
+
info.photo.each do |raw_response|
|
31
|
+
photo = Photo.new(raw_response,
|
32
|
+
:photoset_id => @photoset_id,
|
33
|
+
:path_manager => path_manager)
|
34
|
+
@photos << photo
|
35
|
+
verbose_puts %(Fetched (#{@photos.size}/#{total_photos}) "#{photo.title}" (#{photo.id}))
|
36
|
+
end
|
37
|
+
verbose_puts "Finished initializing photoset!"
|
38
|
+
@photos
|
32
39
|
end
|
33
40
|
|
34
41
|
def index_page_filename
|