@@ -76,7 +76,8 @@ class NextcloudApiAdapter(
7676 if (currentBatch.size < batchSize) {
7777 break
7878 } else {
79- oldestEntryId = currentBatch.minOfOrNull { it.id ? : Long .MAX_VALUE }?.toLong() ? : 0L
79+ oldestEntryId =
80+ currentBatch.minOfOrNull { it.id ? : Long .MAX_VALUE }?.toLong() ? : 0L
8081 currentBatch.clear()
8182 }
8283 }
@@ -111,7 +112,12 @@ class NextcloudApiAdapter(
111112 bookmarked : Boolean ,
112113 ): Result <Unit > {
113114 return runCatching {
114- val args = PutStarredArgs (entries.map { PutStarredArgsItem (it.feed_id.toLong(), it.ext_nc_guid_hash) })
115+ val args = PutStarredArgs (entries.map {
116+ PutStarredArgsItem (
117+ it.feedId.toLong(),
118+ it.extNextcloudGuidHash
119+ )
120+ })
115121
116122 if (bookmarked) {
117123 api.putStarred(args)
@@ -160,9 +166,9 @@ class NextcloudApiAdapter(
160166 id = feedId,
161167 links = links,
162168 title = title ? : " Untitled" ,
163- ext_open_entries_in_browser = false ,
164- ext_blocked_words = " " ,
165- ext_show_preview_images = null ,
169+ extOpenEntriesInBrowser = false ,
170+ extBlockedWords = " " ,
171+ extShowPreviewImages = null ,
166172 )
167173 }
168174
@@ -209,27 +215,27 @@ class NextcloudApiAdapter(
209215 }
210216
211217 return Entry (
212- content_type = " html" ,
213- content_src = " " ,
214- content_text = body ? : " " ,
218+ contentType = " html" ,
219+ contentSrc = " " ,
220+ contentText = body ? : " " ,
215221 links = links,
216222 summary = " " ,
217223 id = id.toString(),
218- feed_id = feedId?.toString() ? : " " ,
224+ feedId = feedId?.toString() ? : " " ,
219225 title = title ? : " Untitled" ,
220226 published = OffsetDateTime .parse(published),
221227 updated = OffsetDateTime .parse(updated),
222- author_name = author ? : " " ,
223- ext_read = ! unread,
224- ext_read_synced = true ,
225- ext_bookmarked = starred,
226- ext_bookmarked_synced = true ,
227- ext_nc_guid_hash = guidHash ? : return null ,
228- ext_comments_url = " " ,
229- ext_og_image_checked = false ,
230- ext_og_image_url = " " ,
231- ext_og_image_width = 0 ,
232- ext_og_image_height = 0 ,
228+ authorName = author ? : " " ,
229+ extRead = ! unread,
230+ extReadSynced = true ,
231+ extBookmarked = starred,
232+ extBookmarkedSynced = true ,
233+ extNextcloudGuidHash = guidHash ? : return null ,
234+ extCommentsUrl = " " ,
235+ extOpenGraphImageChecked = false ,
236+ extOpenGraphImageUrl = " " ,
237+ extOpenGraphImageWidth = 0 ,
238+ extOpenGraphImageHeight = 0 ,
233239 )
234240 }
235241}
0 commit comments