Skip to content

Conversation

@Craigmoore
Copy link

Google Poly integration had been removed in the past, but has been reinstated using the new Open Source project Icosa. These changes support that effort.

Currently, integration centers on the icosa.ixxy.co.uk API implementation.

@Craigmoore Craigmoore marked this pull request as draft October 25, 2024 08:45
@Exairnous Exairnous marked this pull request as ready for review September 9, 2025 17:51
@DougReeder
Copy link
Member

Hey, running mix format is great — except we just merged a PR that formats the files that weren't formatted. We can sort it out at the merge if you like, but it would be cleaner if you could revert your mix format commit and rebase on master.

I'm sorry we didn't get our ducks in a row, before your latest work.

@DougReeder
Copy link
Member

Could you please apply this diff file?

icosa-local.txt

Note: The code for this commit was generated by one or more AI tools: probably Github Copilot (GPT-5 Mini?) and potentially also Claude Code CLI (Sonnet 4.5?).
By @DougReeder
Why: Icosa doesn't have the rate limits that YouTube has.
The original comment contained useful context.
@DougReeder
Copy link
Member

I think you may need to run mix format just on the files changed by this PR: https://github.com/icosa-mirror/reticulum/actions/runs/19301386657

Again, sorry we didn't have this set up fully before you started work.

@DougReeder
Copy link
Member

DougReeder commented Nov 19, 2025

With the Icosa API fixed, the rebased code is able to pull object from both archive.org and backblaze (Icosa proper)!

The CI won't pass this until files changed in this PR are run through mix format, but I've done that and retested, and it still works fine.

When pulling from backblaze (for example, [info] GET /https://s3.us-east-005.backblazeb2.com/icosa-gallery/poly/0IuRrFSlk5D/GroundDisc.png), but not archive.org, the reticulum log contains the message

[warning] Description: ~c"Server authenticity is not verified since certificate path validation is not enabled"
Reason: ~c"The option {verify, verify_peer} and one of the options 'cacertfile' or 'cacerts' are required to enable this."

That's not a blocker, but let's take a look and see if it's an easy fix.

@andybak
Copy link

andybak commented Nov 20, 2025

I just pushed a commit with the results of mix format. Let me know if that does the trick.

re: the cert/SSL warning. We can't reproduce this with curl -i https://s3.us-east-005.backblazeb2.com/icosa-gallery/poly/0IuRrFSlk5D/GroundDisc.png or wget https://s3.us-east-005.backblazeb2.com/icosa-gallery/poly/0IuRrFSlk5D/GroundDisc.png - I suspect this is more likely to be an issue with reticulum config.

@andybak
Copy link

andybak commented Nov 20, 2025

When I try to merge upstream/master into this PR I get two conflicted files.

media_search.ex looks trivial. But page_controller.ex is beyond me. Is this something you can tackle @DougReeder ?

@DougReeder
Copy link
Member

re: the cert/SSL warning. We can't reproduce this with curl

Yes. I should have linked to #742 which explains the problem and lack of working solution. :-(

@DougReeder
Copy link
Member

DougReeder commented Nov 20, 2025

When I try to merge upstream/master into this PR I get two conflicted files

I was able to merge in master — the changes are here: icosa-mirror#3
After merging that, please run git diff -b upstream/master to double-check the Icosa work hasn't been mangled. I eyeballed it, but we should be meticulous with changes to code we're not actively working on.

@DougReeder
Copy link
Member

Now that archive.org is back up (albeit slowly), the version with master merged is working fine for both archive.org (Poly) and backblaze (Icosa) so far.

@DougReeder
Copy link
Member

mix format --check-formatted '{lib,priv,test,config}/**/*.{ex,exs}' finds no problems on my dev machine, but there's a problem in CI: https://github.com/DougReeder/reticulum/actions/runs/19548931070/job/55974933333

absinthe is listed in mix.exs:

 {:absinthe, "~> 1.4"},

and running mix deps.get does not change any files tracked by git.

So, I've updated lint-and-test in the formatting PR to icosa-mirror:master, and that appears to resolve the issue: https://github.com/DougReeder/reticulum/actions/runs/19553649115

|> resolved()}
end

# Necessary short circuit around google.com root_host to skip YT-DL check for Poly
Copy link
Member

@DougReeder DougReeder Nov 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there isn't a rate limit for the Icosa API, is this code needed?


defp resolve_non_video(
%MediaResolverQuery{
url: %URI{host: "api.icosa.gallery", path: "/v1/assets/" <> asset_id} = uri
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value assigned to uri is not used. If this is intentional, we should drop = uri

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... or we could rename uri to _uri to indicate it's not used.

make_reverse_proxy_request(conn, url, body, is_head, opts)
end

{:ok, %HTTPoison.Response{status_code: status_code}} ->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a success, so we don't care what the exact status code is, so this line should be:

{:ok, %HTTPoison.Response{}} ->

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, we could rename status_code to _status_code to show it's not used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants