Skip to content

Add build hashes#11

Merged
fire-light42 merged 1 commit intomasterfrom
build_hash
Apr 10, 2026
Merged

Add build hashes#11
fire-light42 merged 1 commit intomasterfrom
build_hash

Conversation

@fire-light42
Copy link
Copy Markdown
Contributor

While I was tinkering with the gradle updates I also added a feature I have been wanting for a good while: build hashes.

This would make it possible for CloudStream to verify that the downloaded plugin is actually correct and not a rate limiting page from Github (common issue when mass-downloading plugins).

It just adds a hash to the plugins json. For example:

    {
        "iconUrl": "https://www.google.com/s2/favicons?domain=archive.org&sz=%size%",
        "jarFileSize": 125513,
        "fileHash": "sha256-2ca6e3a54d688e7b2d8fa2a95b9059157c99d6e624bcbc780b2bbac3320452c5",
        "apiVersion": 1,
        "repositoryUrl": "https://github.com/user/repo",
        "fileSize": 28034,
        "status": 1,
        "authors": [
            "Luna712"
        ],
        "tvTypes": [
            "Others"
        ],
        "version": 1,
        "internalName": "InternetArchiveProvider",
        "jarUrl": "https://raw.githubusercontent.com/user/repo/builds/InternetArchiveProvider.jar",
        "description": "Watch content from the Internet Archive at archive.org",
        "url": "https://raw.githubusercontent.com/user/repo/builds/InternetArchiveProvider.cs3",
        "name": "InternetArchiveProvider",
        "jarHash": "sha256-92a312dc4694f5c4c1570eb8bb2260a4b82c25a34a80b398195af7052018ed6c"
    }
    

@fire-light42
Copy link
Copy Markdown
Contributor Author

@Luna712 What do you think?

@Luna712
Copy link
Copy Markdown
Contributor

Luna712 commented Apr 10, 2026

Very nice! But if this will cause more conflicts with #10, could it be done after? I dont know if it will though. But it is a very nice feature.

UPDATE: I meant tested on top of it, not necessarily a merge conflict which I could resolve if so.

@fire-light42
Copy link
Copy Markdown
Contributor Author

I do not think it will cause conflicts, the changes are small. Either way the earliest pull request takes precedence if there is a risk of conflicts.

@Luna712
Copy link
Copy Markdown
Contributor

Luna712 commented Apr 10, 2026

Yeah, realized my earlier message was unclear. I could resolve merge conflicts I just meant tested on top of it.

Copy link
Copy Markdown
Contributor

@Luna712 Luna712 left a comment

Choose a reason for hiding this comment

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

Either way, this is an amazing addition and solves one issue I've ran into before myself as well.

@Luna712
Copy link
Copy Markdown
Contributor

Luna712 commented Apr 10, 2026

Hmm actually... what about extensions that havent been rebuilt after this addition yet and thus wouldn't have a hash?

@fire-light42
Copy link
Copy Markdown
Contributor Author

My plan is to have something like:

if (hash != null) checkHash()

While waiting for adoption.

@fire-light42 fire-light42 merged commit 25291d4 into master Apr 10, 2026
2 checks passed
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.

2 participants