Commit Graph

130 Commits

Author SHA1 Message Date
schroda
ed74f7c851 Make remaining image requests abortable (#645) 2024-03-08 00:24:01 +01:00
schroda
6cff75e257 Feature/limit concurrent image requests (#639)
Prevent exhausting the available concurrent requests to the same domain by the browser with just image requests.

This prevents e.g. when browsing a slow source from having 6 concurrent image requests and having to wait for the next page request until one of those requests has finished
2024-03-05 02:11:40 +01:00
schroda
daf6b50249 Fix/deprioritize image requests (#638)
* Use "fetch" instead of "axios"

Axios does not support prioritizing requests

* Deprioritize image requests

The browser requests images (<img>) with low priority by default.
Due to switching to loading images via axios (f852ce70e7), the image requests had the same priority as other requests and thus blocked e.g. xhr requests
2024-03-05 02:07:05 +01:00
schroda
8bdf035ca7 Feature/add option to remove manga from categories when removing from library (#633)
* Optionally remove manga categories when removing them from library

* Use "Mangas::removeFromLibrary"

* Handle uncatched promises
2024-03-02 15:28:58 +01:00
schroda
c5a5c4b8af Fix/add manga to library without dialog not adding default categories (#632)
* Add default categories when adding manga to library without dialog

* Add manga to library and update categories in one mutation
2024-03-02 15:26:15 +01:00
schroda
79d35404d3 Fix/double page mode not aborting preload image requests (#628)
* Use request manager to preload images in DoublePagedPager

Was forgotten to update along with f852ce70e7

The requests for the preload also never got aborted

* Revoke object urls after load
2024-03-01 18:27:46 +01:00
schroda
f852ce70e7 Abort image requests on unmount (#624) 2024-03-01 01:17:23 +01:00
schroda
fd651b6165 Feature/add vui as webui flavor (#609)
* Remove unused "downloadAhead" function

* [Codegen] Update generated files

* Add "VUI" as webui flavor

* Add info about changing the webUI channel or flavor
2024-02-17 20:16:51 +01:00
schroda
c099e01fb7 Add manga fetch timestamp to thumbnail url (#598)
In case the fetch timestamp of a manga changed, it's possible that the thumbnail has changed as well, thus, the currently cached image should be ignored
2024-02-16 19:38:13 +01:00
schroda
2acf2b6d33 Feature/download ahead trigger chapter downloads client side (#597)
* Trigger download ahead while reading client side

* Trigger download ahead while reading earlier

Download ahead was only triggered once the chapter got marked as read

* Optionally ignore dupe chapters for download ahead

* Consider current chapters scanlator for dupe check

* Update download ahead related settings

- add new metadata setting for download ahead limit
- previous setting
  - rename
  - update usage (auto download new chapters limit)

* Select chapter to auto delete while reading depending on ignore dupe setting

Currently, the n-th to last chapter always got deleted ignoring if "ignore dupes" setting was enabled or not.

* Only auto delete chapter while reading if it is read

In case not the last read but the n-th to last read chapter should get auto deleted while reading, it currently just got deleted ignoring if it has been read or not.
2024-02-16 19:16:18 +01:00
schroda
bf3815e3bd Correctly update cache after updating an extension (#590)
After installing/uninstalling/updating an extension all other extension were removed from the list besides the updated extension

Regression introduced with 506e0aa0e3
2024-02-01 22:58:01 +01:00
schroda
b074de26a2 Fix/install external extension does not update extension list (#580)
* Update extension list after installing external extension file

The cache was never updated after the installation

* Make it possible to install external extension while having an empty list

* Show toasts while having an empty extension list

* Use correct extension id

* Update extension action after manual file installation

When installing an external extension the action button did not get updated due to this being an internal state of the ExtensionCard.
By including this in the key, it gets ensured that the component will get correctly updated
2024-01-29 20:59:27 +01:00
schroda
506e0aa0e3 Update extension list after removing an obsolete extension (#579)
The removed extension was never removed from the cached list
2024-01-29 20:56:09 +01:00
schroda
e0c5e0521d Feature/manga migration (#536)
* Add "migration" tab to "Browse" screen

* Add missing useEffect cleanup for navbar title and actions

* Make "SourceGridLayout" reusable

* Add migration tab to "Browse"

* Add migration logic
2024-01-26 20:50:51 +01:00
Chance Zibolski
05f57730db Support configuring automatic downloads by category (#562)
Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
2024-01-21 22:31:04 +01:00
schroda
1c2a196950 Fix/adding manga to library not updating category (#559)
* Refetch categories after updating a manga

After adding/removing a manga to/from the library, the categories did not update.

* Include manga categories int the manga update mutation response
2024-01-17 13:45:30 +01:00
schroda
42e3d64f80 Clear extensions cache after extension repos change (#555)
This will force a refetch of the extensions the next time the list gets opened which will update the extensions on the server
2024-01-15 23:22:25 +01:00
schroda
3973eda089 [ServerMapping][Codegen] Update to latest server gql MangaType changes (#546) 2024-01-11 03:53:06 +01:00
schroda
39b79c6ebe Feature/settings support custom extension repos (#539)
* [Codegen] Support custom extension repos

* [VersionMapping] Require server version "r1444" for preview
2024-01-06 18:38:16 +01:00
schroda
05fa3d0732 Fix/chapter not getting deleted after being read (#532)
* Create permanent subscriptions

The subscriptions have to be permanently open, otherwise, the cache gets outdated.

E.g. in case a view is open, which does not subscribe to the download updates, finished downloads are never received and thus, data of existing chapters/mangas in the cache get outdated

* [Codegen][Tool] Get latest data from cache for automatic chapter deletion after reading

The manga chapters query is on "standby" to prevent the reader from rerender in case the underlying query data updates, which would cause the reader to jump back to the beginning of the last read page.
Thus, when checking if the chapter should be automatically deleted, the data from the query can't be used, since it is outdated.
2024-01-01 22:40:39 +01:00
schroda
37ce494fda Log promise failures instead of ignoring them (#531)
In case the failure does not get handled, it should at least get logged, to prevent silently ignoring it
2023-12-31 01:42:54 +01:00
schroda
a3a52064cc Feature/cleanup chapter actions (#525)
* Extract chapter actions into "Chapters"

* Extract chapter action menu into component

* Rename "SelectionFABActionItem" to "MenuItem"

* Decouple "MenuItem" from "SelectionFAB"

* Use "MenuItem" in "ActionMenus"

* Merge chapter action menus

* Simplify chapter "mark as read" action
2023-12-30 04:04:59 +01:00
schroda
f12f025e9d Add option to remove non library mangas from categories (#520)
It's currently not possible to filter out non library mangas from the mangas field of categories, thus, the totalCount of mangas in a category might be greater than what is actually displayed in the library.
2023-12-27 18:17:41 +01:00
schroda
446deeae06 Feature/library manga actions (#506)
* Extend "IMangaGridProps" from "DefaultGridProps"

* Move library manga filtering into hook

* Add logic to select mangas

* Add manga actions

* Remove cache only policy for category mangas

Unclear why this was added

* Prevent SelectionFAB from being hidden by the mobile footer

On e.g. the library page, the footer is visible and thus, the fab was not completely visible

* Update categories of manga only after clicking "OK"

Previously, selecting a category resulted in an immediate mutation.
To be able to reuse the "CategorySelect" component to change the categories of multiple mangas at once, this behaviour is not suited.

* Add action to change categories of multiple mangas

* Cancel selection mode after removal from library

The mangas would still be selected and other action could get performed. However, this should only be possible for mangas that are in the library

* Remove unintentionally added console log

Accidentally added with 980da657d9
2023-12-25 21:37:45 +01:00
schroda
e966b0328b Remove unnecessary query refetches with mutations (#508) 2023-12-23 15:15:08 +01:00
schroda
1dc60af67c Add logic to reorder downloads (#495) 2023-12-13 02:05:03 +01:00
schroda
78310496aa Feature/about screen add option to check for and trigger updates (#485)
* [VersionMapping] Require server version "r1436" for preview

* Move ts util types to new type file

* Add buttons for updating server and webUI
2023-12-09 23:08:27 +01:00
schroda
fbf627b3aa Add option to clear the server cache (#487) 2023-12-09 14:16:52 +01:00
schroda
ad0f072651 Feature/automatic chapter deletion more options (#484)
* Add missing translations keys

* [Codegen] Update to latest server schema changes

* [VersionMapping] Require server version "r1431" for preview

* Rename "deleteChaptersAutoMarkedRead" metadata setting

* Add more options to auto delete chapters while reading

Makes it possible to delete the last to fifth to last read chapter instead of only being able to delete the last read chapter
2023-12-05 22:20:13 +01:00
schroda
7c69a4a5a1 Feature/global update last timestamp use stale data while fetching (#473)
* Cache last update timestamp

* Correctly detect update as finished

The update status on server side does not get reset, thus, in case a previous update was finished, it would get detected as finished and handled once on the initial render.
2023-11-25 15:35:36 +01:00
schroda
aa01d6712b Update extensions list after extension update (#471) 2023-11-24 03:20:16 +01:00
schroda
7adc28a35c Feature/gql improve queries mutations subscriptions (#470)
* [Codegen] Request less fields for category mutations

* [Codegen] Request less fields for chapter mutations

* [Codegen] Request less fields for downloader mutations

* [Codegen] Request less fields for extension mutations

* [Codegen] Request less fields for manga mutations

* [Codegen] Request less fields for source mutations

* [Codegen] Request less fields for updater subscription

* [Codegen] Request less fields for downloader subscription

* [Codegen] Combine chapter update mutations
2023-11-24 03:17:49 +01:00
schroda
cdf9229457 Feature/global update show last update time (#468)
* Show last global update timestamp

* Add update button to "Updates" screen
2023-11-19 22:43:29 +01:00
schroda
d12ac27b61 Feature/download ahead while reading (#464)
* Download next chapters when marking chapter as read while reading

* Add "auto delete chapter" settings

* Delete chapter after finished reading

* Delete chapters after marking them as read

* Improve "mark previous as read" action

Send only ids of chapters that are actually unread
2023-11-19 21:17:35 +01:00
schroda
7db5435967 Remove "useCache" query from image requests (#465)
Should have been removed with eda682d9ab
2023-11-19 21:17:10 +01:00
schroda
482db4626a Prevent infinite re-renders in extensions (#457)
Regression introduced with 593acc7f89
2023-11-18 19:55:35 +01:00
schroda
a0a52b11a1 Fix/pagination of sources which require pages to be fetched in order (#451)
* Handle sources that do not support revalidation

At least e-hentai is not able to handle out of order pagination requests.
E.g. in case the last request was for page 1 and the next one is for page 3, the result will be for page 2, because e-hentai just ignores the request page number and just returns the next page after the last fetched one.

* Optionally clear source browse cache when opening component

At least e-hentai is not able to handle out of order pagination requests.
The revalidation logic will cause exactly this.
Due to this, the revalidation for these sources is disabled.
To prevent an out of date cache, it gets cleared when routing to the source component
2023-11-11 23:43:22 +01:00
schroda
345fbcb5c7 Fix/apollo client spamming infinite requets on failure (#450)
* Remove abort controller by default from requests

Apollo client is, for whatever reason, considering it a new hook call when passing an abort controller to be passed to the actual request.
On request failures this then causes infinite requests due to it being a new hook call.

* Move side effect into useEffect

This was missed and started causing issues after the changes of 60429d9d98544e1e49a112aacf77bdbb831740ec.
Due to the changes, the component did not re-render unnecessarily which caused the component not to re-render with the fetched data

* Reset fetching initial pages state

The state was never reset, thus, in case of an error, the initial pages fetch was never triggered again
2023-11-11 23:42:58 +01:00
schroda
291e1899f9 Remove re-fetching of manga query on chapter update (#449)
The mutation returns the mutated manga, thus, updating the cache which makes this  refetch unnecessary and just creates redundant requests.
2023-11-11 23:42:33 +01:00
schroda
c5f943d571 Get latest manga data from the apollo cache (#447)
When using the cached results, replace them with the latest cached data from apollo.
This will have the updated data, that was inserted from the manga update mutation
2023-11-05 22:40:35 +01:00
schroda
593acc7f89 Refresh extension list after updating (#446)
When using the cached results, replace them with the latest cached data from apollo.
This will have the updated data, that was inserted from the extension update mutation
2023-11-05 22:37:28 +01:00
schroda
7cb062d453 Feature/extensions always use fetch mutation to get list (#440)
* Reset the cache after importing a backup

* Add option to delete cached data after ttl is reached

* Always use mutation to get extensions list
2023-11-04 22:40:38 +01:00
schroda
1acda66b16 Feature/update backup restore to server changes (#438)
* [Codegen] Update back query/mutation

* Update backup restore

* [VersionMapping] Require server version "r1410" for preview
2023-11-02 13:01:01 +01:00
schroda
a638333684 Handle source browse when first page is also the last page (#436)
In case the first page was also the last page, there is no next page that can be fetched.
On large screens, where the initial pages to fetch are 2, this resulted in an endless loading screen
2023-10-29 20:51:53 +01:00
schroda
4c6d507405 Feature/show backup restore progress (#431)
* Extract "Progress" component

* Show backup restore progress
2023-10-29 01:49:27 +02:00
schroda
30fd8b0fca Feature/support new tachiyomi backup file extension (#430)
* [Codegen] Fix restore backup mutation/query

The server doesn't support nested objects for file uploads

* Support new tachiyomi backup extension
2023-10-29 01:45:08 +02:00
schroda
5a5b12a9e1 [ESLint] Prefer named exports (#427) 2023-10-28 00:32:02 +02:00
schroda
68e7b4b16d Feature/library global update exclude manga with state (#281)
* Extract global update settings

* Add option to exclude mangas with specific state from global update
2023-10-27 23:39:05 +02:00
schroda
2ad9ccd9bd Use gql for loading default category mangas 2023-10-27 20:23:47 +02:00
schroda
b6382bb33a Load only category mangas that are in the library 2023-10-27 20:23:47 +02:00