GrandyB / SheetsIO

Small configurable Java app that pulls data from a Google Spreadsheet (using v4 api) and writes to files and a local webserver.
GNU Lesser General Public License v3.0
22 stars 3 forks source link

gif is not working as intended #52

Open kaprixal opened 1 year ago

kaprixal commented 1 year ago

I am trying to put a gif into OBS via sheets, but in OBS it is very inconsistent on how it shows up. On the first try, it is possible that the gifs are working but for other tries, the gifs are basically static images and do not move. When I try to change the source of the gif, I get an error telling me SheetsIO has trouble deleting a file.

image

Steps to reproduce the behavior:

  1. Put a link to a gif in a sheets cell and write in the config the changes as necessary (extension gif)
  2. Upload the file to OBS as a media source
  3. See potential error here about whether the gif plays normally
  4. Change the source of the gif in the cells
  5. See error here as seen in the image.

    • OS: Windows 10

Additional context Here are some logs I found regarding the issue:


2023-07-03 23:07:11.190 [Thread-5] DEBUG application.services.FileIO - Read [43ms]
2023-07-03 23:07:11.204 [Thread-5] DEBUG application.services.FileIO - Write [14ms]
2023-07-03 23:07:11.205 [Thread-5] DEBUG application.services.FileIO - Image stored to 'temp\OY5EK950.gif' [58ms]
2023-07-03 23:07:11.205 [Thread-5] ERROR application.panels.BasePanel - Unable to read image from URL 'https://cdn.discordapp.com/attachments/1114696688565756036/1114720539144097792/Mei.gif' - ensure it is of a supported type
Ensure it is of a valid type: [png, jpg, jpeg, gif, bmp]
2023-07-03 23:07:11.205 [Thread-5] ERROR application.panels.BasePanel - application.services.FileUpdater.updateImage(FileUpdater.java:136)```
GrandyB commented 1 year ago

Can you try uploading that gif to a different site, e.g. imgur, and see if that still happens?

kaprixal commented 1 year ago

No, it still does not work. I'm going to try locally in a bit but it seems on my machine that it's completely not working. image

kaprixal commented 1 year ago

Also does not work locally: image

GrandyB commented 1 year ago

The latter has a broken file:// link from the looks of it. The former I would expect to have ".gif" at the end

kaprixal commented 1 year ago

I'm not sure how to fix the broken link from the file:// one, it goes directly to the intended file. I will try again from imgur

kaprixal commented 1 year ago

Update: tried with the fixed imgur link and instead, the source is static and not gif

GrandyB commented 1 year ago

Sorry for the lack of responses; was prompted back here by someone else with the same issue. I've recently gone through a hard drive failure so haven't got my development setup back up and running but will see if I can find time.

However, I did think of a potential workaround, which is to leverage the mini webserver contained within the application

Once you've run an update, you can head to e.g. http://localhost:8001/myProject/test The port number is part of the application.properties file (default 8001), 'myProject' is the name of your project and 'test' is the name of the item you gave it in your config.

Just tested that and it seems to work. I believe it'll stretch the contents of everything to fit the window size you give it, so you could use it with a browser source and be careful with the sizing in there.