Podlite 1.8: MiniABS is now Podlite
Renames the app (label, texts, Audiobookshelf client name, User-Agent, APK). The package name, preferences and signing key stay, so it installs over MiniABS and keeps its settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
06a5c7078f
commit
a4be0bab44
23 files changed
+55
-55
No files matched your search
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.miniabs"
|
||||
android:versionCode="8"
|
||||
android:versionName="1.7"
|
||||
android:versionCode="9"
|
||||
android:versionName="1.8"
|
||||
android:installLocation="auto">
|
||||
|
||||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10" />
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
# MiniABS
|
||||
# Podlite
|
||||
|
||||
A tiny Audiobookshelf **podcast** client for the Samsung Galaxy Mini (GT-S5570) and other Android 2.2+ phones. Native Java, no libraries, ~130 KB. The interface is in Galician, with large text and touch targets sized for the Mini's 240×320 screen. Its purple colour scheme and launcher icon come from the Audiobookshelf icon pack (`art/icon_master_512.png`); `tools/make_icons.py` derives the notification and player icons from it.
|
||||
|
||||
## Install
|
||||
|
||||
1. Copy `MiniABS.apk` to the phone (USB to the SD card, or download it in the browser).
|
||||
1. Copy `Podlite.apk` to the phone (USB to the SD card, or download it in the browser).
|
||||
2. On the phone: **Settings → Applications → Unknown sources** → tick it.
|
||||
3. Open the APK from a file manager and install. It can be moved to the SD card (Settings → Applications → Manage applications → MiniABS → Move to SD card).
|
||||
3. Open the APK from a file manager and install. It can be moved to the SD card (Settings → Applications → Manage applications → Podlite → Move to SD card).
|
||||
|
||||
## Connecting
|
||||
|
||||
At home, the simplest option is your server's **local http:// address**, e.g. `http://192.168.1.10:13378`.
|
||||
|
||||
Sign in with your username and password, or tick "Use an API key instead". It works with both current servers (2.26+, short-lived access tokens that MiniABS refreshes automatically) and older ones (single long-lived token).
|
||||
Sign in with your username and password, or tick "Use an API key instead". It works with both current servers (2.26+, short-lived access tokens that Podlite refreshes automatically) and older ones (single long-lived token).
|
||||
|
||||
## HTTPS (from outside your home)
|
||||
|
||||
Android 2.3 only speaks TLS 1.0, which modern servers refuse, so since 1.7 MiniABS brings its own
|
||||
**TLS 1.2** (Bouncy Castle, the same client as Minamp, with Mozilla's root certificates,
|
||||
Android 2.3 only speaks TLS 1.0, which modern servers refuse, so since 1.7 Podlite brings its own
|
||||
**TLS 1.2** (Bouncy Castle, the same client as Plexamp Lite, with Mozilla's root certificates,
|
||||
keep-alive and session resumption). Sign in with your server's normal `https://` address, at
|
||||
home or away; nothing changes on the server. (A legacy TLS 1.0 port set up for older versions
|
||||
keeps working too.)
|
||||
|
||||
### App: certificates
|
||||
|
||||
- **Built-in roots:** MiniABS checks certificates against Mozilla's current root list (`assets/roots`), so Let's Encrypt, Google Trust Services, Sectigo/ZeroSSL and the rest just work.
|
||||
- **Anything else** (self-signed, a private CA, a new root): MiniABS shows the certificate's SHA-256 fingerprint and asks once. Compare it with the fingerprint your computer's browser shows for the site before tapping Trust. It then trusts the CA that issued it, so renewals keep working.
|
||||
- **Built-in roots:** Podlite checks certificates against Mozilla's current root list (`assets/roots`), so Let's Encrypt, Google Trust Services, Sectigo/ZeroSSL and the rest just work.
|
||||
- **Anything else** (self-signed, a private CA, a new root): Podlite shows the certificate's SHA-256 fingerprint and asks once. Compare it with the fingerprint your computer's browser shows for the site before tapping Trust. It then trusts the CA that issued it, so renewals keep working.
|
||||
- **Settings → Certificates you trusted** lets you forget them.
|
||||
|
||||
### App: streaming
|
||||
|
||||
Android 2.x's media player can't stream modern https:// URLs, so for HTTPS servers MiniABS runs a small proxy on the phone (127.0.0.1 only, random unguessable URLs). It forwards seeks and gets a fresh sign-in token for each request, so long episodes don't break when the token expires.
|
||||
Android 2.x's media player can't stream modern https:// URLs, so for HTTPS servers Podlite runs a small proxy on the phone (127.0.0.1 only, random unguessable URLs). It forwards seeks and gets a fresh sign-in token for each request, so long episodes don't break when the token expires.
|
||||
|
||||
## Using it
|
||||
|
||||
@@ -38,15 +38,15 @@ Android 2.x's media player can't stream modern https:// URLs, so for HTTPS serve
|
||||
- **Shows**: every podcast; tap one for its episodes. Menu key → sort oldest/newest, hide played.
|
||||
- **Saved**: episodes downloaded to the SD card, plus download progress.
|
||||
- **Tap** an episode to play. **Long-press** for Download, Delete download, Mark as played/unplayed, Go to show.
|
||||
- **Player**: skip back/forward (set the amounts in Settings), seek bar, show notes. Menu key → sleep timer, mark as played, download, stop, close MiniABS.
|
||||
- **Close**: Menu key → *Pechar MiniABS* (on the Latest/Shows/Saved screen or the player) saves the position, stops playback and closes the app.
|
||||
- **Player**: skip back/forward (set the amounts in Settings), seek bar, show notes. Menu key → sleep timer, mark as played, download, stop, close Podlite.
|
||||
- **Close**: Menu key → *Pechar Podlite* (on the Latest/Shows/Saved screen or the player) saves the position, stops playback and closes the app.
|
||||
- **Headset buttons**: play/pause; next/previous skip forward/back. Playback pauses when headphones are unplugged and during calls.
|
||||
|
||||
Colored dots: blue = new, amber = in progress (with a bar), grey = played.
|
||||
|
||||
## Progress sync
|
||||
|
||||
Playback opens an Audiobookshelf session and syncs every 15 seconds and on pause, so progress follows you to other apps. An episode only counts as played when playback gets within a minute of its end: a stream that drops or a saved file cut short is retried or reported, never marked as played. If playback says it's playing but stops moving for 12 seconds, MiniABS says so. Saved episodes play offline; their positions are kept on the phone and sent to the server next time you're online (or tap refresh on the Saved tab).
|
||||
Playback opens an Audiobookshelf session and syncs every 15 seconds and on pause, so progress follows you to other apps. An episode only counts as played when playback gets within a minute of its end: a stream that drops or a saved file cut short is retried or reported, never marked as played. If playback says it's playing but stops moving for 12 seconds, Podlite says so. Saved episodes play offline; their positions are kept on the phone and sent to the server next time you're online (or tap refresh on the Saved tab).
|
||||
|
||||
## Limits
|
||||
|
||||
@@ -56,7 +56,7 @@ Playback opens an Audiobookshelf session and syncs every 15 seconds and on pause
|
||||
|
||||
## Building
|
||||
|
||||
Needs a JDK, `aapt`, `dalvik-exchange` (dx), `zipalign`, `apksigner` (Ubuntu: `apt install aapt dalvik-exchange zipalign apksigner`), an API 8 `android.jar`, and the renamed Bouncy Castle sources from Minamp's `tools/setup_toolchain.sh` (`BC_SRC`, default `~/android-toolchain/bcsrc`):
|
||||
Needs a JDK, `aapt`, `dalvik-exchange` (dx), `zipalign`, `apksigner` (Ubuntu: `apt install aapt dalvik-exchange zipalign apksigner`), an API 8 `android.jar`, and the renamed Bouncy Castle sources from Plexamp Lite's `tools/setup_toolchain.sh` (`BC_SRC`, default `~/android-toolchain/bcsrc`):
|
||||
|
||||
ANDROID_JAR=/path/to/android-8/android.jar ./build.sh
|
||||
|
||||
@@ -64,6 +64,6 @@ Compiling against the API 8 jar guarantees no newer Android APIs are used. The A
|
||||
|
||||
All sizes (text, rows, buttons, covers) are in `res/values/dimens.xml`; change them there and rebuild.
|
||||
|
||||
`src/com/miniabs/net/` is the bundled HTTP/TLS client shared with Minamp, FreshMini and GingerCal; `assets/roots/` holds Mozilla's roots (regenerate with Minamp's `tools/make_roots.py`).
|
||||
`src/com/miniabs/net/` is the bundled HTTP/TLS client shared with Plexamp Lite, Newslite and Calendar Lite; `assets/roots/` holds Mozilla's roots (regenerate with Plexamp Lite's `tools/make_roots.py`).
|
||||
|
||||
`test/run_tests.sh` runs the API, JSON, progress, HTTPS-trust and streaming-proxy code on the desktop JVM against a mock Audiobookshelf server (`test/mock_abs.py`), over plain HTTP and over TLS with good, expired, wrong-host, forged and self-signed certificates (`test/make_pki.sh`).
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Builds MiniABS.apk for Android 2.2+ (API 8) using the plain SDK tools, no Gradle.
|
||||
# Builds Podlite.apk for Android 2.2+ (API 8) using the plain SDK tools, no Gradle.
|
||||
# ANDROID_JAR android.jar for API 8 (compiling against it guarantees no newer APIs sneak in)
|
||||
# KEYSTORE signing keystore (created on first build if missing)
|
||||
set -e
|
||||
@@ -14,7 +14,7 @@ mkdir -p "$OUT/gen" "$OUT/classes"
|
||||
|
||||
echo "== resources"
|
||||
aapt package -f -m -J "$OUT/gen" -M AndroidManifest.xml -S res -A assets -I "$ANDROID_JAR" \
|
||||
-F "$OUT/MiniABS.unsigned.apk"
|
||||
-F "$OUT/Podlite.unsigned.apk"
|
||||
|
||||
echo "== compile (Java 8 bytecode, API 8 class library)"
|
||||
javac -nowarn -Xlint:-options -encoding UTF-8 -source 8 -target 8 \
|
||||
@@ -23,16 +23,16 @@ javac -nowarn -Xlint:-options -encoding UTF-8 -source 8 -target 8 \
|
||||
|
||||
echo "== dex"
|
||||
dalvik-exchange --dex --min-sdk-version=8 --output="$OUT/classes.dex" "$OUT/classes"
|
||||
(cd "$OUT" && aapt add MiniABS.unsigned.apk classes.dex > /dev/null)
|
||||
(cd "$OUT" && aapt add Podlite.unsigned.apk classes.dex > /dev/null)
|
||||
|
||||
echo "== align + sign (v1 JAR signature with SHA-1, which Android 2.x requires)"
|
||||
if [ ! -f "$KEYSTORE" ]; then
|
||||
keytool -genkeypair -keystore "$KEYSTORE" -storepass miniabs -keypass miniabs -alias miniabs \
|
||||
-keyalg RSA -keysize 2048 -validity 10000 -dname "CN=MiniABS" > /dev/null 2>&1
|
||||
-keyalg RSA -keysize 2048 -validity 10000 -dname "CN=Podlite" > /dev/null 2>&1
|
||||
fi
|
||||
zipalign -f 4 "$OUT/MiniABS.unsigned.apk" "$OUT/MiniABS.aligned.apk"
|
||||
zipalign -f 4 "$OUT/Podlite.unsigned.apk" "$OUT/Podlite.aligned.apk"
|
||||
apksigner sign --ks "$KEYSTORE" --ks-pass pass:miniabs --key-pass pass:miniabs --ks-key-alias miniabs \
|
||||
--min-sdk-version 8 --v1-signing-enabled true --v2-signing-enabled false --v3-signing-enabled false \
|
||||
--out "$OUT/MiniABS.apk" "$OUT/MiniABS.aligned.apk"
|
||||
apksigner verify --min-sdk-version 8 "$OUT/MiniABS.apk"
|
||||
ls -l "$OUT/MiniABS.apk"
|
||||
--out "$OUT/Podlite.apk" "$OUT/Podlite.aligned.apk"
|
||||
apksigner verify --min-sdk-version 8 "$OUT/Podlite.apk"
|
||||
ls -l "$OUT/Podlite.apk"
|
||||
@@ -9,7 +9,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="MiniABS"
|
||||
android:text="Podlite"
|
||||
android:textSize="@dimen/header_text"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/accent_light" />
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="MiniABS"
|
||||
android:text="Podlite"
|
||||
android:textSize="@dimen/login_title"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/accent_light" />
|
||||
@@ -99,6 +99,6 @@
|
||||
android:textSize="@dimen/login_tip"
|
||||
android:textColor="@color/dim"
|
||||
android:lineSpacingExtra="2dp"
|
||||
android:text="Usa o enderezo https:// normal do servidor, na casa ou fóra: MiniABS trae o seu propio TLS moderno. Na casa tamén vale o enderezo local http://. Se o certificado non se recoñece, amosaráseche a súa pegada dixital para que a comprobes." />
|
||||
android:text="Usa o enderezo https:// normal do servidor, na casa ou fóra: Podlite trae o seu propio TLS moderno. Na casa tamén vale o enderezo local http://. Se o certificado non se recoñece, amosaráseche a súa pegada dixital para que a comprobes." />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Every size in MiniABS lives here. Tuned for the Galaxy Mini (240x320, 120 dpi), where
|
||||
Every size in Podlite lives here. Tuned for the Galaxy Mini (240x320, 120 dpi), where
|
||||
1dp = 0.75 px: 16sp text is 12 px tall, and 48dp touch targets are 36 px (about 7 mm).
|
||||
-->
|
||||
<resources>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">MiniABS</string>
|
||||
<string name="app_name">Podlite</string>
|
||||
|
||||
<!-- Colours taken from the Audiobookshelf icon: gradient #9437FC to #570DCF, waves #BC8AFC -->
|
||||
<color name="bg">#13111A</color>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<PreferenceCategory android:title="Acerca de">
|
||||
<Preference
|
||||
android:key="about"
|
||||
android:title="MiniABS 1.5"
|
||||
android:title="Podlite 1.8"
|
||||
android:summary="Un pequeno cliente de podcasts de Audiobookshelf para Android 2.2+" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
@@ -26,7 +26,7 @@ import android.os.Build;
|
||||
|
||||
/** Audiobookshelf REST client (API as of server 2.x, including the 2.26+ token system). */
|
||||
final class Api {
|
||||
static final String VERSION = "1.7";
|
||||
static final String VERSION = "1.8";
|
||||
|
||||
static class ApiException extends IOException {
|
||||
final int code;
|
||||
@@ -64,7 +64,7 @@ final class Api {
|
||||
conn.setUseCaches(false);
|
||||
conn.setInstanceFollowRedirects(true);
|
||||
setMethod(conn, method);
|
||||
conn.setRequestProperty("User-Agent", "MiniABS/" + VERSION + " (Android " + Build.VERSION.RELEASE + ")");
|
||||
conn.setRequestProperty("User-Agent", "Podlite/" + VERSION + " (Android " + Build.VERSION.RELEASE + ")");
|
||||
return conn;
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ final class Api {
|
||||
private static JSONObject deviceInfo(Context c) throws JSONException {
|
||||
return new JSONObject()
|
||||
.put("deviceId", Prefs.get(c).deviceId())
|
||||
.put("clientName", "MiniABS")
|
||||
.put("clientName", "Podlite")
|
||||
.put("clientVersion", VERSION)
|
||||
.put("manufacturer", Build.MANUFACTURER)
|
||||
.put("model", Build.MODEL)
|
||||
@@ -416,7 +416,7 @@ final class Api {
|
||||
.put("forceDirectPlay", true)
|
||||
.put("forceTranscode", false)
|
||||
.put("supportedMimeTypes", mimes)
|
||||
.put("mediaPlayer", "MiniABS");
|
||||
.put("mediaPlayer", "Podlite");
|
||||
} catch (JSONException ignored) {
|
||||
}
|
||||
return obj(call(c, "POST", "/api/items/" + e.itemId + "/play/" + e.id, body, 200,
|
||||
|
||||
@@ -31,7 +31,7 @@ public class DownloadService extends IntentService {
|
||||
private static volatile String cancelId;
|
||||
|
||||
public DownloadService() {
|
||||
super("MiniABS downloads");
|
||||
super("Podlite downloads");
|
||||
}
|
||||
|
||||
static void enqueue(Context c, Episode e) {
|
||||
@@ -105,9 +105,9 @@ public class DownloadService extends IntentService {
|
||||
percent = 0;
|
||||
cancelId = null;
|
||||
PowerManager.WakeLock wake = ((PowerManager) getSystemService(POWER_SERVICE))
|
||||
.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MiniABS download");
|
||||
.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Podlite download");
|
||||
WifiManager.WifiLock wifi = ((WifiManager) getSystemService(WIFI_SERVICE))
|
||||
.createWifiLock(WifiManager.WIFI_MODE_FULL, "MiniABS download");
|
||||
.createWifiLock(WifiManager.WIFI_MODE_FULL, "Podlite download");
|
||||
wake.acquire();
|
||||
wifi.acquire();
|
||||
try {
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.miniabs;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/** One podcast episode, trimmed down to what MiniABS needs. */
|
||||
/** One podcast episode, trimmed down to what Podlite needs. */
|
||||
final class Episode {
|
||||
String itemId = ""; // library item (the podcast) id
|
||||
String id = ""; // episode id
|
||||
|
||||
@@ -101,7 +101,7 @@ public class HomeActivity extends BaseActivity {
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
if (intent.getBooleanExtra("exit", false)) { closeApp(); return; } // "Pechar MiniABS" from the player
|
||||
if (intent.getBooleanExtra("exit", false)) { closeApp(); return; } // "Pechar Podlite" from the player
|
||||
if (intent.hasExtra("tab")) selectTab(intent.getIntExtra("tab", TAB_LATEST));
|
||||
}
|
||||
|
||||
@@ -496,7 +496,7 @@ public class HomeActivity extends BaseActivity {
|
||||
menu.add(0, 2, 0, "Biblioteca").setIcon(android.R.drawable.ic_menu_agenda);
|
||||
menu.add(0, 3, 0, "En reprodución").setIcon(android.R.drawable.ic_media_play);
|
||||
menu.add(0, 4, 0, "Axustes").setIcon(android.R.drawable.ic_menu_preferences);
|
||||
menu.add(0, 5, 0, "Pechar MiniABS").setIcon(android.R.drawable.ic_menu_close_clear_cancel);
|
||||
menu.add(0, 5, 0, "Pechar Podlite").setIcon(android.R.drawable.ic_menu_close_clear_cancel);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.Map;
|
||||
import com.miniabs.net.Http;
|
||||
|
||||
/**
|
||||
* An HttpURLConnection backed by the bundled TLS 1.2 client (com.miniabs.net, from Minamp), so
|
||||
* An HttpURLConnection backed by the bundled TLS 1.2 client (com.miniabs.net, from Plexamp Lite), so
|
||||
* the existing API, cover, download and stream code keeps its shape while the phone talks to the
|
||||
* normal https:// address: Android 2.x's own TLS 1.0 can't. Any method works (PATCH too), and
|
||||
* connections are kept alive between requests.
|
||||
|
||||
@@ -245,7 +245,7 @@ public class PlayerActivity extends BaseActivity {
|
||||
}
|
||||
menu.add(0, 4, 0, "Ir ao programa").setIcon(android.R.drawable.ic_menu_view);
|
||||
if (active) menu.add(0, 5, 0, "Deter").setIcon(android.R.drawable.ic_menu_close_clear_cancel);
|
||||
menu.add(0, 6, 0, "Pechar MiniABS").setIcon(android.R.drawable.ic_lock_power_off);
|
||||
menu.add(0, 6, 0, "Pechar Podlite").setIcon(android.R.drawable.ic_lock_power_off);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ public class PlayerService extends Service implements MediaPlayer.OnPreparedList
|
||||
super.onCreate();
|
||||
instance = this;
|
||||
am = (AudioManager) getSystemService(AUDIO_SERVICE);
|
||||
wifi = ((WifiManager) getSystemService(WIFI_SERVICE)).createWifiLock(WifiManager.WIFI_MODE_FULL, "MiniABS");
|
||||
wifi = ((WifiManager) getSystemService(WIFI_SERVICE)).createWifiLock(WifiManager.WIFI_MODE_FULL, "Podlite");
|
||||
wifi.setReferenceCounted(false);
|
||||
buttons = new ComponentName(this, MediaButtonReceiver.class);
|
||||
registerReceiver(noisy, new IntentFilter(AudioManager.ACTION_AUDIO_BECOMING_NOISY));
|
||||
|
||||
@@ -16,7 +16,7 @@ import android.content.Context;
|
||||
|
||||
/**
|
||||
* Lets Android's media player stream from an HTTPS server. The player can't do HTTPS before
|
||||
* Android 3.1 and wouldn't use MiniABS's certificate trust anyway, so it plays
|
||||
* Android 3.1 and wouldn't use Podlite's certificate trust anyway, so it plays
|
||||
* http://127.0.0.1:PORT/<random id> and this proxy fetches the real stream (forwarding seeks as
|
||||
* Range requests) with a fresh sign-in token each time.
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ final class StreamProxy implements Runnable {
|
||||
private StreamProxy(Context c) throws IOException {
|
||||
this.c = c.getApplicationContext();
|
||||
server = new ServerSocket(0, 8, InetAddress.getByName("127.0.0.1"));
|
||||
Thread t = com.miniabs.net.Threads.create(this, "MiniABS proxy");
|
||||
Thread t = com.miniabs.net.Threads.create(this, "Podlite proxy");
|
||||
t.setDaemon(true);
|
||||
t.start();
|
||||
}
|
||||
@@ -90,7 +90,7 @@ final class StreamProxy implements Runnable {
|
||||
public void run() {
|
||||
serve(s);
|
||||
}
|
||||
}, "MiniABS proxy conn");
|
||||
}, "Podlite proxy conn");
|
||||
t.setDaemon(true);
|
||||
t.start();
|
||||
} catch (IOException e) {
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.miniabs.net.AssetRoots;
|
||||
import com.miniabs.net.CertVerifier;
|
||||
|
||||
/**
|
||||
* Decides which HTTPS certificates MiniABS accepts, for the bundled TLS 1.2 client:
|
||||
* Decides which HTTPS certificates Podlite accepts, for the bundled TLS 1.2 client:
|
||||
* 1. certificates chaining to Mozilla's roots (assets/roots; Android 2.3's own list predates Let's Encrypt);
|
||||
* 2. certificates the user chose to trust after checking the fingerprint ("pins").
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,7 @@ import com.minamp.bc.crypto.util.PublicKeyFactory;
|
||||
* Minimal Web PKI path validation for the bundled TLS stack:
|
||||
* hostname match, validity window, signature chain up to a bundled Mozilla root.
|
||||
* Optionally one pinned leaf certificate (SHA-256) is trusted as-is, for self-signed servers.
|
||||
* Shared with Minamp (tools/tlskit in the iOS ports' history); keep the copies in sync.
|
||||
* Shared with Plexamp Lite (tools/tlskit in the iOS ports' history); keep the copies in sync.
|
||||
*/
|
||||
public final class CertVerifier {
|
||||
|
||||
|
||||
@@ -33,11 +33,11 @@ import com.minamp.bc.tls.crypto.impl.bc.BcTlsCrypto;
|
||||
/**
|
||||
* Small HTTP/1.1 client with its own TLS 1.2 (Bouncy Castle), keep-alive pooling and
|
||||
* session resumption. Android 2.x's built-in SSL only speaks TLS 1.0 and lacks today's roots,
|
||||
* so every request in the app goes through here. From Minamp; keep the copies in sync.
|
||||
* so every request in the app goes through here. From Plexamp Lite; keep the copies in sync.
|
||||
*/
|
||||
public final class Http {
|
||||
|
||||
public static String USER_AGENT = "Minamp/1.0";
|
||||
public static String USER_AGENT = "PlexampLite/1.0";
|
||||
|
||||
/** Optional HTTP CONNECT proxy, only used when running the networking code on a desktop JVM. */
|
||||
public static String proxyHost;
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.json.JSONObject;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
/** Runs MiniABS's real API, JSON and progress code against mock_abs.py on the desktop JVM. */
|
||||
/** Runs Podlite's real API, JSON and progress code against mock_abs.py on the desktop JVM. */
|
||||
public class ApiTest {
|
||||
static int pass, fail;
|
||||
|
||||
@@ -131,7 +131,7 @@ public class ApiTest {
|
||||
if (path.startsWith("/api/items/pod1/play/")) play = r;
|
||||
}
|
||||
check(play != null && play.getJSONObject("b").getBoolean("forceDirectPlay")
|
||||
&& play.getJSONObject("b").getJSONObject("deviceInfo").getString("clientName").equals("MiniABS"),
|
||||
&& play.getJSONObject("b").getJSONObject("deviceInfo").getString("clientName").equals("Podlite"),
|
||||
"play request asks for direct play and names the client");
|
||||
check(sync != null && sync.getJSONObject("b").getDouble("currentTime") == 615.5
|
||||
&& sync.getJSONObject("b").getDouble("timeListened") == 15.2, "progress sync sent");
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Runs MiniABS's API/JSON/progress/HTTPS code on the desktop JVM against mock_abs.py.
|
||||
# Runs Podlite's API/JSON/progress/HTTPS code on the desktop JVM against mock_abs.py.
|
||||
set -e
|
||||
cd "$(dirname "$0")/.."
|
||||
OUT=build/test
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
"""Draws MiniABS's PNG icons for ldpi (Galaxy Mini), mdpi and hdpi.
|
||||
"""Draws Podlite's PNG icons for ldpi (Galaxy Mini), mdpi and hdpi.
|
||||
|
||||
The launcher icon (res/drawable-*/ic_launcher.png) comes from the supplied
|
||||
Audiobookshelf icon pack and is not generated here. The notification icon is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""One-off: translates MiniABS's interface strings to Galician in place.
|
||||
"""One-off: translates Podlite's interface strings to Galician in place.
|
||||
Each (file, old, new) must match at least once, so nothing is silently missed."""
|
||||
import os
|
||||
import re
|
||||
|
||||
Reference in new issue
Block a user