mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-03 11:17:25 +00:00
feat(settings): custom URL now overrides the online-update default source
The "Custom URL" dialog's two URL fields now control the default source used by the online update, per the user's intent (one-time setup, no extra steps per update): - Defaults are real URLs now: TLE = Celestrak "All" (active group CSV), transceivers = SatNOGS API. The example.com placeholders are gone. - updateFromRemote(): the "All" TLE entry and the "SatNOGS" entry are replaced by the user's URLs when the corresponding custom toggle is ON and the URL is non-blank; otherwise the real defaults are used. The old "Other" appended-source logic is removed - the toggle now means "use my URL for this source" instead of "download an extra source". Each source (TLE / transceivers) is independent. - Each URL field gained a reset (loop) icon button on the right that restores the default URL text (new ic_reset drawable, Autorenew vector). Strings added in en/zh/tr. Test updated: custom TLE URL data now lands under the "All" type instead of "Other". Verified: core:data tests pass, settings + app compile. Version stays 4.4.8 (覆盖 per user).
This commit is contained in:
1 parent
59d6e2ae05
commit
8d88100b15
8 files changed
+47
-5
No files matched your search
@@ -18,6 +18,10 @@
|
||||
package com.rtbishop.look4sat.core.domain.source
|
||||
|
||||
object Sources {
|
||||
// 在线更新的默认 URL(用户可通过"自定义URL"对话框修改/重置)
|
||||
val defaultTleUrl = "https://celestrak.org/NORAD/elements/gp.php?GROUP=active&FORMAT=csv"
|
||||
val defaultTransceiversUrl = "https://db.satnogs.org/api/transmitters/?format=json&status=active"
|
||||
|
||||
val satelliteDataUrls = mapOf(
|
||||
"All" to "https://celestrak.org/NORAD/elements/gp.php?GROUP=active&FORMAT=csv",
|
||||
"Amateur" to "https://celestrak.org/NORAD/elements/gp.php?GROUP=amateur&FORMAT=csv",
|
||||
|
||||
Reference in new issue
Block a user