Rename app to Castarr (dev.castarr.tv), add JDK toolchain resolution
Package/applicationId com.nodecast.tv -> dev.castarr.tv, all branding in app and remote page renamed, remote localStorage key changed. Foojay toolchain resolver + jvmToolchain(17) so hosts with only a JRE can build. Closes #1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,11 +4,11 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.nodecast.tv"
|
||||
namespace = "dev.castarr.tv"
|
||||
compileSdk = 35
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.nodecast.tv"
|
||||
applicationId = "dev.castarr.tv"
|
||||
minSdk = 23
|
||||
targetSdk = 35
|
||||
versionCode = 1
|
||||
@@ -32,6 +32,7 @@ android {
|
||||
allWarningsAsErrors = true
|
||||
}
|
||||
|
||||
|
||||
lint {
|
||||
// Media3's UI classes are @UnstableApi; the opt-in lint check would
|
||||
// otherwise fail release builds.
|
||||
@@ -49,3 +50,9 @@ dependencies {
|
||||
implementation("org.nanohttpd:nanohttpd-websocket:2.3.1")
|
||||
implementation("com.google.zxing:core:3.5.3")
|
||||
}
|
||||
|
||||
// Full JDK for javac via toolchain (host may only have a JRE); resolved by
|
||||
// the foojay convention plugin in settings.
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:theme="@style/Theme.NodeCast">
|
||||
android:theme="@style/Theme.Castarr">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<meta name="theme-color" content="#0a0b0d">
|
||||
<title>NodeCast Remote</title>
|
||||
<title>Castarr Remote</title>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600&display=swap">
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
|
||||
@@ -149,7 +149,7 @@
|
||||
<header>
|
||||
<div class="wordmark">
|
||||
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="#5fd4c4" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="5" width="20" height="13" rx="2"/><path d="M8.5 22h7"/></svg>
|
||||
NodeCast
|
||||
Castarr
|
||||
</div>
|
||||
<div class="tvchip"><span class="dot off" id="conn-dot"></span><span id="tv-name">Getrennt</span></div>
|
||||
</header>
|
||||
@@ -248,10 +248,10 @@
|
||||
// --- pairing credentials ---
|
||||
const params = new URLSearchParams(location.search);
|
||||
if (params.get('t')) {
|
||||
localStorage.setItem('nodecast_token', params.get('t'));
|
||||
localStorage.setItem('castarr_token', params.get('t'));
|
||||
history.replaceState(null, '', location.pathname);
|
||||
}
|
||||
const getToken = () => localStorage.getItem('nodecast_token') || '';
|
||||
const getToken = () => localStorage.getItem('castarr_token') || '';
|
||||
let manualCode = '';
|
||||
|
||||
const deviceName = (() => {
|
||||
@@ -312,7 +312,7 @@
|
||||
case 'welcome':
|
||||
state.authorized = true;
|
||||
state.retryDelay = 1000;
|
||||
if (msg.token) localStorage.setItem('nodecast_token', msg.token);
|
||||
if (msg.token) localStorage.setItem('castarr_token', msg.token);
|
||||
$('tv-name').textContent = msg.device || 'TV';
|
||||
if (msg.status) { state.status = msg.status; }
|
||||
if (msg.channels) { state.channels = msg.channels; }
|
||||
@@ -336,7 +336,7 @@
|
||||
break;
|
||||
case 'error':
|
||||
if (msg.error === 'bad_code' || msg.error === 'rate_limited') {
|
||||
localStorage.removeItem('nodecast_token');
|
||||
localStorage.removeItem('castarr_token');
|
||||
manualCode = '';
|
||||
$('pair-error').textContent = msg.error === 'rate_limited'
|
||||
? 'Zu viele Versuche — kurz warten.' : 'Falscher Code.';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.nodecast.tv
|
||||
package dev.castarr.tv
|
||||
|
||||
import android.app.Activity
|
||||
import android.graphics.Color
|
||||
@@ -11,12 +11,12 @@ import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.media3.ui.PlayerView
|
||||
import com.nodecast.tv.pairing.Pairing
|
||||
import com.nodecast.tv.pairing.Qr
|
||||
import com.nodecast.tv.player.PlayerController
|
||||
import com.nodecast.tv.playlist.Channel
|
||||
import com.nodecast.tv.playlist.PlaylistRepository
|
||||
import com.nodecast.tv.server.ControlServer
|
||||
import dev.castarr.tv.pairing.Pairing
|
||||
import dev.castarr.tv.pairing.Qr
|
||||
import dev.castarr.tv.player.PlayerController
|
||||
import dev.castarr.tv.playlist.Channel
|
||||
import dev.castarr.tv.playlist.PlaylistRepository
|
||||
import dev.castarr.tv.server.ControlServer
|
||||
import org.json.JSONObject
|
||||
|
||||
class MainActivity : Activity(), ControlServer.Listener {
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.nodecast.tv.pairing
|
||||
package dev.castarr.tv.pairing
|
||||
|
||||
import android.content.Context
|
||||
import java.net.Inet4Address
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.nodecast.tv.pairing
|
||||
package dev.castarr.tv.pairing
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Color
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.nodecast.tv.player
|
||||
package dev.castarr.tv.player
|
||||
|
||||
import android.content.Context
|
||||
import androidx.media3.common.MediaItem
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.nodecast.tv.playlist
|
||||
package dev.castarr.tv.playlist
|
||||
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.nodecast.tv.playlist
|
||||
package dev.castarr.tv.playlist
|
||||
|
||||
object M3uParser {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.nodecast.tv.playlist
|
||||
package dev.castarr.tv.playlist
|
||||
|
||||
import android.content.Context
|
||||
import org.json.JSONArray
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.nodecast.tv.server
|
||||
package dev.castarr.tv.server
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.util.Log
|
||||
import com.nodecast.tv.pairing.Pairing
|
||||
import com.nodecast.tv.playlist.Channel
|
||||
import dev.castarr.tv.pairing.Pairing
|
||||
import dev.castarr.tv.playlist.Channel
|
||||
import fi.iki.elonen.NanoHTTPD
|
||||
import fi.iki.elonen.NanoWSD
|
||||
import org.json.JSONObject
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">NodeCast</string>
|
||||
<string name="app_name">Castarr</string>
|
||||
<string name="pair_title">Pair with your phone</string>
|
||||
<string name="pair_subtitle">Point your camera at the code — the remote opens right in your browser.</string>
|
||||
<string name="ready_to_pair">Ready to pair</string>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.NodeCast" parent="android:Theme.Material.NoActionBar">
|
||||
<style name="Theme.Castarr" parent="android:Theme.Material.NoActionBar">
|
||||
<item name="android:windowBackground">@color/bg</item>
|
||||
<item name="android:colorBackground">@color/bg</item>
|
||||
<item name="android:textColorPrimary">@color/fg</item>
|
||||
|
||||
Reference in New Issue
Block a user