none
Has access to Flickr changed? RRS feed

  • Question

  • BG = ImageList.LoadImage(Flickr.GetPictureOfMoment())

    GraphicsWindow.DrawResizedImage(BG,0,0,GraphicsWindow.Width,GraphicsWindow.Height)

    Nothing is displayed

    Thursday, April 18, 2019 4:45 PM

Answers

  • I managed to fix the path with an update to LDUtilities.FixFlickr() - in new beta release of extension.

    Even with this fix there are still issues getting the image file with ImageList or Network.DownloadFile.

    However LDNetwork does seem to work - its a bit more code, but the following now works for me.

    LDUtilities.FixFlickr() 'only needs to be called once before Flickr commands
    img = Flickr.GetPictureOfMoment()
    file = File.GetTemporaryFilePath()
    LDNetwork.DownloadFile(file,img)
    BG = ImageList.LoadImage(file)
    File.DeleteFile(file)
    
    GraphicsWindow.DrawResizedImage(BG,0,0,GraphicsWindow.Width,GraphicsWindow.Height)
    http://litdev.co.uk/#Extensions


    Thursday, April 18, 2019 6:43 PM
    Moderator

All replies

  • Looks like it.

    See https://www.flickr.com/groups/51035612836@N01/discuss/72157704601650352/

    Looks like Flickr have removed a . in their API address

    https://farm66.static.flickr.com/65535/40671201693_7c1b9ebe56.jpg (fails - what SB uses)

    https://farm66.staticflickr.com/65535/40671201693_7c1b9ebe56.jpg (this works)

    Line in SB code that now doesn't work:

            _picUrlTemplate = "http://farm{0}.static.flickr.com/{1}/{2}_{3}.jpg";

    Thursday, April 18, 2019 5:34 PM
    Moderator
  • I managed to fix the path with an update to LDUtilities.FixFlickr() - in new beta release of extension.

    Even with this fix there are still issues getting the image file with ImageList or Network.DownloadFile.

    However LDNetwork does seem to work - its a bit more code, but the following now works for me.

    LDUtilities.FixFlickr() 'only needs to be called once before Flickr commands
    img = Flickr.GetPictureOfMoment()
    file = File.GetTemporaryFilePath()
    LDNetwork.DownloadFile(file,img)
    BG = ImageList.LoadImage(file)
    File.DeleteFile(file)
    
    GraphicsWindow.DrawResizedImage(BG,0,0,GraphicsWindow.Width,GraphicsWindow.Height)
    http://litdev.co.uk/#Extensions


    Thursday, April 18, 2019 6:43 PM
    Moderator
  • Thanks for the quick patch

    'LDUtilities.Version()
    LDUtilities.FixFlickr()
    While ("TRUE")
     img = Flickr.GetRandomPicture("Quick")
     file = File.GetTemporaryFilePath()
     LDNetwork.DownloadFile(file,img)
     BG = ImageList.LoadImage(file)
     File.DeleteFile(file)
     GraphicsWindow.DrawResizedImage(BG,0,0,GraphicsWindow.Width,GraphicsWindow.Height)
    endwhile
    

    Thursday, April 18, 2019 9:34 PM