[FDroidRepoBridge] Add New Bridge (closes #941)#2712
[FDroidRepoBridge] Add New Bridge (closes #941)#2712yamanq merged 2 commits intoRSS-Bridge:masterfrom
Conversation
Pull request artifacts
|
1d6c580 to
0f31c26
Compare
|
I upgraded phpunit in a separate commit. |
|
Ok I will resolve the conflicts |
b0fafc8 to
cab0623
Compare
|
We can do this in-memory: Your code is doing caching ad-hoc and not using our cache libraries. |
|
Sorry, I don't understand which part of the code your suggestion is meant to replace. I wanted to cache the index-v1.json file as it relatively large and should not change too often. How can I use the cache libraries here? |
|
The jar file is a string of bytes. We can use our |
|
Ah our cache libraries has a max of 24h cache. Maybe thats why you cache it manually. |
|
I understand why Is there a specific location that RSS-Bridge provides for temporary files? |
|
You dont have to use a temporary file. Use |
|
Good idea, but I will still need the temporary file for the zip. |
|
Ah yes maybe. Surprising that there is no option to open from string: https://www.php.net/manual/en/class.ziparchive.php
|
|
Now I am using only 1 temporary file for the zip and the bridge should be much faster since it is not constantly rereading the json into memory. |
|
Go ahead and do what you need to do. I'll backoff so there won't be any clashes. |
6574966 to
1cb47b2
Compare
|
I Changed the exampleValue to a smaller repository so that it doesn't overflow the default memory limits. The error without this is: @dvikan Looking at my local files, the cache file for f-droid.org ends up being 25M, whereas the jar file is 6.4M. I'm inclined to merge this as is. What do you think the best way to proceed here is? |
|
I think maybe it's not necessary to manually cache the json structure. The |
|
This is an issue specifically with f-droid.org (See here). So I will keep remove the manual caching but keep the smaller repo as the example value, as it is less likely to be overloaded. |
This is a new bridge that parses any F-Droid repository. I'm not sure if the old bridge (which parses HTML from only f-droid.org, limited to 3 items) should be deleted in favor of this one. Closes #941.
Important: This requires enabling the zip extension, as all F-Droid repos are stored as jar files.
Given that a new extension is enabled, this PR should not be squashed so that the commit adding the extension is kept separate.