From 23559d8b0a706567417d558e3613d3d85fa45632 Mon Sep 17 00:00:00 2001
From: acx10 <8075870+acx10@users.noreply.github.com>
Date: Tue, 14 Apr 2026 08:24:35 -0600
Subject: [PATCH 1/5] Remove all traces of telemetry (#3366)
Co-authored-by: acx10
- ๐ Website ยท - ๐ Docs ยท - ๐ฎ Demo ยท - ๐ Quick Start ยท - ๐ฌ Discord -
- -
-
-
|
-
-
- |
-
-
-
- |
-
|
- * Example: Telemetry normally runs at 2:00 AM daily. If the server restarts at 1:55 AM,
- * the scheduled task would reset and not run until 2:00 AM the next day (48 hours later).
- * This method checks if 24+ hours have passed since the last run and executes immediately
- * on startup if needed, ensuring data is sent at 1:55 AM instead of waiting another 24 hours.
- */
- private boolean shouldRunTask(String lastRunStr) {
- if (lastRunStr == null || lastRunStr.isEmpty()) {
- return false;
- }
- try {
- Instant lastRun = Instant.parse(lastRunStr);
- Instant threshold = Instant.now().minus(INTERVAL_HOURS, ChronoUnit.HOURS);
- return lastRun.isBefore(threshold);
- } catch (Exception e) {
- log.warn("Failed to parse last run timestamp: {}", e.getMessage());
- return false;
- }
- }
-
- /**
- * Checks if the app version has changed since the last ping.
- * Returns true if this is an established installation with a version change.
- */
- private boolean hasAppVersionChanged() {
- String lastPingVersion = appSettingService.getSettingValue(LAST_PING_APP_VERSION_KEY);
- InstallationPing ping = telemetryService.getInstallationPing();
- String currentVersion = ping != null ? ping.getAppVersion() : null;
- if (lastPingVersion == null || lastPingVersion.isEmpty() || currentVersion == null) {
- return false;
- }
- return !lastPingVersion.equals(currentVersion);
- }
-}
diff --git a/booklore-api/src/main/java/org/booklore/model/dto/BookloreTelemetry.java b/booklore-api/src/main/java/org/booklore/model/dto/BookloreTelemetry.java
deleted file mode 100644
index d14c15e96..000000000
--- a/booklore-api/src/main/java/org/booklore/model/dto/BookloreTelemetry.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package org.booklore.model.dto;
-
-import lombok.*;
-
-import java.util.List;
-import java.util.Map;
-
-@Builder
-@Setter
-@Getter
-@NoArgsConstructor
-@AllArgsConstructor
-public class BookloreTelemetry {
- private int telemetryVersion;
- private String installationId;
- private String installationDate;
- private String appVersion;
-
- private int totalLibraries;
- private long totalBooks;
- private long totalAdditionalBookFiles;
- private long totalAuthors;
- private long totalBookNotes;
- private long totalBookmarks;
- private int totalShelves;
- private int totalMagicShelves;
- private int totalCategories;
- private int totalTags;
- private int totalMoods;
- private int totalKoreaderUsers;
-
- private UserStatistics userStatistics;
- private MetadataStatistics metadataStatistics;
- private OpdsStatistics opdsStatistics;
- private KoboStatistics koboStatistics;
- private EmailStatistics emailStatistics;
- private BookStatistics bookStatistics;
- private List
- - {{ t('telemetry.telemetryDesc') }} -
-