forked from Animeboynz/Mihon-Backup-Viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.proto
145 lines (127 loc) · 3.39 KB
/
schema.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
enum UpdateStrategy {
ALWAYS_UPDATE = 0;
ONLY_FETCH_ONCE = 1;
}
message PreferenceValue {
required string type = 1;
required bytes value = 2;
}
// Backup.kt
message Backup {
repeated BackupManga backupManga = 1;
repeated BackupCategory backupCategories = 2;
repeated BrokenBackupSource backupBrokenSources = 100;
repeated BackupSource backupSources = 101;
repeated BackupPreference backupPreferences = 104;
repeated BackupSourcePreferences backupSourcePreferences = 105;
}
// BackupCategory.kt
message BackupCategory {
required string name = 1;
optional int64 order = 2;
optional int64 flags = 100;
}
// BackupChapter.kt
message BackupChapter {
required string url = 1;
required string name = 2;
optional string scanlator = 3;
optional bool read = 4;
optional bool bookmark = 5;
optional int64 lastPageRead = 6;
optional int64 dateFetch = 7;
optional int64 dateUpload = 8;
optional float chapterNumber = 9;
optional int64 sourceOrder = 10;
optional int64 lastModifiedAt = 11;
optional int64 version = 12;
}
// BackupHistory.kt
message BackupHistory {
required string url = 1;
required int64 lastRead = 2;
optional int64 readDuration = 3;
}
message BrokenBackupHistory {
required string url = 1;
required int64 lastRead = 2;
optional int64 readDuration = 3;
}
// BackupManga.kt
message BackupManga {
required int64 source = 1;
required string url = 2;
optional string title = 3;
optional string artist = 4;
optional string author = 5;
optional string description = 6;
repeated string genre = 7;
optional int32 status = 8;
optional string thumbnailUrl = 9;
optional int64 dateAdded = 13;
optional int32 viewer = 14;
repeated BackupChapter chapters = 16;
repeated int64 categories = 17;
repeated BackupTracking tracking = 18;
optional bool favorite = 100;
optional int32 chapterFlags = 101;
repeated BrokenBackupHistory brokenHistory = 102;
optional int32 viewer_flags = 103;
repeated BackupHistory history = 104;
optional UpdateStrategy updateStrategy = 105;
optional int64 lastModifiedAt = 106;
optional int64 favoriteModifiedAt = 107;
repeated string excludedScanlators = 108;
optional int64 version = 109;
}
// BackupPreference.kt
message BackupPreference {
required string key = 1;
required bytes value = 2;
}
message BackupSourcePreferences {
required string sourceKey = 1;
repeated BackupPreference prefs = 2;
}
message IntPreferenceValue {
required int32 value = 1;
}
message LongPreferenceValue {
required int64 value = 1;
}
message FloatPreferenceValue {
required float value = 1;
}
message StringPreferenceValue {
required string value = 1;
}
message BooleanPreferenceValue {
required bool value = 1;
}
message StringSetPreferenceValue {
repeated string value = 1;
}
// BackupSource.kt
message BackupSource {
optional string name = 1;
required int64 sourceId = 2;
}
message BrokenBackupSource {
optional string name = 1;
required int64 sourceId = 2;
}
// BackupTracking.kt
message BackupTracking {
required int32 syncId = 1;
required int64 libraryId = 2;
optional int32 mediaIdInt = 3;
optional string trackingUrl = 4;
optional string title = 5;
optional float lastChapterRead = 6;
optional int32 totalChapters = 7;
optional float score = 8;
optional int32 status = 9;
optional int64 startedReadingDate = 10;
optional int64 finishedReadingDate = 11;
optional int64 mediaId = 100;
}