-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] User Accounts #623
base: master
Are you sure you want to change the base?
[WIP] User Accounts #623
Conversation
what has to be considered as well are user related settings that are currently in the server config |
I'd say everything should be per user. that should also include downloads. I guess this would still be a problem even with separated downloads, unless every user uses their own source instance. everything that is currently stored on the file system would also have to be per user right? e.g. downloads and thumbnails |
Library update could be per user, for this I think we would need a task that runs every 6 hours, grabs manga from users who's interval has passed(could be days for some users, 6 at the minimum), and then update them. Downloader is more special, right now my idea is allow anyone to download, and the download queue will grab the user data based on the subscriber, this would allow unique user data to go to each user. This only works on gql, so the old websocket url won't have user data. Only admins would be able to delete files. Or we could make a userDeleted field in the chapter user data, and if all users who have that manga favorited have the userDeleted field true, then actually delete the file. I think normal vs cbz downloads would be configured by the system administrator, not per user. Everything on the filesystem doesn't need to be per user, since manga and chapter ids won't change between users, we dont need to separate anything. Thats right, if we separate sources per user, rate-limits won't properly apply between http clients. We may have to make source settings global that only the admin can change hmm. |
I guess you would have to decrease the task to 1h since in case someone has it to update between every e.g. 6h and 12h then it would only get triggered every 12h would this be one global updater or one per user? same for the downloader I guess?
I think that would be a better experience, since you don't have to manually clean up things that aren't needed anymore
that are the preferences right? I think doing it like that would be the easiest way, but I guess there are also settings which would make sense to be per user instead of global
|
There are technical limitations to source settings, since we need to have 1 source instance to preserve the rate-limit, we can't separate the sources per user, and since sources expect their settings to be in the source, we have to limit them to either be editable by everyone or admin only. There are drawbacks to library update and downloader sharing, but its the best option we have. We could always sort manga update order according to the the ones that are used the most or updating the smaller libraries first. I think 6 hours is a fine interval, since we can always just bump the user to the next interval. If a user sets 24 hours, they will always get the update at the same time, or if a user selects 6 hours, they will always get updates. |
I think the limitations should be made quite clear in the documentation once that is in to prevent any wrong expectations If the "global" update task runs every 6h then I think the possible update interval has to be changed to be only multiples of 6, since everything between them will be bumped to the next higher multiple |
Hmm, right I was thinking in Tachiyomi library update terms, I forgot that users can set weird update times like every 7 hours. I think every hour would be fine then |
# Conflicts: # server/build.gradle.kts # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/MangaMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/subscriptions/ApolloSubscriptionProtocolHandler.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/subscriptions/ApolloSubscriptionSessionState.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/UpdateController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Chapter.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Library.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update/Updater.kt
# Conflicts: # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ExtensionMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/CategoryQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/ChapterQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/ExtensionQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/MangaQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/MetaQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/SourceQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/MangaController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/chapter/ChapterForDownload.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/Downloader.kt
# Conflicts: # server/src/main/kotlin/suwayomi/tachidesk/global/controller/GlobalMetaController.kt # server/src/main/kotlin/suwayomi/tachidesk/global/controller/SettingsController.kt # server/src/main/kotlin/suwayomi/tachidesk/global/impl/GlobalMeta.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/CategoryDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/ChapterDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/MangaDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/dataLoaders/MetaDataLoader.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/BackupMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/CategoryMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/DownloadMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ExtensionMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/MangaMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/MetaMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/SettingsMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/SourceMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/UpdateMutation.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/BackupQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/CategoryQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/ChapterQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/ExtensionQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/InfoQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/MangaQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/MetaQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/SourceQuery.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLContextFactory.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLSchema.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLServer.kt # server/src/main/kotlin/suwayomi/tachidesk/graphql/types/SettingsType.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/BackupController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/CategoryController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/DownloadController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/ExtensionController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/MangaController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/SourceController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/controller/UpdateController.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Category.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/CategoryManga.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Chapter.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Library.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Manga.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/MangaList.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Search.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/proto/ProtoBackupExport.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/backup/proto/ProtoBackupImport.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/chapter/ChapterForDownload.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/DownloadManager.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update/Updater.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/CategoryTable.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/model/table/ChapterTable.kt # server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt # server/src/test/kotlin/suwayomi/tachidesk/manga/impl/CategoryMangaTest.kt # server/src/test/kotlin/suwayomi/tachidesk/manga/impl/MangaTest.kt # server/src/test/kotlin/suwayomi/tachidesk/manga/impl/SearchTest.kt
Hi, any progress on that? Would love to see that feature |
Closes #298
Todo: