Skip to content

Commit

Permalink
Merge pull request #115 from Suwayomi/manual-track-sync
Browse files Browse the repository at this point in the history
Fix issues with Tracking in 1.6.x.
  • Loading branch information
aless2003 authored Apr 17, 2024
2 parents e8b0bdc + 58fafed commit 682b4af
Show file tree
Hide file tree
Showing 24 changed files with 1,123 additions and 239 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {
}

group = 'online.hatsunemiku'
version = '1.6.1'
version = '1.7.0'
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

Expand Down
49 changes: 47 additions & 2 deletions schemas/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,16 @@ enum FetchSourceMangaType {
LATEST
}

input FetchTrackInput {
clientMutationId: String
recordId: Int!
}

type FetchTrackPayload {
clientMutationId: String
trackRecord: TrackRecordType!
}

union Filter = CheckBoxFilter | GroupFilter | HeaderFilter | SelectFilter | SeparatorFilter | SortFilter | TextFilter | TriStateFilter

input FilterChangeInput {
Expand Down Expand Up @@ -884,10 +894,12 @@ type MangaType {
updateStrategy: UpdateStrategy!
url: String!
age: LongString
bookmarkCount: Int!
categories: CategoryNodeList!
chapters: ChapterNodeList!
chaptersAge: LongString
downloadCount: Int!
firstUnreadChapter: ChapterType
lastReadChapter: ChapterType
latestFetchedChapter: ChapterType
latestReadChapter: ChapterType
Expand Down Expand Up @@ -988,9 +1000,12 @@ type Mutation {
setSourceMeta(input: SetSourceMetaInput!): SetSourceMetaPayload!
updateSourcePreference(input: UpdateSourcePreferenceInput!): UpdateSourcePreferencePayload!
bindTrack(input: BindTrackInput!): BindTrackPayload!
fetchTrack(input: FetchTrackInput!): FetchTrackPayload!
loginTrackerCredentials(input: LoginTrackerCredentialsInput!): LoginTrackerCredentialsPayload!
loginTrackerOAuth(input: LoginTrackerOAuthInput!): LoginTrackerOAuthPayload!
logoutTracker(input: LogoutTrackerInput!): LogoutTrackerPayload!
trackProgress(input: TrackProgressInput!): TrackProgressPayload!
unbindTrack(input: UnbindTrackInput!): UnbindTrackPayload!
updateTrack(input: UpdateTrackInput!): UpdateTrackPayload!
updateCategoryManga(input: UpdateCategoryMangaInput!): UpdateCategoryMangaPayload!
updateLibraryManga(input: UpdateLibraryMangaInput!): UpdateLibraryMangaPayload!
Expand Down Expand Up @@ -1031,6 +1046,7 @@ type PageInfo {

type PartialSettingsType implements Settings {
autoDownloadAheadLimit: Int @deprecated(reason: "Replaced with autoDownloadNewChaptersLimit, replace with autoDownloadNewChaptersLimit")
autoDownloadIgnoreReUploads: Boolean
autoDownloadNewChapters: Boolean
autoDownloadNewChaptersLimit: Int
backupInterval: Int
Expand Down Expand Up @@ -1076,6 +1092,7 @@ type PartialSettingsType implements Settings {
}

input PartialSettingsTypeInput {
autoDownloadIgnoreReUploads: Boolean
autoDownloadNewChapters: Boolean
autoDownloadNewChaptersLimit: Int
backupInterval: Int
Expand Down Expand Up @@ -1265,6 +1282,7 @@ type SetSourceMetaPayload {

interface Settings {
autoDownloadAheadLimit: Int @deprecated(reason: "Replaced with autoDownloadNewChaptersLimit, replace with autoDownloadNewChaptersLimit")
autoDownloadIgnoreReUploads: Boolean
autoDownloadNewChapters: Boolean
autoDownloadNewChaptersLimit: Int
backupInterval: Int
Expand Down Expand Up @@ -1311,6 +1329,7 @@ interface Settings {

type SettingsType implements Settings {
autoDownloadAheadLimit: Int! @deprecated(reason: "Replaced with autoDownloadNewChaptersLimit, replace with autoDownloadNewChaptersLimit")
autoDownloadIgnoreReUploads: Boolean
autoDownloadNewChapters: Boolean!
autoDownloadNewChaptersLimit: Int!
backupInterval: Int!
Expand Down Expand Up @@ -1560,12 +1579,23 @@ type TrackerType {
id: Int!
isLoggedIn: Boolean!
name: String!
supportsTrackDeletion: Boolean
isTokenExpired: Boolean!
scores: [String!]!
statuses: [TrackStatusType!]!
trackRecords: TrackRecordNodeList!
}

input TrackProgressInput {
clientMutationId: String
mangaId: Int!
}

type TrackProgressPayload {
clientMutationId: String
trackRecords: [TrackRecordType!]!
}

input TrackRecordConditionInput {
finishDate: LongString
id: Int
Expand Down Expand Up @@ -1676,6 +1706,21 @@ type TriStateFilter {
name: String!
}

input UnbindTrackInput {
clientMutationId: String

"""
This will only work if the tracker of the track record supports deleting tracks
"""
deleteRemoteTrack: Boolean
recordId: Int!
}

type UnbindTrackPayload {
clientMutationId: String
trackRecord: TrackRecordType
}

input UpdateCategoriesInput {
clientMutationId: String
ids: [Int!]!
Expand Down Expand Up @@ -1904,7 +1949,6 @@ input UpdateTrackInput {
scoreString: String
startDate: LongString
status: Int
unbind: Boolean
}

type UpdateTrackPayload {
Expand Down Expand Up @@ -1969,4 +2013,5 @@ type WebUIUpdateStatus {
info: WebUIUpdateInfo!
progress: Int!
state: UpdateState!
}
}

Loading

0 comments on commit 682b4af

Please sign in to comment.