Skip to content

Commit

Permalink
Changes see changelog.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
rols1 committed Oct 15, 2020
1 parent 7d465e6 commit 873466e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.image.flickrexplorer" name="FlickrExplorer" version="0.7.2" provider-name="rols1 (rols1@gmx.de)">
<addon id="plugin.image.flickrexplorer" name="FlickrExplorer" version="0.7.3" provider-name="rols1 (rols1@gmx.de)">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
<import addon="script.module.kodi-six" />
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ CHANGE HISTORY Kodi-Addon-FlickrExplorer
Releases: https://github.com/rols1/Kodi-Addon-FlickrExplorer/releases
--------------

15.10.2020 0.7.3 ShowPhotoObject: for albums-lists api-call photos.getSizes added to
get the sizes-list for every photo in the loop. If no Original-mark
is found, the addon takes the last list-entry (ascending sorted).

15.10.2020 0.7.2 BuildPath: added api-method for getting photos from photosets
(albums)
MyAlbumsSingle: photoset_id added for BuildPath.
Expand Down
30 changes: 29 additions & 1 deletion flickrexplorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

# +++++ FlickrExplorer - Addon Kodi-Version, migriert von der Plexmediaserver-Version +++++

VERSION = '0.7.2'
VERSION = '0.7.3'
VDATE = '15.10.2020'

#
Expand Down Expand Up @@ -1320,6 +1320,34 @@ def ShowPhotoObject(title,path,user_id,username,realname,title_org):
else: # Favs-Url wie thumb_src ohne extra (m)
img_src = 'https://farm%s.staticflickr.com/%s/%s_%s.jpg' % (farmid, serverid, pid, secret)
summ = owner # falls ohne Größenangabe

# für Originalbilder in Alben zusätzl. getSizes-Call erforderlich:
PLog('Mark0')
if "photosets.getPhotos" in path: # Output ohne Url-Liste für Größen
if SETTINGS.getSetting('max_width') == "Originalbild":
PLog('try_info_call:')
API_KEY = GetKey()
p1 = "https://www.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key=%s" % API_KEY
p2 = "&photo_id=%s&format=rest" % (pid)
info_url = p1 + p2
page, msg = RequestUrl(CallerName='ShowPhotoObject2', url=info_url)
if page:
sizes = blockextract('<size label', '', page)
source=''
for size in sizes:
if '"Original"' in size:
width = stringextract('width="', '"', s) # z.B. "1600"
height = stringextract('height="', '"', s) # z.B. "1200"
source = stringextract('source="', '"', s)
break
else: # Original kann fehlen, letzte Zeile auswerten (aufsteigend sort.)
width = stringextract('width="', '"', sizes[-1]) # z.B. "3968"
height = stringextract('height="', '"', sizes[-1]) # z.B. "2907"
source = stringextract('source="', '"', sizes[-1])

if source:
img_src = source
summ = owner + ' | ' + '%s: %s x %s' % (Imagesize, width, height)

PLog(descr); PLog(img_src); # PLog(thumb_src); PLog(pid);PLog(owner); # bei Bedarf

Expand Down

0 comments on commit 873466e

Please sign in to comment.