Compare commits
14 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
064377d7dd | ||
|
|
0819a1beca | ||
|
|
3009f94fe9 | ||
|
|
9b2339b85d | ||
|
|
22229153b9 | ||
|
|
f8be75bd81 | ||
|
|
69308bf696 | ||
|
|
fbe89e14fd | ||
|
|
b647bc8272 | ||
|
|
46818cced5 | ||
|
|
fb3b4dff37 | ||
|
|
1bd470731c | ||
|
|
0230054f92 | ||
|
|
e788043395 |
398 changed files with 57231 additions and 8072 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -55,6 +55,8 @@ android-tv/.kotlin/
|
||||||
# Build and Release
|
# Build and Release
|
||||||
release/
|
release/
|
||||||
*.apk
|
*.apk
|
||||||
|
!frontend-react/public/streamflow-tv.apk
|
||||||
|
*.zip
|
||||||
|
|
||||||
# Environment and IDE
|
# Environment and IDE
|
||||||
.agent/
|
.agent/
|
||||||
|
|
|
||||||
94
Dockerfile
94
Dockerfile
|
|
@ -1,49 +1,45 @@
|
||||||
# Stage 1: Build Image (Frontend)
|
# Stage 1: Build Frontend
|
||||||
FROM node:20-alpine AS frontend-builder
|
FROM --platform=linux/amd64 node:20-alpine AS frontend-builder
|
||||||
WORKDIR /app/frontend
|
WORKDIR /app/frontend
|
||||||
COPY frontend-react/package*.json ./
|
COPY frontend-react/package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY frontend-react/ .
|
COPY frontend-react/ .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 2: Build Image (Backend)
|
# Stage 2: Build Backend for linux/amd64
|
||||||
FROM golang:1.24-alpine AS backend-builder
|
FROM --platform=linux/amd64 golang:1.24-alpine AS backend-builder
|
||||||
WORKDIR /app/backend
|
WORKDIR /app/backend
|
||||||
# Install build dependencies
|
|
||||||
RUN apk add --no-cache gcc musl-dev
|
COPY backend/go.mod backend/go.sum ./
|
||||||
|
RUN go mod download
|
||||||
COPY backend/go.mod backend/go.sum ./
|
|
||||||
RUN go mod download
|
COPY backend/ .
|
||||||
|
# Build static binary for Linux amd64
|
||||||
COPY backend/ .
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o server cmd/server/main.go
|
||||||
# Build static binary for Linux amd64
|
|
||||||
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o server cmd/server/main.go
|
# Stage 3: Final Image (linux/amd64 only for Synology NAS)
|
||||||
|
FROM --platform=linux/amd64 alpine:latest
|
||||||
# Stage 3: Final Image
|
WORKDIR /app
|
||||||
FROM alpine:latest
|
|
||||||
WORKDIR /app
|
# Install runtime dependencies
|
||||||
|
RUN apk add --no-cache sqlite ca-certificates tzdata
|
||||||
# Install runtime dependencies (sqlite + yt-dlp for video extraction fallback)
|
|
||||||
RUN apk add --no-cache sqlite ca-certificates tzdata python3 py3-pip && \
|
# Copy backend binary
|
||||||
pip3 install --break-system-packages yt-dlp
|
COPY --from=backend-builder /app/backend/server .
|
||||||
|
|
||||||
# Copy backend binary
|
# Copy frontend build to the expected static directory
|
||||||
COPY --from=backend-builder /app/backend/server .
|
COPY --from=frontend-builder /app/frontend/dist ./dist
|
||||||
|
|
||||||
# Copy frontend build to the expected static directory
|
# Create data directory for SQLite database
|
||||||
# The backend expects ../frontend-react/dist relative to itself, or we configure it.
|
RUN mkdir -p /app/data
|
||||||
# Let's align with the standard deployment structure: /app/server and /app/dist
|
|
||||||
COPY --from=frontend-builder /app/frontend/dist ./dist
|
# Environment variables
|
||||||
|
ENV PORT=8000
|
||||||
# Create data directory
|
ENV DATABASE_URL=/app/data/streamflow.db
|
||||||
RUN mkdir -p data
|
ENV TZ=Asia/Ho_Chi_Minh
|
||||||
|
|
||||||
# Environment variables
|
# Expose port
|
||||||
ENV PORT=8000
|
EXPOSE 8000
|
||||||
ENV DATABASE_URL=/app/data/streamflow.db
|
|
||||||
|
# Start server
|
||||||
# Expose port
|
CMD ["./server"]
|
||||||
EXPOSE 8000
|
|
||||||
|
|
||||||
# Start server
|
|
||||||
CMD ["./server"]
|
|
||||||
|
|
|
||||||
258
README.md
258
README.md
|
|
@ -1,86 +1,206 @@
|
||||||
# StreamFlow V3.7
|
# kv-netflix V6
|
||||||
|
|
||||||
StreamFlow is a high-performance video streaming web application featuring a pure Go backend and a modern React + Tailwind frontend.
|
A high-performance video streaming web application with a pure Go backend and modern React + Tailwind frontend.
|
||||||
|
|
||||||
## 🚀 Features
|
## Features
|
||||||
|
|
||||||
- **Modern UI**: Built with React, TypeScript, and Tailwind CSS for a premium, responsive experience.
|
- **Modern UI** - React 19, TypeScript, Vite 7, Tailwind CSS 4
|
||||||
- **High Performance**: Backend written in Go (Golang) for speed and concurrency.
|
- **High Performance** - Go backend with concurrent API fetching
|
||||||
- **Smart Scraping**: Integrated scraping engine (Rophim) with automated episode extraction.
|
- **Smart Scraping** - Multi-provider support (Ophim, PhimMoiChill)
|
||||||
- **HLS Streaming**: Native HLS playback support.
|
- **HLS Streaming** - Native HLS playback with proxy support
|
||||||
- **Android TV Support**: Optimized TV client with D-pad controls and 10s skip.
|
- **Android TV** - Native TV app with D-pad controls and 10s skip
|
||||||
- **Performance Optimized**: Parallel API fetching and global image caching for instant loading.
|
- **PWA Support** - Install as a progressive web app
|
||||||
- **Android TV App**: Native TV app support with dedicated APK available for download.
|
- **Episode Progress Tracking** - Auto-save progress, continue watching with seek
|
||||||
- **Docker Ready**: Multi-stage Docker build optimized for NAS Synology (linux/amd64).
|
- **Docker Ready** - Multi-stage build for Synology NAS (linux/amd64)
|
||||||
- **PWA Support**: Install as a progressive web app on mobile devices.
|
|
||||||
|
|
||||||
## 🛠️ Tech Stack
|
## Tech Stack
|
||||||
|
|
||||||
- **Backend**: Go 1.23 (Chi Router, GORM, GoQuery)
|
| Component | Technology |
|
||||||
- **Frontend**: React 19, TypeScript, Vite 7, Tailwind CSS 4
|
|-----------|------------|
|
||||||
- **Database**: SQLite
|
| Backend | Go 1.24, Chi Router, GORM, SQLite |
|
||||||
- **Deployment**: Docker
|
| Frontend | React 19, TypeScript, Vite 7, Tailwind CSS 4 |
|
||||||
|
| Mobile | Android TV (Kotlin + Jetpack Compose) |
|
||||||
|
| Deployment | Docker multi-stage build |
|
||||||
|
|
||||||
## 📦 Installation
|
## Quick Start
|
||||||
|
|
||||||
### Prerequisites
|
### Docker (Recommended for Synology NAS)
|
||||||
|
|
||||||
- Go 1.23+
|
**Prerequisites:**
|
||||||
- Node.js 20+
|
- Synology NAS with Container Manager (Docker) installed
|
||||||
- Docker (optional)
|
- SSH access enabled (optional, for CLI) or use Container Manager GUI
|
||||||
|
|
||||||
|
**Option 1: Container Manager GUI (Recommended for Synology)**
|
||||||
|
|
||||||
|
1. Open **Container Manager** on your Synology NAS
|
||||||
|
2. Go to **Registry** tab and add your Forgejo registry:
|
||||||
|
- Registry URL: `git.khoavo.myds.me`
|
||||||
|
- Username: `vndangkhoa`
|
||||||
|
- Password: `Thieugia19`
|
||||||
|
3. Search for `vndangkhoa/kv-netflix` and download `v6` tag
|
||||||
|
4. Create a new container:
|
||||||
|
- **Image**: `git.khoavo.myds.me/vndangkhoa/kv-netflix:v6`
|
||||||
|
- **Container name**: `streamflow`
|
||||||
|
- **Network**: Bridge mode, map port `3478` (local) → `8000` (container)
|
||||||
|
- **Environment**: Add `TZ=Asia/Ho_Chi_Minh`
|
||||||
|
- **Volume**: Create folder `docker/streamflow/data` on NAS, map to `/app/data`
|
||||||
|
- **Restart policy**: `Unless stopped`
|
||||||
|
5. Start the container
|
||||||
|
|
||||||
|
**Option 2: Docker Compose (SSH/CLI)**
|
||||||
|
|
||||||
|
Create `docker-compose.yml` on your NAS:
|
||||||
|
```yaml
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
streamflow:
|
||||||
|
image: git.khoavo.myds.me/vndangkhoa/kv-netflix:v6
|
||||||
|
container_name: streamflow
|
||||||
|
platform: linux/amd64
|
||||||
|
ports:
|
||||||
|
- "3478:8000"
|
||||||
|
environment:
|
||||||
|
- DATABASE_URL=/app/data/streamflow.db
|
||||||
|
- PORT=8000
|
||||||
|
- TZ=Asia/Ho_Chi_Minh
|
||||||
|
volumes:
|
||||||
|
- ./data:/app/data
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8000/api/health"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 10s
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Login to registry first
|
||||||
|
docker login git.khoavo.myds.me -u vndangkhoa -p Thieugia19
|
||||||
|
|
||||||
|
# Start container
|
||||||
|
docker-compose up -d
|
||||||
|
|
||||||
|
# Check logs
|
||||||
|
docker-compose logs -f
|
||||||
|
```
|
||||||
|
|
||||||
|
Access at: `http://YOUR_NAS_IP:3478`
|
||||||
|
|
||||||
### Local Development
|
### Local Development
|
||||||
|
|
||||||
1. **Backend**
|
**Prerequisites:** Go 1.24+, Node.js 20+
|
||||||
```bash
|
|
||||||
cd backend
|
|
||||||
go mod tidy
|
|
||||||
go run ./cmd/server/main.go
|
|
||||||
```
|
|
||||||
Server runs at `http://localhost:8000`.
|
|
||||||
|
|
||||||
2. **Frontend**
|
```bash
|
||||||
```bash
|
# Backend (port 8000)
|
||||||
cd frontend-react
|
cd backend
|
||||||
npm install
|
go mod tidy
|
||||||
npm run dev
|
go run ./cmd/server/main.go
|
||||||
```
|
|
||||||
Frontend runs at `http://localhost:5173` (proxying to backend).
|
|
||||||
|
|
||||||
### Docker Deployment (Recommended for NAS Synology)
|
# Frontend (port 5173)
|
||||||
|
cd frontend-react
|
||||||
|
npm install
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
1. **Run with Docker Compose**:
|
## API Endpoints
|
||||||
```yaml
|
|
||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
| Endpoint | Method | Description |
|
||||||
streamflow:
|
|----------|--------|-------------|
|
||||||
image: git.khoavo.myds.me/vndangkhoa/kv-streamflow:v3.7
|
| `/api/health` | GET | Health check |
|
||||||
container_name: streamflow
|
| `/api/videos/home` | GET | Get home page movies |
|
||||||
platform: linux/amd64
|
| `/api/videos/search?q=` | GET | Search movies |
|
||||||
ports:
|
| `/api/videos/{slug}` | GET | Get movie details |
|
||||||
- "3478:8000"
|
| `/api/extract` | POST | Extract video URL |
|
||||||
environment:
|
| `/api/stream?url=` | GET | Proxy video stream |
|
||||||
- DATABASE_URL=/app/data/streamflow.db
|
| `/api/images/proxy?url=` | GET | Proxy images |
|
||||||
- TZ=Asia/Ho_Chi_Minh
|
| `/api/categories/genres` | GET | Get genre list |
|
||||||
volumes:
|
| `/api/categories/countries` | GET | Get country list |
|
||||||
- ./data:/app/data
|
|
||||||
restart: unless-stopped
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
## Project Structure
|
||||||
docker-compose up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
Access the application at `http://YOUR_NAS_IP:3478`. You can download the **Android TV App** directly from the navigation bar once the webapp is running.
|
```
|
||||||
|
Streamflow/
|
||||||
## 📂 Project Structure
|
├── backend/
|
||||||
|
│ ├── cmd/server/main.go # Entry point
|
||||||
- `backend/` - Go source code
|
│ ├── internal/
|
||||||
- `frontend-react/` - React source code
|
│ │ ├── api/ # HTTP handlers & routes
|
||||||
- `Dockerfile` - Multi-stage build definition
|
│ │ ├── config/ # Configuration
|
||||||
- `docker-compose.yml` - Deployment configuration
|
│ │ ├── database/ # Database layer
|
||||||
|
│ │ ├── models/ # Data models
|
||||||
## 📝 License
|
│ │ ├── scraper/ # Movie providers
|
||||||
|
│ │ └── service/ # Business logic
|
||||||
MIT
|
│ ├── go.mod
|
||||||
|
│ └── go.sum
|
||||||
|
├── frontend-react/
|
||||||
|
│ ├── src/
|
||||||
|
│ │ ├── components/ # React components
|
||||||
|
│ │ ├── context/ # React context
|
||||||
|
│ │ ├── hooks/ # Custom hooks
|
||||||
|
│ │ ├── pages/ # Page components
|
||||||
|
│ │ ├── themes/ # Theme variants
|
||||||
|
│ │ └── types/ # TypeScript types
|
||||||
|
│ ├── package.json
|
||||||
|
│ └── vite.config.ts
|
||||||
|
├── android-tv/ # Android TV app
|
||||||
|
├── Dockerfile
|
||||||
|
├── docker-compose.yml
|
||||||
|
└── README.md
|
||||||
|
```
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
### v6 (Current)
|
||||||
|
- Episode progress tracking with auto-save (every 5s + on pause)
|
||||||
|
- Continue Watching section with progress bars
|
||||||
|
- Seek to saved position minus 20 seconds on return
|
||||||
|
- Fixed ophim image URLs (migrated to img.ophim.live)
|
||||||
|
- Removed broken wsrv.nl proxy dependency
|
||||||
|
- Episode badge and progress bar in MovieCard
|
||||||
|
- Pushed to Forgejo: `git.khoavo.myds.me/vndangkhoa/kv-netflix:v6`
|
||||||
|
- Docker multi-stage build optimized for Synology NAS (linux/amd64)
|
||||||
|
|
||||||
|
### v4
|
||||||
|
- Deployed v4 to Forgejo and Docker Registry
|
||||||
|
- Refactored frontend and cleaned up repository
|
||||||
|
|
||||||
|
### v3.9.2
|
||||||
|
- Fixed Android TV local IP issue by replacing it with production backend URL
|
||||||
|
- Rebuilt Android TV APK and updated the frontend static bundle
|
||||||
|
|
||||||
|
### v3.9.1
|
||||||
|
- Fix Android TV OOM crash + backend Content-Type headers
|
||||||
|
- Bundled Android TV APK with the webapp for direct download
|
||||||
|
- Verified D-pad navigation on Android TV app
|
||||||
|
|
||||||
|
### v3.8
|
||||||
|
- Updated docker compose configuration
|
||||||
|
|
||||||
|
### v3.7
|
||||||
|
- Codebase cleanup and security improvements
|
||||||
|
- Added SSRF protection with URL validation
|
||||||
|
- Added graceful shutdown and config module
|
||||||
|
- Added React ErrorBoundary and lazy loading
|
||||||
|
- Refactored handlers to reduce code duplication
|
||||||
|
- Updated to Go 1.24 and Node.js 20
|
||||||
|
- Added healthcheck to Docker Compose
|
||||||
|
|
||||||
|
### v3.6
|
||||||
|
- Fixed duplicate episodes
|
||||||
|
- Updated Android TV app
|
||||||
|
|
||||||
|
### v3.5
|
||||||
|
- Fixed extract 500 error
|
||||||
|
- Fixed Android TV crash
|
||||||
|
|
||||||
|
### v3.4
|
||||||
|
- Prevent screen sleep during playback
|
||||||
|
|
||||||
|
### v3.3
|
||||||
|
- Rebranded to kv-netflix
|
||||||
|
- Added PWA support
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT
|
||||||
|
|
|
||||||
BIN
android-tv/adb_logs.txt
Normal file
BIN
android-tv/adb_logs.txt
Normal file
Binary file not shown.
|
|
@ -1,88 +1,88 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
id("org.jetbrains.kotlin.android")
|
id("org.jetbrains.kotlin.android")
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "com.streamflow.tv"
|
namespace = "com.streamflow.tv"
|
||||||
compileSdk = 34
|
compileSdk = 34
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.streamflow.tv"
|
applicationId = "com.streamflow.tv"
|
||||||
minSdk = 21
|
minSdk = 21
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 37
|
versionCode = 37
|
||||||
versionName = "3.7.0"
|
versionName = "3.7.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
isMinifyEnabled = false
|
isMinifyEnabled = false
|
||||||
isShrinkResources = false
|
isShrinkResources = false
|
||||||
proguardFiles(
|
proguardFiles(
|
||||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
"proguard-rules.pro"
|
"proguard-rules.pro"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
compose = true
|
compose = true
|
||||||
}
|
}
|
||||||
|
|
||||||
composeOptions {
|
composeOptions {
|
||||||
kotlinCompilerExtensionVersion = "1.5.8"
|
kotlinCompilerExtensionVersion = "1.5.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = "17"
|
jvmTarget = "17"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Compose for TV
|
// Compose for TV
|
||||||
implementation("androidx.tv:tv-foundation:1.0.0-alpha11")
|
implementation("androidx.tv:tv-foundation:1.0.0-alpha11")
|
||||||
implementation("androidx.tv:tv-material:1.0.0")
|
implementation("androidx.tv:tv-material:1.0.0")
|
||||||
|
|
||||||
// Core Compose
|
// Core Compose
|
||||||
implementation(platform("androidx.compose:compose-bom:2024.01.00"))
|
implementation(platform("androidx.compose:compose-bom:2024.01.00"))
|
||||||
implementation("androidx.compose.ui:ui")
|
implementation("androidx.compose.ui:ui")
|
||||||
implementation("androidx.compose.ui:ui-tooling-preview")
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
||||||
implementation("androidx.compose.material3:material3")
|
implementation("androidx.compose.material3:material3")
|
||||||
implementation("androidx.compose.material:material-icons-extended")
|
implementation("androidx.compose.material:material-icons-extended")
|
||||||
implementation("androidx.activity:activity-compose:1.8.2")
|
implementation("androidx.activity:activity-compose:1.8.2")
|
||||||
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
|
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
|
||||||
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.7.0")
|
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.7.0")
|
||||||
implementation("androidx.navigation:navigation-compose:2.7.6")
|
implementation("androidx.navigation:navigation-compose:2.7.6")
|
||||||
|
|
||||||
// ExoPlayer (Media3)
|
// ExoPlayer (Media3)
|
||||||
implementation("androidx.media3:media3-exoplayer:1.2.1")
|
implementation("androidx.media3:media3-exoplayer:1.2.1")
|
||||||
implementation("androidx.media3:media3-exoplayer-hls:1.2.1")
|
implementation("androidx.media3:media3-exoplayer-hls:1.2.1")
|
||||||
implementation("androidx.media3:media3-ui:1.2.1")
|
implementation("androidx.media3:media3-ui:1.2.1")
|
||||||
implementation("androidx.media3:media3-session:1.2.1")
|
implementation("androidx.media3:media3-session:1.2.1")
|
||||||
|
|
||||||
// Networking
|
// Networking
|
||||||
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
||||||
implementation("com.squareup.retrofit2:converter-moshi:2.9.0")
|
implementation("com.squareup.retrofit2:converter-moshi:2.9.0")
|
||||||
implementation("com.squareup.moshi:moshi-kotlin:1.15.0")
|
implementation("com.squareup.moshi:moshi-kotlin:1.15.0")
|
||||||
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
||||||
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
|
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
|
||||||
|
|
||||||
// Image loading
|
// Image loading
|
||||||
implementation("io.coil-kt:coil-compose:2.5.0")
|
implementation("io.coil-kt:coil-compose:2.5.0")
|
||||||
|
|
||||||
// DataStore
|
// DataStore
|
||||||
implementation("androidx.datastore:datastore-preferences:1.0.0")
|
implementation("androidx.datastore:datastore-preferences:1.0.0")
|
||||||
|
|
||||||
// Core Android TV
|
// Core Android TV
|
||||||
implementation("androidx.core:core-ktx:1.12.0")
|
implementation("androidx.core:core-ktx:1.12.0")
|
||||||
implementation("androidx.leanback:leanback:1.0.0")
|
implementation("androidx.leanback:leanback:1.0.0")
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
debugImplementation("androidx.compose.ui:ui-tooling")
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
108
android-tv/app/proguard-rules.pro
vendored
108
android-tv/app/proguard-rules.pro
vendored
|
|
@ -1,54 +1,54 @@
|
||||||
# ProGuard rules for StreamFlow TV
|
# ProGuard rules for StreamFlow TV
|
||||||
|
|
||||||
# Keep all app classes (safety net)
|
# Keep all app classes (safety net)
|
||||||
-keep class com.streamflow.tv.** { *; }
|
-keep class com.streamflow.tv.** { *; }
|
||||||
-keepclassmembers class com.streamflow.tv.** { *; }
|
-keepclassmembers class com.streamflow.tv.** { *; }
|
||||||
|
|
||||||
# Moshi
|
# Moshi
|
||||||
-keep class com.squareup.moshi.** { *; }
|
-keep class com.squareup.moshi.** { *; }
|
||||||
-keepclassmembers class * {
|
-keepclassmembers class * {
|
||||||
@com.squareup.moshi.Json <fields>;
|
@com.squareup.moshi.Json <fields>;
|
||||||
}
|
}
|
||||||
-keepclassmembers class * {
|
-keepclassmembers class * {
|
||||||
@com.squareup.moshi.JsonClass <fields>;
|
@com.squareup.moshi.JsonClass <fields>;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Kotlin Metadata (critical for Moshi reflection adapter)
|
# Kotlin Metadata (critical for Moshi reflection adapter)
|
||||||
-keep class kotlin.Metadata { *; }
|
-keep class kotlin.Metadata { *; }
|
||||||
-keepattributes RuntimeVisibleAnnotations
|
-keepattributes RuntimeVisibleAnnotations
|
||||||
-keepattributes RuntimeInvisibleAnnotations
|
-keepattributes RuntimeInvisibleAnnotations
|
||||||
-keepattributes *Annotation*
|
-keepattributes *Annotation*
|
||||||
|
|
||||||
# Retrofit
|
# Retrofit
|
||||||
-dontwarn retrofit2.**
|
-dontwarn retrofit2.**
|
||||||
-keep class retrofit2.** { *; }
|
-keep class retrofit2.** { *; }
|
||||||
-keepattributes Signature
|
-keepattributes Signature
|
||||||
-keepattributes Exceptions
|
-keepattributes Exceptions
|
||||||
-keepclassmembers,allowshrinking,allowobfuscation interface * {
|
-keepclassmembers,allowshrinking,allowobfuscation interface * {
|
||||||
@retrofit2.http.* <methods>;
|
@retrofit2.http.* <methods>;
|
||||||
}
|
}
|
||||||
|
|
||||||
# OkHttp
|
# OkHttp
|
||||||
-dontwarn okhttp3.**
|
-dontwarn okhttp3.**
|
||||||
-dontwarn okio.**
|
-dontwarn okio.**
|
||||||
-keep class okhttp3.** { *; }
|
-keep class okhttp3.** { *; }
|
||||||
-keep class okio.** { *; }
|
-keep class okio.** { *; }
|
||||||
|
|
||||||
# Kotlin Coroutines
|
# Kotlin Coroutines
|
||||||
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
|
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
|
||||||
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
|
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
|
||||||
-keepclassmembers class kotlinx.** {
|
-keepclassmembers class kotlinx.** {
|
||||||
volatile <fields>;
|
volatile <fields>;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Coil
|
# Coil
|
||||||
-dontwarn coil.**
|
-dontwarn coil.**
|
||||||
-keep class coil.** { *; }
|
-keep class coil.** { *; }
|
||||||
|
|
||||||
# AndroidX Compose
|
# AndroidX Compose
|
||||||
-keep class androidx.compose.** { *; }
|
-keep class androidx.compose.** { *; }
|
||||||
-dontwarn androidx.compose.**
|
-dontwarn androidx.compose.**
|
||||||
|
|
||||||
# ExoPlayer / Media3
|
# ExoPlayer / Media3
|
||||||
-keep class androidx.media3.** { *; }
|
-keep class androidx.media3.** { *; }
|
||||||
-dontwarn androidx.media3.**
|
-dontwarn androidx.media3.**
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,43 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.software.leanback"
|
android:name="android.software.leanback"
|
||||||
android:required="true" />
|
android:required="false" />
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.hardware.touchscreen"
|
android:name="android.hardware.touchscreen"
|
||||||
android:required="false" />
|
android:required="false" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".StreamFlowApp"
|
android:name=".StreamFlowApp"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:banner="@drawable/app_banner"
|
android:banner="@drawable/app_banner"
|
||||||
android:theme="@style/Theme.StreamFlowTV"
|
android:theme="@style/Theme.StreamFlowTV"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:usesCleartextTraffic="true">
|
android:usesCleartextTraffic="true">
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
|
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
|
||||||
android:screenOrientation="landscape">
|
android:screenOrientation="landscape">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
||||||
</intent-filter>
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</activity>
|
</intent-filter>
|
||||||
</application>
|
<intent-filter>
|
||||||
</manifest>
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:scheme="streamflow" android:host="player" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
</manifest>
|
||||||
|
|
|
||||||
|
|
@ -1,186 +1,172 @@
|
||||||
package com.streamflow.tv
|
package com.streamflow.tv
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.activity.ComponentActivity
|
import android.util.Log
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.ComponentActivity
|
||||||
import androidx.compose.foundation.background
|
import androidx.activity.compose.setContent
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.navigation.compose.NavHost
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.navigation.compose.composable
|
import androidx.navigation.compose.NavHost
|
||||||
import androidx.navigation.compose.rememberNavController
|
import androidx.navigation.compose.composable
|
||||||
import androidx.navigation.compose.currentBackStackEntryAsState
|
import androidx.navigation.compose.rememberNavController
|
||||||
import androidx.navigation.NavType
|
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||||
import androidx.navigation.navArgument
|
import androidx.navigation.NavType
|
||||||
import com.streamflow.tv.data.api.ApiClient
|
import androidx.navigation.navArgument
|
||||||
import com.streamflow.tv.data.repository.UserDataRepository
|
import com.streamflow.tv.data.api.ApiClient
|
||||||
import com.streamflow.tv.ui.components.SideNavRail
|
import com.streamflow.tv.data.repository.UserDataRepository
|
||||||
import com.streamflow.tv.ui.screens.*
|
import com.streamflow.tv.ui.components.SideNavRail
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
import com.streamflow.tv.ui.screens.*
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTvTheme
|
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
||||||
import kotlinx.coroutines.flow.first
|
import com.streamflow.tv.ui.theme.StreamFlowTvTheme
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.flow.first
|
||||||
import coil.Coil
|
import kotlinx.coroutines.launch
|
||||||
import coil.ImageLoader
|
|
||||||
import coil.disk.DiskCache
|
class MainActivity : ComponentActivity() {
|
||||||
import coil.memory.MemoryCache
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
class MainActivity : ComponentActivity() {
|
Log.d("MainActivity", "onCreate started")
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
setContent {
|
||||||
super.onCreate(savedInstanceState)
|
StreamFlowTvApp()
|
||||||
|
}
|
||||||
// Setup Coil with caching
|
}
|
||||||
val imageLoader = ImageLoader.Builder(this)
|
}
|
||||||
.memoryCache {
|
|
||||||
MemoryCache.Builder(this)
|
@Composable
|
||||||
.maxSizePercent(0.25)
|
fun StreamFlowTvApp() {
|
||||||
.build()
|
val context = LocalContext.current
|
||||||
|
val scope = rememberCoroutineScope()
|
||||||
|
val userRepo = remember { UserDataRepository(context) }
|
||||||
|
val navController = rememberNavController()
|
||||||
|
|
||||||
|
var currentTheme by remember { mutableStateOf("default") }
|
||||||
|
var selectedNavId by remember { mutableStateOf("home") }
|
||||||
|
|
||||||
|
// Load persisted settings
|
||||||
|
LaunchedEffect(Unit) {
|
||||||
|
try {
|
||||||
|
currentTheme = userRepo.theme.first()
|
||||||
|
val serverUrl = userRepo.serverUrl.first()
|
||||||
|
if (serverUrl.isNotBlank()) {
|
||||||
|
ApiClient.baseUrl = serverUrl
|
||||||
}
|
}
|
||||||
.diskCache {
|
Log.d("StreamFlowTvApp", "Settings loaded: theme=$currentTheme, url=$serverUrl")
|
||||||
DiskCache.Builder()
|
} catch (e: Exception) {
|
||||||
.directory(this.cacheDir.resolve("image_cache"))
|
Log.e("StreamFlowTvApp", "Error loading settings", e)
|
||||||
.maxSizePercent(0.02)
|
}
|
||||||
.build()
|
}
|
||||||
}
|
|
||||||
.build()
|
StreamFlowTvTheme(themeName = currentTheme) {
|
||||||
Coil.setImageLoader(imageLoader)
|
val colors = StreamFlowTheme.colors
|
||||||
|
|
||||||
setContent {
|
val navBackStackEntry by navController.currentBackStackEntryAsState()
|
||||||
StreamFlowTvApp()
|
val currentRoute = navBackStackEntry?.destination?.route
|
||||||
}
|
val showSideNav = currentRoute != null && !currentRoute.startsWith("player")
|
||||||
}
|
|
||||||
}
|
Row(
|
||||||
|
modifier = Modifier
|
||||||
@Composable
|
.fillMaxSize()
|
||||||
fun StreamFlowTvApp() {
|
.background(colors.background)
|
||||||
val context = LocalContext.current
|
) {
|
||||||
val scope = rememberCoroutineScope()
|
// Side Navigation
|
||||||
val userRepo = remember { UserDataRepository(context) }
|
if (showSideNav) {
|
||||||
val navController = rememberNavController()
|
SideNavRail(
|
||||||
|
selectedId = selectedNavId,
|
||||||
var currentTheme by remember { mutableStateOf("default") }
|
onNavigate = { item ->
|
||||||
var selectedNavId by remember { mutableStateOf("home") }
|
selectedNavId = item.id
|
||||||
|
navController.navigate(item.route) {
|
||||||
// Load persisted settings
|
popUpTo("home") { saveState = true }
|
||||||
LaunchedEffect(Unit) {
|
launchSingleTop = true
|
||||||
currentTheme = userRepo.theme.first()
|
restoreState = true
|
||||||
val serverUrl = userRepo.serverUrl.first()
|
}
|
||||||
if (serverUrl.isNotBlank()) {
|
}
|
||||||
ApiClient.baseUrl = serverUrl
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// Main content
|
||||||
StreamFlowTvTheme(themeName = currentTheme) {
|
Box(modifier = Modifier.weight(1f)) {
|
||||||
val colors = StreamFlowTheme.colors
|
NavHost(
|
||||||
|
navController = navController,
|
||||||
val navBackStackEntry by navController.currentBackStackEntryAsState()
|
startDestination = "home"
|
||||||
val currentRoute = navBackStackEntry?.destination?.route
|
) {
|
||||||
val showSideNav = currentRoute != null && !currentRoute.startsWith("player")
|
composable("home") {
|
||||||
|
HomeScreen(
|
||||||
Row(
|
onMovieClick = { slug ->
|
||||||
modifier = Modifier
|
navController.navigate("detail/$slug")
|
||||||
.fillMaxSize()
|
},
|
||||||
.background(colors.background)
|
userDataRepository = userRepo
|
||||||
) {
|
)
|
||||||
// Side Navigation
|
}
|
||||||
if (showSideNav) {
|
|
||||||
SideNavRail(
|
composable(
|
||||||
selectedId = selectedNavId,
|
"home/{category}",
|
||||||
onNavigate = { item ->
|
arguments = listOf(navArgument("category") { type = NavType.StringType })
|
||||||
selectedNavId = item.id
|
) { entry ->
|
||||||
navController.navigate(item.route) {
|
HomeScreen(
|
||||||
popUpTo("home") { saveState = true }
|
onMovieClick = { slug -> navController.navigate("detail/$slug") },
|
||||||
launchSingleTop = true
|
category = entry.arguments?.getString("category"),
|
||||||
restoreState = true
|
userDataRepository = userRepo
|
||||||
}
|
)
|
||||||
}
|
}
|
||||||
)
|
|
||||||
}
|
composable(
|
||||||
|
"detail/{slug}",
|
||||||
// Main content
|
arguments = listOf(navArgument("slug") { type = NavType.StringType })
|
||||||
Box(modifier = Modifier.weight(1f)) {
|
) { entry ->
|
||||||
NavHost(
|
val slug = entry.arguments?.getString("slug") ?: return@composable
|
||||||
navController = navController,
|
DetailScreen(
|
||||||
startDestination = "home"
|
slug = slug,
|
||||||
) {
|
onPlayClick = { s, ep -> navController.navigate("player/$s/$ep") },
|
||||||
composable("home") {
|
onBack = { navController.popBackStack() }
|
||||||
HomeScreen(
|
)
|
||||||
onMovieClick = { slug ->
|
}
|
||||||
navController.navigate("detail/$slug")
|
|
||||||
},
|
composable(
|
||||||
userDataRepository = userRepo
|
"player/{slug}/{episode}",
|
||||||
)
|
arguments = listOf(
|
||||||
}
|
navArgument("slug") { type = NavType.StringType },
|
||||||
|
navArgument("episode") { type = NavType.IntType; defaultValue = 1 }
|
||||||
composable(
|
),
|
||||||
"home/{category}",
|
deepLinks = listOf(androidx.navigation.navDeepLink { uriPattern = "streamflow://player/{slug}/{episode}" })
|
||||||
arguments = listOf(navArgument("category") { type = NavType.StringType })
|
) { entry ->
|
||||||
) { entry ->
|
val slug = entry.arguments?.getString("slug")
|
||||||
HomeScreen(
|
val episode = entry.arguments?.getInt("episode") ?: 1
|
||||||
onMovieClick = { slug -> navController.navigate("detail/$slug") },
|
Log.d("StreamFlowNav", "Navigating to player: slug=$slug, episode=$episode")
|
||||||
category = entry.arguments?.getString("category"),
|
if (slug == null) {
|
||||||
userDataRepository = userRepo
|
return@composable
|
||||||
)
|
}
|
||||||
}
|
PlayerScreen(
|
||||||
|
slug = slug,
|
||||||
composable(
|
episode = episode,
|
||||||
"detail/{slug}",
|
userDataRepository = userRepo
|
||||||
arguments = listOf(navArgument("slug") { type = NavType.StringType })
|
)
|
||||||
) { entry ->
|
}
|
||||||
val slug = entry.arguments?.getString("slug") ?: return@composable
|
|
||||||
DetailScreen(
|
composable("search") {
|
||||||
slug = slug,
|
SearchScreen(
|
||||||
onPlayClick = { s, ep -> navController.navigate("player/$s/$ep") },
|
onMovieClick = { slug -> navController.navigate("detail/$slug") }
|
||||||
onBack = { navController.popBackStack() }
|
)
|
||||||
)
|
}
|
||||||
}
|
|
||||||
|
composable("mylist") {
|
||||||
composable(
|
MyListScreen(
|
||||||
"player/{slug}/{episode}",
|
onMovieClick = { slug -> navController.navigate("detail/$slug") }
|
||||||
arguments = listOf(
|
)
|
||||||
navArgument("slug") { type = NavType.StringType },
|
}
|
||||||
navArgument("episode") { type = NavType.IntType; defaultValue = 1 }
|
|
||||||
)
|
composable("settings") {
|
||||||
) { entry ->
|
SettingsScreen(
|
||||||
val slug = entry.arguments?.getString("slug")
|
currentTheme = currentTheme,
|
||||||
val episode = entry.arguments?.getInt("episode") ?: 1
|
onThemeChange = { theme ->
|
||||||
android.util.Log.e("StreamFlowNav", "Navigating to player: slug=$slug, episode=$episode")
|
currentTheme = theme
|
||||||
if (slug == null) {
|
scope.launch { userRepo.setTheme(theme) }
|
||||||
android.util.Log.e("StreamFlowNav", "Slug is null - not rendering PlayerScreen")
|
}
|
||||||
return@composable
|
)
|
||||||
}
|
}
|
||||||
PlayerScreen(
|
}
|
||||||
slug = slug,
|
}
|
||||||
episode = episode,
|
}
|
||||||
userDataRepository = userRepo
|
}
|
||||||
)
|
}
|
||||||
}
|
|
||||||
|
|
||||||
composable("search") {
|
|
||||||
SearchScreen(
|
|
||||||
onMovieClick = { slug -> navController.navigate("detail/$slug") }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
composable("mylist") {
|
|
||||||
MyListScreen(
|
|
||||||
onMovieClick = { slug -> navController.navigate("detail/$slug") }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
composable("settings") {
|
|
||||||
SettingsScreen(
|
|
||||||
currentTheme = currentTheme,
|
|
||||||
onThemeChange = { theme ->
|
|
||||||
currentTheme = theme
|
|
||||||
scope.launch { userRepo.setTheme(theme) }
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,30 @@
|
||||||
package com.streamflow.tv
|
package com.streamflow.tv
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
|
import coil.ImageLoader
|
||||||
class StreamFlowApp : Application() {
|
import coil.ImageLoaderFactory
|
||||||
override fun onCreate() {
|
import coil.disk.DiskCache
|
||||||
super.onCreate()
|
import coil.memory.MemoryCache
|
||||||
}
|
|
||||||
}
|
class StreamFlowApp : Application(), ImageLoaderFactory {
|
||||||
|
override fun onCreate() {
|
||||||
|
super.onCreate()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun newImageLoader(): ImageLoader {
|
||||||
|
return ImageLoader.Builder(this)
|
||||||
|
.memoryCache {
|
||||||
|
MemoryCache.Builder(this)
|
||||||
|
.maxSizePercent(0.25)
|
||||||
|
.build()
|
||||||
|
}
|
||||||
|
.diskCache {
|
||||||
|
DiskCache.Builder()
|
||||||
|
.directory(this.cacheDir.resolve("image_cache"))
|
||||||
|
.maxSizePercent(0.02)
|
||||||
|
.build()
|
||||||
|
}
|
||||||
|
.respectCacheHeaders(false) // Often needed for some CDNs
|
||||||
|
.build()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,52 +1,71 @@
|
||||||
package com.streamflow.tv.data.api
|
package com.streamflow.tv.data.api
|
||||||
|
|
||||||
import com.squareup.moshi.Moshi
|
import com.squareup.moshi.Moshi
|
||||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Interceptor
|
||||||
import okhttp3.logging.HttpLoggingInterceptor
|
import okhttp3.OkHttpClient
|
||||||
import retrofit2.Retrofit
|
import okhttp3.logging.HttpLoggingInterceptor
|
||||||
import retrofit2.converter.moshi.MoshiConverterFactory
|
import retrofit2.Retrofit
|
||||||
import java.util.concurrent.TimeUnit
|
import retrofit2.converter.moshi.MoshiConverterFactory
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
object ApiClient {
|
|
||||||
|
object ApiClient {
|
||||||
// Production server on Synology NAS
|
|
||||||
var baseUrl: String = "https://nf.khoavo.myds.me/"
|
// Default base URL for testing
|
||||||
set(value) {
|
// Change this to your production API when ready
|
||||||
field = if (value.endsWith("/")) value else "$value/"
|
// private var _baseUrl: String = "http://10.0.2.2:8000/"
|
||||||
_api = null // Reset to rebuild
|
private var _baseUrl: String = "https://nf.khoavo.myds.me/"
|
||||||
}
|
|
||||||
|
var baseUrl: String
|
||||||
private val moshi: Moshi = Moshi.Builder()
|
get() = _baseUrl
|
||||||
.addLast(KotlinJsonAdapterFactory())
|
set(value) {
|
||||||
.build()
|
_baseUrl = if (value.endsWith("/")) value else "$value/"
|
||||||
|
synchronized(this) {
|
||||||
private val okHttpClient: OkHttpClient = OkHttpClient.Builder()
|
_api = null // Reset to rebuild
|
||||||
.connectTimeout(15, TimeUnit.SECONDS)
|
}
|
||||||
.readTimeout(30, TimeUnit.SECONDS)
|
}
|
||||||
.addInterceptor(
|
|
||||||
HttpLoggingInterceptor().apply {
|
private val moshi: Moshi = Moshi.Builder()
|
||||||
level = HttpLoggingInterceptor.Level.BASIC
|
.addLast(KotlinJsonAdapterFactory())
|
||||||
}
|
.build()
|
||||||
)
|
|
||||||
.build()
|
private val userAgentInterceptor = Interceptor { chain ->
|
||||||
|
val request = chain.request().newBuilder()
|
||||||
private var _api: StreamFlowApi? = null
|
.header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36")
|
||||||
|
.build()
|
||||||
val api: StreamFlowApi
|
chain.proceed(request)
|
||||||
get() {
|
}
|
||||||
if (_api == null) {
|
|
||||||
_api = Retrofit.Builder()
|
private val okHttpClient: OkHttpClient = OkHttpClient.Builder()
|
||||||
.baseUrl(baseUrl)
|
.connectTimeout(20, TimeUnit.SECONDS)
|
||||||
.client(okHttpClient)
|
.readTimeout(60, TimeUnit.SECONDS)
|
||||||
.addConverterFactory(MoshiConverterFactory.create(moshi))
|
.addInterceptor(userAgentInterceptor)
|
||||||
.build()
|
.addInterceptor(
|
||||||
.create(StreamFlowApi::class.java)
|
HttpLoggingInterceptor().apply {
|
||||||
}
|
level = HttpLoggingInterceptor.Level.HEADERS
|
||||||
return _api!!
|
}
|
||||||
}
|
)
|
||||||
|
.build()
|
||||||
fun imageProxyUrl(url: String, width: Int = 400): String {
|
|
||||||
return "${baseUrl}api/images/proxy?url=${java.net.URLEncoder.encode(url, "UTF-8")}&width=$width"
|
private var _api: StreamFlowApi? = null
|
||||||
}
|
|
||||||
}
|
val api: StreamFlowApi
|
||||||
|
get() {
|
||||||
|
return synchronized(this) {
|
||||||
|
if (_api == null) {
|
||||||
|
_api = Retrofit.Builder()
|
||||||
|
.baseUrl(_baseUrl)
|
||||||
|
.client(okHttpClient)
|
||||||
|
.addConverterFactory(MoshiConverterFactory.create(moshi))
|
||||||
|
.build()
|
||||||
|
.create(StreamFlowApi::class.java)
|
||||||
|
}
|
||||||
|
_api!!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun imageProxyUrl(url: String, width: Int = 400): String {
|
||||||
|
val base = _baseUrl.removeSuffix("/")
|
||||||
|
return "$base/api/images/proxy?url=${java.net.URLEncoder.encode(url, "UTF-8")}&width=$width"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,35 @@
|
||||||
package com.streamflow.tv.data.api
|
package com.streamflow.tv.data.api
|
||||||
|
|
||||||
import com.streamflow.tv.data.model.*
|
import com.streamflow.tv.data.model.*
|
||||||
import retrofit2.http.*
|
import retrofit2.http.*
|
||||||
|
|
||||||
interface StreamFlowApi {
|
interface StreamFlowApi {
|
||||||
|
|
||||||
@GET("api/videos/home")
|
@GET("api/videos/home")
|
||||||
suspend fun getHomeVideos(
|
suspend fun getHomeVideos(
|
||||||
@Query("category") category: String? = null,
|
@Query("category") category: String? = null,
|
||||||
@Query("page") page: Int = 1
|
@Query("page") page: Int = 1
|
||||||
): List<Movie>
|
): List<Movie>
|
||||||
|
|
||||||
@GET("api/videos/search")
|
@GET("api/videos/search")
|
||||||
suspend fun searchVideos(
|
suspend fun searchVideos(
|
||||||
@Query("q") query: String,
|
@Query("q") query: String,
|
||||||
@Query("page") page: Int = 1
|
@Query("page") page: Int = 1
|
||||||
): List<Movie>
|
): List<Movie>
|
||||||
|
|
||||||
@GET("api/videos/{slug}")
|
@GET("api/videos/{slug}")
|
||||||
suspend fun getMovieDetail(
|
suspend fun getMovieDetail(
|
||||||
@Path("slug") slug: String
|
@Path("slug") slug: String
|
||||||
): MovieDetailResponse
|
): MovieDetailResponse
|
||||||
|
|
||||||
@POST("api/extract")
|
@POST("api/extract")
|
||||||
suspend fun extractVideo(
|
suspend fun extractVideo(
|
||||||
@Body request: ExtractRequest
|
@Body request: ExtractRequest
|
||||||
): VideoSource
|
): VideoSource
|
||||||
|
|
||||||
@GET("api/categories/genres")
|
@GET("api/categories/genres")
|
||||||
suspend fun getGenres(): List<Category>
|
suspend fun getGenres(): List<Category>
|
||||||
|
|
||||||
@GET("api/categories/countries")
|
@GET("api/categories/countries")
|
||||||
suspend fun getCountries(): List<Category>
|
suspend fun getCountries(): List<Category>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,113 +1,113 @@
|
||||||
package com.streamflow.tv.data.model
|
package com.streamflow.tv.data.model
|
||||||
|
|
||||||
import com.squareup.moshi.Json
|
import com.squareup.moshi.Json
|
||||||
import com.squareup.moshi.JsonClass
|
import com.squareup.moshi.JsonClass
|
||||||
|
|
||||||
@JsonClass(generateAdapter = false)
|
@JsonClass(generateAdapter = false)
|
||||||
data class Movie(
|
data class Movie(
|
||||||
val id: String = "",
|
val id: String = "",
|
||||||
val title: String = "",
|
val title: String = "",
|
||||||
@Json(name = "original_title") val originalTitle: String? = null,
|
@Json(name = "original_title") val originalTitle: String? = null,
|
||||||
val slug: String = "",
|
val slug: String = "",
|
||||||
val thumbnail: String = "",
|
val thumbnail: String = "",
|
||||||
val backdrop: String? = null,
|
val backdrop: String? = null,
|
||||||
val quality: String? = null,
|
val quality: String? = null,
|
||||||
val year: Int? = null,
|
val year: Int? = null,
|
||||||
val category: String = "",
|
val category: String = "",
|
||||||
val time: String? = null,
|
val time: String? = null,
|
||||||
val lang: String? = null,
|
val lang: String? = null,
|
||||||
val director: String? = null,
|
val director: String? = null,
|
||||||
val cast: List<String>? = null,
|
val cast: List<String>? = null,
|
||||||
val provider: String? = null
|
val provider: String? = null
|
||||||
)
|
)
|
||||||
|
|
||||||
@JsonClass(generateAdapter = false)
|
@JsonClass(generateAdapter = false)
|
||||||
data class MovieDetail(
|
data class MovieDetail(
|
||||||
val id: String = "",
|
val id: String = "",
|
||||||
val title: String = "",
|
val title: String = "",
|
||||||
@Json(name = "original_title") val originalTitle: String? = null,
|
@Json(name = "original_title") val originalTitle: String? = null,
|
||||||
val slug: String = "",
|
val slug: String = "",
|
||||||
val thumbnail: String = "",
|
val thumbnail: String = "",
|
||||||
val backdrop: String? = null,
|
val backdrop: String? = null,
|
||||||
val quality: String? = null,
|
val quality: String? = null,
|
||||||
val year: Int? = null,
|
val year: Int? = null,
|
||||||
val category: String = "",
|
val category: String = "",
|
||||||
val description: String = "",
|
val description: String = "",
|
||||||
val rating: String? = null,
|
val rating: String? = null,
|
||||||
val duration: Int? = null,
|
val duration: Int? = null,
|
||||||
val genre: String? = null,
|
val genre: String? = null,
|
||||||
val director: String? = null,
|
val director: String? = null,
|
||||||
val country: String? = null,
|
val country: String? = null,
|
||||||
val cast: List<String>? = null,
|
val cast: List<String>? = null,
|
||||||
val provider: String? = null,
|
val provider: String? = null,
|
||||||
val episodes: List<Episode>? = null
|
val episodes: List<Episode>? = null
|
||||||
) {
|
) {
|
||||||
fun toMovie(): Movie = Movie(
|
fun toMovie(): Movie = Movie(
|
||||||
id = id,
|
id = id,
|
||||||
title = title,
|
title = title,
|
||||||
originalTitle = originalTitle,
|
originalTitle = originalTitle,
|
||||||
slug = slug,
|
slug = slug,
|
||||||
thumbnail = thumbnail,
|
thumbnail = thumbnail,
|
||||||
backdrop = backdrop,
|
backdrop = backdrop,
|
||||||
quality = quality,
|
quality = quality,
|
||||||
year = year,
|
year = year,
|
||||||
category = category,
|
category = category,
|
||||||
director = director,
|
director = director,
|
||||||
cast = cast,
|
cast = cast,
|
||||||
provider = provider
|
provider = provider
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonClass(generateAdapter = false)
|
@JsonClass(generateAdapter = false)
|
||||||
data class Episode(
|
data class Episode(
|
||||||
val number: Int = 0,
|
val number: Int = 0,
|
||||||
val title: String = "",
|
val title: String = "",
|
||||||
val url: String = ""
|
val url: String = ""
|
||||||
)
|
)
|
||||||
|
|
||||||
@JsonClass(generateAdapter = false)
|
@JsonClass(generateAdapter = false)
|
||||||
data class VideoSource(
|
data class VideoSource(
|
||||||
@Json(name = "stream_url") val streamUrl: String = "",
|
@Json(name = "stream_url") val streamUrl: String = "",
|
||||||
val resolution: String = "",
|
val resolution: String = "",
|
||||||
@Json(name = "format_id") val formatId: String = ""
|
@Json(name = "format_id") val formatId: String = ""
|
||||||
)
|
)
|
||||||
|
|
||||||
@JsonClass(generateAdapter = false)
|
@JsonClass(generateAdapter = false)
|
||||||
data class Category(
|
data class Category(
|
||||||
val name: String = "",
|
val name: String = "",
|
||||||
val slug: String = ""
|
val slug: String = ""
|
||||||
)
|
)
|
||||||
|
|
||||||
@JsonClass(generateAdapter = false)
|
@JsonClass(generateAdapter = false)
|
||||||
data class HomeResponse(
|
data class HomeResponse(
|
||||||
val items: List<Movie> = emptyList(),
|
val items: List<Movie> = emptyList(),
|
||||||
val totalPages: Int = 1,
|
val totalPages: Int = 1,
|
||||||
val currentPage: Int = 1
|
val currentPage: Int = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
@JsonClass(generateAdapter = false)
|
@JsonClass(generateAdapter = false)
|
||||||
data class ExtractRequest(
|
data class ExtractRequest(
|
||||||
val url: String
|
val url: String
|
||||||
)
|
)
|
||||||
|
|
||||||
@JsonClass(generateAdapter = false)
|
@JsonClass(generateAdapter = false)
|
||||||
data class MovieDetailResponse(
|
data class MovieDetailResponse(
|
||||||
val id: String = "",
|
val id: String = "",
|
||||||
val title: String = "",
|
val title: String = "",
|
||||||
@Json(name = "original_title") val originalTitle: String? = null,
|
@Json(name = "original_title") val originalTitle: String? = null,
|
||||||
val slug: String = "",
|
val slug: String = "",
|
||||||
val thumbnail: String = "",
|
val thumbnail: String = "",
|
||||||
val backdrop: String? = null,
|
val backdrop: String? = null,
|
||||||
val quality: String? = null,
|
val quality: String? = null,
|
||||||
val year: Int? = null,
|
val year: Int? = null,
|
||||||
val category: String = "",
|
val category: String = "",
|
||||||
val description: String = "",
|
val description: String = "",
|
||||||
val rating: String? = null,
|
val rating: String? = null,
|
||||||
val duration: Int? = null,
|
val duration: Int? = null,
|
||||||
val genre: String? = null,
|
val genre: String? = null,
|
||||||
val director: String? = null,
|
val director: String? = null,
|
||||||
val country: String? = null,
|
val country: String? = null,
|
||||||
val cast: List<String>? = null,
|
val cast: List<String>? = null,
|
||||||
val episodes: List<Episode>? = null
|
val episodes: List<Episode>? = null
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,60 +1,60 @@
|
||||||
package com.streamflow.tv.data.repository
|
package com.streamflow.tv.data.repository
|
||||||
|
|
||||||
import com.streamflow.tv.data.api.ApiClient
|
import com.streamflow.tv.data.api.ApiClient
|
||||||
import com.streamflow.tv.data.model.*
|
import com.streamflow.tv.data.model.*
|
||||||
|
|
||||||
class MovieRepository {
|
class MovieRepository {
|
||||||
|
|
||||||
private val api get() = ApiClient.api
|
private val api get() = ApiClient.api
|
||||||
|
|
||||||
suspend fun getHomeVideos(category: String? = null, page: Int = 1): HomeResponse {
|
suspend fun getHomeVideos(category: String? = null, page: Int = 1): HomeResponse {
|
||||||
val list = api.getHomeVideos(category, page)
|
val list = api.getHomeVideos(category, page)
|
||||||
android.util.Log.e("MovieRepo", "getHomeVideos($category): Received ${list.size} items")
|
android.util.Log.e("MovieRepo", "getHomeVideos($category): Received ${list.size} items")
|
||||||
return HomeResponse(items = list, totalPages = 10, currentPage = page)
|
return HomeResponse(items = list, totalPages = 10, currentPage = page)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun searchVideos(query: String, page: Int = 1): HomeResponse {
|
suspend fun searchVideos(query: String, page: Int = 1): HomeResponse {
|
||||||
val list = api.searchVideos(query, page)
|
val list = api.searchVideos(query, page)
|
||||||
android.util.Log.e("MovieRepo", "searchVideos($query): Received ${list.size} items")
|
android.util.Log.e("MovieRepo", "searchVideos($query): Received ${list.size} items")
|
||||||
return HomeResponse(items = list, totalPages = 1, currentPage = page)
|
return HomeResponse(items = list, totalPages = 1, currentPage = page)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun getMovieDetail(slug: String): MovieDetail {
|
suspend fun getMovieDetail(slug: String): MovieDetail {
|
||||||
val response = api.getMovieDetail(slug)
|
val response = api.getMovieDetail(slug)
|
||||||
|
|
||||||
// API returns a flat list of episodes
|
// API returns a flat list of episodes
|
||||||
val episodes = response.episodes ?: emptyList()
|
val episodes = response.episodes ?: emptyList()
|
||||||
|
|
||||||
return MovieDetail(
|
return MovieDetail(
|
||||||
id = response.id,
|
id = response.id,
|
||||||
title = response.title,
|
title = response.title,
|
||||||
originalTitle = response.originalTitle,
|
originalTitle = response.originalTitle,
|
||||||
slug = response.slug,
|
slug = response.slug,
|
||||||
thumbnail = response.thumbnail,
|
thumbnail = response.thumbnail,
|
||||||
backdrop = response.backdrop,
|
backdrop = response.backdrop,
|
||||||
quality = response.quality,
|
quality = response.quality,
|
||||||
year = response.year,
|
year = response.year,
|
||||||
category = response.category,
|
category = response.category,
|
||||||
description = response.description,
|
description = response.description,
|
||||||
rating = response.rating,
|
rating = response.rating,
|
||||||
duration = response.duration,
|
duration = response.duration,
|
||||||
genre = response.genre,
|
genre = response.genre,
|
||||||
director = response.director,
|
director = response.director,
|
||||||
country = response.country,
|
country = response.country,
|
||||||
cast = response.cast,
|
cast = response.cast,
|
||||||
episodes = episodes
|
episodes = episodes
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun extractVideo(url: String): VideoSource {
|
suspend fun extractVideo(url: String): VideoSource {
|
||||||
return api.extractVideo(ExtractRequest(url))
|
return api.extractVideo(ExtractRequest(url))
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun getGenres(): List<Category> {
|
suspend fun getGenres(): List<Category> {
|
||||||
return api.getGenres()
|
return api.getGenres()
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun getCountries(): List<Category> {
|
suspend fun getCountries(): List<Category> {
|
||||||
return api.getCountries()
|
return api.getCountries()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,103 +1,103 @@
|
||||||
package com.streamflow.tv.data.repository
|
package com.streamflow.tv.data.repository
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.datastore.core.DataStore
|
import androidx.datastore.core.DataStore
|
||||||
import androidx.datastore.preferences.core.*
|
import androidx.datastore.preferences.core.*
|
||||||
import androidx.datastore.preferences.preferencesDataStore
|
import androidx.datastore.preferences.preferencesDataStore
|
||||||
import com.squareup.moshi.Moshi
|
import com.squareup.moshi.Moshi
|
||||||
import com.squareup.moshi.Types
|
import com.squareup.moshi.Types
|
||||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||||
import com.streamflow.tv.data.model.Movie
|
import com.streamflow.tv.data.model.Movie
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.map
|
import kotlinx.coroutines.flow.map
|
||||||
|
|
||||||
private val Context.dataStore: DataStore<Preferences> by preferencesDataStore(name = "user_data")
|
private val Context.dataStore: DataStore<Preferences> by preferencesDataStore(name = "user_data")
|
||||||
|
|
||||||
class UserDataRepository(private val context: Context) {
|
class UserDataRepository(private val context: Context) {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val MY_LIST_KEY = stringPreferencesKey("my_list")
|
private val MY_LIST_KEY = stringPreferencesKey("my_list")
|
||||||
private val WATCH_HISTORY_KEY = stringPreferencesKey("watch_history")
|
private val WATCH_HISTORY_KEY = stringPreferencesKey("watch_history")
|
||||||
private val THEME_KEY = stringPreferencesKey("theme")
|
private val THEME_KEY = stringPreferencesKey("theme")
|
||||||
private val SERVER_URL_KEY = stringPreferencesKey("server_url")
|
private val SERVER_URL_KEY = stringPreferencesKey("server_url")
|
||||||
|
|
||||||
private const val MAX_HISTORY = 50
|
private const val MAX_HISTORY = 50
|
||||||
}
|
}
|
||||||
|
|
||||||
private val moshi = Moshi.Builder().addLast(KotlinJsonAdapterFactory()).build()
|
private val moshi = Moshi.Builder().addLast(KotlinJsonAdapterFactory()).build()
|
||||||
private val movieListType = Types.newParameterizedType(List::class.java, Movie::class.java)
|
private val movieListType = Types.newParameterizedType(List::class.java, Movie::class.java)
|
||||||
private val movieListAdapter = moshi.adapter<List<Movie>>(movieListType)
|
private val movieListAdapter = moshi.adapter<List<Movie>>(movieListType)
|
||||||
|
|
||||||
// --- My List ---
|
// --- My List ---
|
||||||
|
|
||||||
val myList: Flow<List<Movie>> = context.dataStore.data.map { prefs ->
|
val myList: Flow<List<Movie>> = context.dataStore.data.map { prefs ->
|
||||||
val json = prefs[MY_LIST_KEY] ?: "[]"
|
val json = prefs[MY_LIST_KEY] ?: "[]"
|
||||||
movieListAdapter.fromJson(json) ?: emptyList()
|
movieListAdapter.fromJson(json) ?: emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun addToMyList(movie: Movie) {
|
suspend fun addToMyList(movie: Movie) {
|
||||||
context.dataStore.edit { prefs ->
|
context.dataStore.edit { prefs ->
|
||||||
val current = movieListAdapter.fromJson(prefs[MY_LIST_KEY] ?: "[]") ?: emptyList()
|
val current = movieListAdapter.fromJson(prefs[MY_LIST_KEY] ?: "[]") ?: emptyList()
|
||||||
if (current.none { it.slug == movie.slug }) {
|
if (current.none { it.slug == movie.slug }) {
|
||||||
prefs[MY_LIST_KEY] = movieListAdapter.toJson(current + movie)
|
prefs[MY_LIST_KEY] = movieListAdapter.toJson(current + movie)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun removeFromMyList(slug: String) {
|
suspend fun removeFromMyList(slug: String) {
|
||||||
context.dataStore.edit { prefs ->
|
context.dataStore.edit { prefs ->
|
||||||
val current = movieListAdapter.fromJson(prefs[MY_LIST_KEY] ?: "[]") ?: emptyList()
|
val current = movieListAdapter.fromJson(prefs[MY_LIST_KEY] ?: "[]") ?: emptyList()
|
||||||
prefs[MY_LIST_KEY] = movieListAdapter.toJson(current.filter { it.slug != slug })
|
prefs[MY_LIST_KEY] = movieListAdapter.toJson(current.filter { it.slug != slug })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun isInMyList(slug: String): Boolean {
|
suspend fun isInMyList(slug: String): Boolean {
|
||||||
var found = false
|
var found = false
|
||||||
context.dataStore.edit { prefs ->
|
context.dataStore.edit { prefs ->
|
||||||
val current = movieListAdapter.fromJson(prefs[MY_LIST_KEY] ?: "[]") ?: emptyList()
|
val current = movieListAdapter.fromJson(prefs[MY_LIST_KEY] ?: "[]") ?: emptyList()
|
||||||
found = current.any { it.slug == slug }
|
found = current.any { it.slug == slug }
|
||||||
}
|
}
|
||||||
return found
|
return found
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Watch History ---
|
// --- Watch History ---
|
||||||
|
|
||||||
val watchHistory: Flow<List<Movie>> = context.dataStore.data.map { prefs ->
|
val watchHistory: Flow<List<Movie>> = context.dataStore.data.map { prefs ->
|
||||||
val json = prefs[WATCH_HISTORY_KEY] ?: "[]"
|
val json = prefs[WATCH_HISTORY_KEY] ?: "[]"
|
||||||
movieListAdapter.fromJson(json) ?: emptyList()
|
movieListAdapter.fromJson(json) ?: emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun addToHistory(movie: Movie) {
|
suspend fun addToHistory(movie: Movie) {
|
||||||
context.dataStore.edit { prefs ->
|
context.dataStore.edit { prefs ->
|
||||||
val current = movieListAdapter.fromJson(prefs[WATCH_HISTORY_KEY] ?: "[]")?.toMutableList() ?: mutableListOf()
|
val current = movieListAdapter.fromJson(prefs[WATCH_HISTORY_KEY] ?: "[]")?.toMutableList() ?: mutableListOf()
|
||||||
current.removeAll { it.slug == movie.slug }
|
current.removeAll { it.slug == movie.slug }
|
||||||
current.add(0, movie) // Most recent first
|
current.add(0, movie) // Most recent first
|
||||||
val trimmed = current.take(MAX_HISTORY)
|
val trimmed = current.take(MAX_HISTORY)
|
||||||
prefs[WATCH_HISTORY_KEY] = movieListAdapter.toJson(trimmed)
|
prefs[WATCH_HISTORY_KEY] = movieListAdapter.toJson(trimmed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Theme ---
|
// --- Theme ---
|
||||||
|
|
||||||
val theme: Flow<String> = context.dataStore.data.map { prefs ->
|
val theme: Flow<String> = context.dataStore.data.map { prefs ->
|
||||||
prefs[THEME_KEY] ?: "default"
|
prefs[THEME_KEY] ?: "default"
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun setTheme(theme: String) {
|
suspend fun setTheme(theme: String) {
|
||||||
context.dataStore.edit { prefs ->
|
context.dataStore.edit { prefs ->
|
||||||
prefs[THEME_KEY] = theme
|
prefs[THEME_KEY] = theme
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Server URL ---
|
// --- Server URL ---
|
||||||
|
|
||||||
val serverUrl: Flow<String> = context.dataStore.data.map { prefs ->
|
val serverUrl: Flow<String> = context.dataStore.data.map { prefs ->
|
||||||
prefs[SERVER_URL_KEY] ?: "https://nf.khoavo.myds.me"
|
prefs[SERVER_URL_KEY] ?: "https://nf.khoavo.myds.me"
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun setServerUrl(url: String) {
|
suspend fun setServerUrl(url: String) {
|
||||||
context.dataStore.edit { prefs ->
|
context.dataStore.edit { prefs ->
|
||||||
prefs[SERVER_URL_KEY] = url
|
prefs[SERVER_URL_KEY] = url
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,76 +1,76 @@
|
||||||
package com.streamflow.tv.ui.components
|
package com.streamflow.tv.ui.components
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.focus.onFocusChanged
|
import androidx.compose.ui.focus.onFocusChanged
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.tv.foundation.lazy.grid.TvGridCells
|
import androidx.tv.foundation.lazy.grid.TvGridCells
|
||||||
import androidx.tv.foundation.lazy.grid.TvLazyVerticalGrid
|
import androidx.tv.foundation.lazy.grid.TvLazyVerticalGrid
|
||||||
import androidx.tv.foundation.lazy.grid.items
|
import androidx.tv.foundation.lazy.grid.items
|
||||||
import androidx.tv.material3.*
|
import androidx.tv.material3.*
|
||||||
import com.streamflow.tv.data.model.Episode
|
import com.streamflow.tv.data.model.Episode
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
||||||
|
|
||||||
@OptIn(ExperimentalTvMaterial3Api::class)
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun EpisodeSelector(
|
fun EpisodeSelector(
|
||||||
episodes: List<Episode>,
|
episodes: List<Episode>,
|
||||||
currentEpisode: Int,
|
currentEpisode: Int,
|
||||||
onEpisodeSelect: (Episode) -> Unit,
|
onEpisodeSelect: (Episode) -> Unit,
|
||||||
modifier: Modifier = Modifier
|
modifier: Modifier = Modifier
|
||||||
) {
|
) {
|
||||||
val colors = StreamFlowTheme.colors
|
val colors = StreamFlowTheme.colors
|
||||||
|
|
||||||
Column(modifier = modifier) {
|
Column(modifier = modifier) {
|
||||||
Text(
|
Text(
|
||||||
text = "Episodes",
|
text = "Episodes",
|
||||||
style = StreamFlowTheme.typography.headlineMedium,
|
style = StreamFlowTheme.typography.headlineMedium,
|
||||||
modifier = Modifier.padding(bottom = 12.dp)
|
modifier = Modifier.padding(bottom = 12.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
android.util.Log.e("EpisodeSelector", "Rendering grid with ${episodes.size} episodes")
|
android.util.Log.e("EpisodeSelector", "Rendering grid with ${episodes.size} episodes")
|
||||||
TvLazyVerticalGrid(
|
TvLazyVerticalGrid(
|
||||||
columns = TvGridCells.Adaptive(minSize = 120.dp),
|
columns = TvGridCells.Adaptive(minSize = 120.dp),
|
||||||
contentPadding = PaddingValues(4.dp),
|
contentPadding = PaddingValues(4.dp),
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||||
) {
|
) {
|
||||||
items(episodes) { episode ->
|
items(episodes) { episode ->
|
||||||
val isActive = episode.number == currentEpisode
|
val isActive = episode.number == currentEpisode
|
||||||
var isFocused by remember { mutableStateOf(false) }
|
var isFocused by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
Surface(
|
Surface(
|
||||||
onClick = { onEpisodeSelect(episode) },
|
onClick = { onEpisodeSelect(episode) },
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.onFocusChanged { isFocused = it.isFocused },
|
.onFocusChanged { isFocused = it.isFocused },
|
||||||
shape = ClickableSurfaceDefaults.shape(
|
shape = ClickableSurfaceDefaults.shape(
|
||||||
shape = RoundedCornerShape(8.dp)
|
shape = RoundedCornerShape(8.dp)
|
||||||
),
|
),
|
||||||
colors = ClickableSurfaceDefaults.colors(
|
colors = ClickableSurfaceDefaults.colors(
|
||||||
containerColor = if (isActive) colors.primary.copy(alpha = 0.2f) else colors.surfaceVariant,
|
containerColor = if (isActive) colors.primary.copy(alpha = 0.2f) else colors.surfaceVariant,
|
||||||
focusedContainerColor = colors.primary.copy(alpha = 0.3f)
|
focusedContainerColor = colors.primary.copy(alpha = 0.3f)
|
||||||
),
|
),
|
||||||
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.05f)
|
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.05f)
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 12.dp, horizontal = 16.dp),
|
.padding(vertical = 12.dp, horizontal = 16.dp),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = if (episode.title.isNotBlank()) episode.title else "Ep ${episode.number}",
|
text = if (episode.title.isNotBlank()) episode.title else "Ep ${episode.number}",
|
||||||
style = StreamFlowTheme.typography.labelLarge.copy(
|
style = StreamFlowTheme.typography.labelLarge.copy(
|
||||||
color = if (isActive) colors.primary else Color.White
|
color = if (isActive) colors.primary else Color.White
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,159 +1,159 @@
|
||||||
package com.streamflow.tv.ui.components
|
package com.streamflow.tv.ui.components
|
||||||
|
|
||||||
import androidx.compose.animation.*
|
import androidx.compose.animation.*
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
import androidx.compose.ui.graphics.Brush
|
import androidx.compose.ui.graphics.Brush
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.layout.ContentScale
|
import androidx.compose.ui.layout.ContentScale
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.tv.material3.*
|
import androidx.tv.material3.*
|
||||||
import coil.compose.AsyncImage
|
import coil.compose.AsyncImage
|
||||||
import com.streamflow.tv.data.api.ApiClient
|
import com.streamflow.tv.data.api.ApiClient
|
||||||
import com.streamflow.tv.data.model.Movie
|
import com.streamflow.tv.data.model.Movie
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
|
|
||||||
@OptIn(ExperimentalTvMaterial3Api::class)
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun HeroBanner(
|
fun HeroBanner(
|
||||||
movies: List<Movie>,
|
movies: List<Movie>,
|
||||||
onPlayClick: (Movie) -> Unit,
|
onPlayClick: (Movie) -> Unit,
|
||||||
modifier: Modifier = Modifier
|
modifier: Modifier = Modifier
|
||||||
) {
|
) {
|
||||||
if (movies.isEmpty()) return
|
if (movies.isEmpty()) return
|
||||||
val colors = StreamFlowTheme.colors
|
val colors = StreamFlowTheme.colors
|
||||||
|
|
||||||
var currentIndex by remember { mutableIntStateOf(0) }
|
var currentIndex by remember { mutableIntStateOf(0) }
|
||||||
val currentMovie = movies[currentIndex]
|
val currentMovie = movies[currentIndex]
|
||||||
|
|
||||||
LaunchedEffect(currentIndex) {
|
LaunchedEffect(currentIndex) {
|
||||||
delay(6000)
|
delay(6000)
|
||||||
currentIndex = (currentIndex + 1) % movies.size
|
currentIndex = (currentIndex + 1) % movies.size
|
||||||
}
|
}
|
||||||
|
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.height(480.dp)
|
.height(480.dp)
|
||||||
) {
|
) {
|
||||||
AnimatedContent(
|
AnimatedContent(
|
||||||
targetState = currentMovie,
|
targetState = currentMovie,
|
||||||
transitionSpec = { fadeIn() togetherWith fadeOut() },
|
transitionSpec = { fadeIn() togetherWith fadeOut() },
|
||||||
label = "hero-crossfade"
|
label = "hero-crossfade"
|
||||||
) { movie ->
|
) { movie ->
|
||||||
AsyncImage(
|
AsyncImage(
|
||||||
model = ApiClient.imageProxyUrl(movie.backdrop ?: movie.thumbnail, 1280),
|
model = ApiClient.imageProxyUrl(movie.backdrop ?: movie.thumbnail, 1280),
|
||||||
contentDescription = movie.title,
|
contentDescription = movie.title,
|
||||||
contentScale = ContentScale.Crop,
|
contentScale = ContentScale.Crop,
|
||||||
modifier = Modifier.fillMaxSize()
|
modifier = Modifier.fillMaxSize()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.background(
|
.background(
|
||||||
Brush.horizontalGradient(
|
Brush.horizontalGradient(
|
||||||
colors = listOf(
|
colors = listOf(
|
||||||
colors.background.copy(alpha = 0.9f),
|
colors.background.copy(alpha = 0.9f),
|
||||||
colors.background.copy(alpha = 0.5f),
|
colors.background.copy(alpha = 0.5f),
|
||||||
Color.Transparent
|
Color.Transparent
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.fillMaxHeight(0.4f)
|
.fillMaxHeight(0.4f)
|
||||||
.align(Alignment.BottomCenter)
|
.align(Alignment.BottomCenter)
|
||||||
.background(
|
.background(
|
||||||
Brush.verticalGradient(
|
Brush.verticalGradient(
|
||||||
colors = listOf(Color.Transparent, colors.background)
|
colors = listOf(Color.Transparent, colors.background)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.CenterStart)
|
.align(Alignment.CenterStart)
|
||||||
.padding(start = 48.dp, end = 200.dp)
|
.padding(start = 48.dp, end = 200.dp)
|
||||||
.fillMaxHeight(),
|
.fillMaxHeight(),
|
||||||
verticalArrangement = Arrangement.Center
|
verticalArrangement = Arrangement.Center
|
||||||
) {
|
) {
|
||||||
currentMovie.quality?.let { quality ->
|
currentMovie.quality?.let { quality ->
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(colors.primary, RoundedCornerShape(4.dp))
|
.background(colors.primary, RoundedCornerShape(4.dp))
|
||||||
.padding(horizontal = 8.dp, vertical = 4.dp)
|
.padding(horizontal = 8.dp, vertical = 4.dp)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = quality,
|
text = quality,
|
||||||
style = StreamFlowTheme.typography.labelSmall.copy(color = Color.White)
|
style = StreamFlowTheme.typography.labelSmall.copy(color = Color.White)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Spacer(Modifier.height(12.dp))
|
Spacer(Modifier.height(12.dp))
|
||||||
}
|
}
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = currentMovie.title,
|
text = currentMovie.title,
|
||||||
style = StreamFlowTheme.typography.displayLarge,
|
style = StreamFlowTheme.typography.displayLarge,
|
||||||
maxLines = 2,
|
maxLines = 2,
|
||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(Modifier.height(12.dp))
|
Spacer(Modifier.height(12.dp))
|
||||||
|
|
||||||
Row(horizontalArrangement = Arrangement.spacedBy(12.dp)) {
|
Row(horizontalArrangement = Arrangement.spacedBy(12.dp)) {
|
||||||
currentMovie.year?.let {
|
currentMovie.year?.let {
|
||||||
Text("$it", style = StreamFlowTheme.typography.bodyLarge)
|
Text("$it", style = StreamFlowTheme.typography.bodyLarge)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(Modifier.height(16.dp))
|
Spacer(Modifier.height(16.dp))
|
||||||
|
|
||||||
Surface(
|
Surface(
|
||||||
onClick = { onPlayClick(currentMovie) },
|
onClick = { onPlayClick(currentMovie) },
|
||||||
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(8.dp)),
|
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(8.dp)),
|
||||||
colors = ClickableSurfaceDefaults.colors(
|
colors = ClickableSurfaceDefaults.colors(
|
||||||
containerColor = colors.primary,
|
containerColor = colors.primary,
|
||||||
focusedContainerColor = colors.accent
|
focusedContainerColor = colors.accent
|
||||||
),
|
),
|
||||||
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.05f)
|
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.05f)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "▶ Play Now",
|
text = "▶ Play Now",
|
||||||
style = StreamFlowTheme.typography.titleMedium.copy(color = Color.White),
|
style = StreamFlowTheme.typography.titleMedium.copy(color = Color.White),
|
||||||
modifier = Modifier.padding(horizontal = 24.dp, vertical = 12.dp)
|
modifier = Modifier.padding(horizontal = 24.dp, vertical = 12.dp)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.BottomCenter)
|
.align(Alignment.BottomCenter)
|
||||||
.padding(bottom = 16.dp),
|
.padding(bottom = 16.dp),
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
||||||
) {
|
) {
|
||||||
movies.forEachIndexed { index, _ ->
|
movies.forEachIndexed { index, _ ->
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(if (index == currentIndex) 24.dp else 8.dp, 8.dp)
|
.size(if (index == currentIndex) 24.dp else 8.dp, 8.dp)
|
||||||
.clip(CircleShape)
|
.clip(CircleShape)
|
||||||
.background(
|
.background(
|
||||||
if (index == currentIndex) colors.primary
|
if (index == currentIndex) colors.primary
|
||||||
else Color.White.copy(alpha = 0.3f)
|
else Color.White.copy(alpha = 0.3f)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,116 +1,116 @@
|
||||||
package com.streamflow.tv.ui.components
|
package com.streamflow.tv.ui.components
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
import androidx.compose.ui.focus.onFocusChanged
|
import androidx.compose.ui.focus.onFocusChanged
|
||||||
import androidx.compose.ui.graphics.Brush
|
import androidx.compose.ui.graphics.Brush
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.layout.ContentScale
|
import androidx.compose.ui.layout.ContentScale
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.tv.material3.*
|
import androidx.tv.material3.*
|
||||||
import coil.compose.AsyncImage
|
import coil.compose.AsyncImage
|
||||||
import com.streamflow.tv.data.api.ApiClient
|
import com.streamflow.tv.data.api.ApiClient
|
||||||
import com.streamflow.tv.data.model.Movie
|
import com.streamflow.tv.data.model.Movie
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
||||||
|
|
||||||
@OptIn(ExperimentalTvMaterial3Api::class)
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun MovieCard(
|
fun MovieCard(
|
||||||
movie: Movie,
|
movie: Movie,
|
||||||
onClick: () -> Unit,
|
onClick: () -> Unit,
|
||||||
modifier: Modifier = Modifier
|
modifier: Modifier = Modifier
|
||||||
) {
|
) {
|
||||||
val colors = StreamFlowTheme.colors
|
val colors = StreamFlowTheme.colors
|
||||||
|
|
||||||
Surface(
|
Surface(
|
||||||
onClick = onClick,
|
onClick = onClick,
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.width(200.dp)
|
.width(200.dp)
|
||||||
.height(300.dp),
|
.height(300.dp),
|
||||||
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(12.dp)),
|
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(12.dp)),
|
||||||
colors = ClickableSurfaceDefaults.colors(
|
colors = ClickableSurfaceDefaults.colors(
|
||||||
containerColor = colors.surfaceVariant,
|
containerColor = colors.surfaceVariant,
|
||||||
focusedContainerColor = colors.surfaceVariant
|
focusedContainerColor = colors.surfaceVariant
|
||||||
),
|
),
|
||||||
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.08f)
|
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.08f)
|
||||||
) {
|
) {
|
||||||
Box(modifier = Modifier.fillMaxSize()) {
|
Box(modifier = Modifier.fillMaxSize()) {
|
||||||
AsyncImage(
|
AsyncImage(
|
||||||
model = ApiClient.imageProxyUrl(movie.thumbnail, 300),
|
model = ApiClient.imageProxyUrl(movie.thumbnail, 300),
|
||||||
contentDescription = movie.title,
|
contentDescription = movie.title,
|
||||||
contentScale = ContentScale.Crop,
|
contentScale = ContentScale.Crop,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.clip(RoundedCornerShape(12.dp))
|
.clip(RoundedCornerShape(12.dp))
|
||||||
)
|
)
|
||||||
|
|
||||||
movie.quality?.let { quality ->
|
movie.quality?.let { quality ->
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(8.dp)
|
.padding(8.dp)
|
||||||
.align(Alignment.TopEnd)
|
.align(Alignment.TopEnd)
|
||||||
.background(colors.primary, RoundedCornerShape(4.dp))
|
.background(colors.primary, RoundedCornerShape(4.dp))
|
||||||
.padding(horizontal = 6.dp, vertical = 2.dp)
|
.padding(horizontal = 6.dp, vertical = 2.dp)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = quality,
|
text = quality,
|
||||||
style = StreamFlowTheme.typography.labelSmall.copy(color = Color.White)
|
style = StreamFlowTheme.typography.labelSmall.copy(color = Color.White)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
movie.provider?.let { provider ->
|
movie.provider?.let { provider ->
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(8.dp)
|
.padding(8.dp)
|
||||||
.align(Alignment.TopStart)
|
.align(Alignment.TopStart)
|
||||||
.background(Color.Black.copy(alpha = 0.6f), RoundedCornerShape(4.dp))
|
.background(Color.Black.copy(alpha = 0.6f), RoundedCornerShape(4.dp))
|
||||||
.padding(horizontal = 6.dp, vertical = 2.dp)
|
.padding(horizontal = 6.dp, vertical = 2.dp)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = provider,
|
text = provider,
|
||||||
style = StreamFlowTheme.typography.labelSmall.copy(
|
style = StreamFlowTheme.typography.labelSmall.copy(
|
||||||
color = Color.White.copy(alpha = 0.8f),
|
color = Color.White.copy(alpha = 0.8f),
|
||||||
fontSize = androidx.compose.ui.unit.TextUnit.Unspecified // Default or small
|
fontSize = androidx.compose.ui.unit.TextUnit.Unspecified // Default or small
|
||||||
),
|
),
|
||||||
maxLines = 1
|
maxLines = 1
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.align(Alignment.BottomCenter)
|
.align(Alignment.BottomCenter)
|
||||||
.background(
|
.background(
|
||||||
Brush.verticalGradient(
|
Brush.verticalGradient(
|
||||||
colors = listOf(Color.Transparent, Color.Black.copy(alpha = 0.85f))
|
colors = listOf(Color.Transparent, Color.Black.copy(alpha = 0.85f))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.padding(horizontal = 10.dp, vertical = 10.dp)
|
.padding(horizontal = 10.dp, vertical = 10.dp)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = movie.title,
|
text = movie.title,
|
||||||
style = StreamFlowTheme.typography.labelLarge,
|
style = StreamFlowTheme.typography.labelLarge,
|
||||||
maxLines = 2,
|
maxLines = 2,
|
||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
|
|
||||||
movie.year?.let { year ->
|
movie.year?.let { year ->
|
||||||
Text(
|
Text(
|
||||||
text = year.toString(),
|
text = year.toString(),
|
||||||
style = StreamFlowTheme.typography.labelSmall.copy(
|
style = StreamFlowTheme.typography.labelSmall.copy(
|
||||||
color = Color.White.copy(alpha = 0.6f)
|
color = Color.White.copy(alpha = 0.6f)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,43 +1,43 @@
|
||||||
package com.streamflow.tv.ui.components
|
package com.streamflow.tv.ui.components
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.tv.foundation.lazy.list.TvLazyRow
|
import androidx.tv.foundation.lazy.list.TvLazyRow
|
||||||
import androidx.tv.foundation.lazy.list.items
|
import androidx.tv.foundation.lazy.list.items
|
||||||
import androidx.tv.material3.ExperimentalTvMaterial3Api
|
import androidx.tv.material3.ExperimentalTvMaterial3Api
|
||||||
import androidx.tv.material3.Text
|
import androidx.tv.material3.Text
|
||||||
import com.streamflow.tv.data.model.Movie
|
import com.streamflow.tv.data.model.Movie
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
||||||
|
|
||||||
@OptIn(ExperimentalTvMaterial3Api::class)
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun MovieRow(
|
fun MovieRow(
|
||||||
title: String,
|
title: String,
|
||||||
movies: List<Movie>,
|
movies: List<Movie>,
|
||||||
onMovieClick: (Movie) -> Unit,
|
onMovieClick: (Movie) -> Unit,
|
||||||
modifier: Modifier = Modifier
|
modifier: Modifier = Modifier
|
||||||
) {
|
) {
|
||||||
Column(modifier = modifier.padding(vertical = 12.dp)) {
|
Column(modifier = modifier.padding(vertical = 12.dp)) {
|
||||||
// Section title
|
// Section title
|
||||||
Text(
|
Text(
|
||||||
text = title,
|
text = title,
|
||||||
style = StreamFlowTheme.typography.headlineMedium,
|
style = StreamFlowTheme.typography.headlineMedium,
|
||||||
modifier = Modifier.padding(start = 48.dp, bottom = 12.dp)
|
modifier = Modifier.padding(start = 48.dp, bottom = 12.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Horizontal scrolling row of cards
|
// Horizontal scrolling row of cards
|
||||||
TvLazyRow(
|
TvLazyRow(
|
||||||
contentPadding = PaddingValues(horizontal = 48.dp),
|
contentPadding = PaddingValues(horizontal = 48.dp),
|
||||||
horizontalArrangement = Arrangement.spacedBy(16.dp)
|
horizontalArrangement = Arrangement.spacedBy(16.dp)
|
||||||
) {
|
) {
|
||||||
items(movies) { movie ->
|
items(movies) { movie ->
|
||||||
MovieCard(
|
MovieCard(
|
||||||
movie = movie,
|
movie = movie,
|
||||||
onClick = { onMovieClick(movie) }
|
onClick = { onMovieClick(movie) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,114 +1,127 @@
|
||||||
package com.streamflow.tv.ui.components
|
package com.streamflow.tv.ui.components
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.*
|
import androidx.compose.material.icons.filled.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.vector.ImageVector
|
import androidx.compose.ui.graphics.vector.ImageVector
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.tv.material3.*
|
import androidx.tv.material3.*
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
||||||
|
import androidx.compose.ui.focus.FocusRequester
|
||||||
data class NavItem(
|
import androidx.compose.ui.focus.focusRequester
|
||||||
val id: String,
|
|
||||||
val route: String,
|
data class NavItem(
|
||||||
val label: String,
|
val id: String,
|
||||||
val icon: ImageVector
|
val route: String,
|
||||||
)
|
val label: String,
|
||||||
|
val icon: ImageVector
|
||||||
val NAV_ITEMS = listOf(
|
)
|
||||||
NavItem("home", "home", "Home", Icons.Default.Home),
|
|
||||||
NavItem("categories", "home/phim-le", "Categories", Icons.Default.Category),
|
val NAV_ITEMS = listOf(
|
||||||
NavItem("search", "search", "Search", Icons.Default.Search),
|
NavItem("home", "home", "Home", Icons.Default.Home),
|
||||||
NavItem("mylist", "mylist", "My List", Icons.Default.Favorite),
|
NavItem("categories", "home/phim-le", "Categories", Icons.Default.Category),
|
||||||
NavItem("settings", "settings", "Settings", Icons.Default.Settings)
|
NavItem("search", "search", "Search", Icons.Default.Search),
|
||||||
)
|
NavItem("mylist", "mylist", "My List", Icons.Default.Favorite),
|
||||||
|
NavItem("settings", "settings", "Settings", Icons.Default.Settings)
|
||||||
@OptIn(ExperimentalTvMaterial3Api::class)
|
)
|
||||||
@Composable
|
|
||||||
fun SideNavRail(
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
selectedId: String,
|
@Composable
|
||||||
onNavigate: (NavItem) -> Unit,
|
fun SideNavRail(
|
||||||
modifier: Modifier = Modifier
|
selectedId: String,
|
||||||
) {
|
onNavigate: (NavItem) -> Unit,
|
||||||
val colors = StreamFlowTheme.colors
|
modifier: Modifier = Modifier
|
||||||
|
) {
|
||||||
Column(
|
val colors = StreamFlowTheme.colors
|
||||||
modifier = modifier
|
val focusRequester = remember { FocusRequester() }
|
||||||
.fillMaxHeight()
|
|
||||||
.width(56.dp)
|
LaunchedEffect(Unit) {
|
||||||
.background(colors.background.copy(alpha = 0.95f))
|
try {
|
||||||
.padding(vertical = 16.dp),
|
focusRequester.requestFocus()
|
||||||
verticalArrangement = Arrangement.SpaceBetween,
|
} catch (e: Exception) {
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
// Ignore
|
||||||
) {
|
}
|
||||||
Box(
|
}
|
||||||
modifier = Modifier
|
|
||||||
.size(36.dp)
|
Column(
|
||||||
.clip(CircleShape)
|
modifier = modifier
|
||||||
.background(colors.primary),
|
.fillMaxHeight()
|
||||||
contentAlignment = Alignment.Center
|
.width(56.dp)
|
||||||
) {
|
.background(colors.background.copy(alpha = 0.95f))
|
||||||
Text("S", style = StreamFlowTheme.typography.titleMedium.copy(color = Color.White))
|
.padding(vertical = 16.dp),
|
||||||
}
|
verticalArrangement = Arrangement.SpaceBetween,
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
Spacer(Modifier.height(24.dp))
|
) {
|
||||||
|
Box(
|
||||||
Column(
|
modifier = Modifier
|
||||||
modifier = Modifier.weight(1f),
|
.size(36.dp)
|
||||||
verticalArrangement = Arrangement.spacedBy(4.dp),
|
.clip(CircleShape)
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
.background(colors.primary),
|
||||||
) {
|
contentAlignment = Alignment.Center
|
||||||
NAV_ITEMS.forEach { item ->
|
) {
|
||||||
NavRailItem(
|
Text("S", style = StreamFlowTheme.typography.titleMedium.copy(color = Color.White))
|
||||||
item = item,
|
}
|
||||||
isSelected = selectedId == item.id,
|
|
||||||
onClick = { onNavigate(item) },
|
Spacer(Modifier.height(24.dp))
|
||||||
accentColor = colors.primary
|
|
||||||
)
|
Column(
|
||||||
}
|
modifier = Modifier.weight(1f),
|
||||||
}
|
verticalArrangement = Arrangement.spacedBy(4.dp),
|
||||||
}
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
}
|
) {
|
||||||
|
NAV_ITEMS.forEach { item ->
|
||||||
@OptIn(ExperimentalTvMaterial3Api::class)
|
NavRailItem(
|
||||||
@Composable
|
item = item,
|
||||||
private fun NavRailItem(
|
isSelected = selectedId == item.id,
|
||||||
item: NavItem,
|
onClick = { onNavigate(item) },
|
||||||
isSelected: Boolean,
|
accentColor = colors.primary,
|
||||||
onClick: () -> Unit,
|
modifier = if (item.id == "home") Modifier.focusRequester(focusRequester) else Modifier
|
||||||
accentColor: Color
|
)
|
||||||
) {
|
}
|
||||||
var isFocused by remember { mutableStateOf(false) }
|
}
|
||||||
|
}
|
||||||
Surface(
|
}
|
||||||
onClick = onClick,
|
|
||||||
modifier = Modifier
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
.size(48.dp),
|
@Composable
|
||||||
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(12.dp)),
|
private fun NavRailItem(
|
||||||
colors = ClickableSurfaceDefaults.colors(
|
item: NavItem,
|
||||||
containerColor = if (isSelected) accentColor.copy(alpha = 0.15f) else Color.Transparent,
|
isSelected: Boolean,
|
||||||
focusedContainerColor = accentColor.copy(alpha = 0.2f)
|
onClick: () -> Unit,
|
||||||
),
|
accentColor: Color,
|
||||||
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.1f)
|
modifier: Modifier = Modifier
|
||||||
) {
|
) {
|
||||||
Box(
|
var isFocused by remember { mutableStateOf(false) }
|
||||||
modifier = Modifier.fillMaxSize(),
|
|
||||||
contentAlignment = Alignment.Center
|
Surface(
|
||||||
) {
|
onClick = onClick,
|
||||||
Icon(
|
modifier = modifier
|
||||||
imageVector = item.icon,
|
.size(48.dp),
|
||||||
contentDescription = item.label,
|
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(12.dp)),
|
||||||
tint = if (isSelected) accentColor else Color.White.copy(alpha = 0.6f),
|
colors = ClickableSurfaceDefaults.colors(
|
||||||
modifier = Modifier.size(22.dp)
|
containerColor = if (isSelected) accentColor.copy(alpha = 0.15f) else Color.Transparent,
|
||||||
)
|
focusedContainerColor = accentColor.copy(alpha = 0.2f)
|
||||||
}
|
),
|
||||||
}
|
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.1f)
|
||||||
}
|
) {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier.fillMaxSize(),
|
||||||
|
contentAlignment = Alignment.Center
|
||||||
|
) {
|
||||||
|
Icon(
|
||||||
|
imageVector = item.icon,
|
||||||
|
contentDescription = item.label,
|
||||||
|
tint = if (isSelected) accentColor else Color.White.copy(alpha = 0.6f),
|
||||||
|
modifier = Modifier.size(22.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,98 +1,98 @@
|
||||||
package com.streamflow.tv.ui.navigation
|
package com.streamflow.tv.ui.navigation
|
||||||
|
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.navigation.NavType
|
import androidx.navigation.NavType
|
||||||
import androidx.navigation.compose.NavHost
|
import androidx.navigation.compose.NavHost
|
||||||
import androidx.navigation.compose.composable
|
import androidx.navigation.compose.composable
|
||||||
import androidx.navigation.compose.rememberNavController
|
import androidx.navigation.compose.rememberNavController
|
||||||
import androidx.navigation.navArgument
|
import androidx.navigation.navArgument
|
||||||
import com.streamflow.tv.ui.screens.*
|
import com.streamflow.tv.ui.screens.*
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun AppNavigation(
|
fun AppNavigation(
|
||||||
currentTheme: String,
|
currentTheme: String,
|
||||||
onThemeChange: (String) -> Unit
|
onThemeChange: (String) -> Unit
|
||||||
) {
|
) {
|
||||||
val navController = rememberNavController()
|
val navController = rememberNavController()
|
||||||
|
|
||||||
NavHost(navController = navController, startDestination = "home") {
|
NavHost(navController = navController, startDestination = "home") {
|
||||||
// Home (all categories)
|
// Home (all categories)
|
||||||
composable("home") {
|
composable("home") {
|
||||||
HomeScreen(
|
HomeScreen(
|
||||||
onMovieClick = { slug -> navController.navigate("detail/$slug") }
|
onMovieClick = { slug -> navController.navigate("detail/$slug") }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Home filtered by category
|
// Home filtered by category
|
||||||
composable(
|
composable(
|
||||||
"home/{category}",
|
"home/{category}",
|
||||||
arguments = listOf(navArgument("category") { type = NavType.StringType })
|
arguments = listOf(navArgument("category") { type = NavType.StringType })
|
||||||
) { backStackEntry ->
|
) { backStackEntry ->
|
||||||
val category = backStackEntry.arguments?.getString("category")
|
val category = backStackEntry.arguments?.getString("category")
|
||||||
HomeScreen(
|
HomeScreen(
|
||||||
onMovieClick = { slug -> navController.navigate("detail/$slug") },
|
onMovieClick = { slug -> navController.navigate("detail/$slug") },
|
||||||
category = category
|
category = category
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Movie Detail
|
// Movie Detail
|
||||||
composable(
|
composable(
|
||||||
"detail/{slug}",
|
"detail/{slug}",
|
||||||
arguments = listOf(navArgument("slug") { type = NavType.StringType })
|
arguments = listOf(navArgument("slug") { type = NavType.StringType })
|
||||||
) { backStackEntry ->
|
) { backStackEntry ->
|
||||||
val slug = backStackEntry.arguments?.getString("slug") ?: return@composable
|
val slug = backStackEntry.arguments?.getString("slug") ?: return@composable
|
||||||
DetailScreen(
|
DetailScreen(
|
||||||
slug = slug,
|
slug = slug,
|
||||||
onPlayClick = { s, ep -> navController.navigate("player/$s/$ep") },
|
onPlayClick = { s, ep -> navController.navigate("player/$s/$ep") },
|
||||||
onBack = { navController.popBackStack() }
|
onBack = { navController.popBackStack() }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Video Player
|
// Video Player
|
||||||
composable(
|
composable(
|
||||||
"player/{slug}/{episode}",
|
"player/{slug}/{episode}",
|
||||||
arguments = listOf(
|
arguments = listOf(
|
||||||
navArgument("slug") { type = NavType.StringType },
|
navArgument("slug") { type = NavType.StringType },
|
||||||
navArgument("episode") { type = NavType.IntType; defaultValue = 1 }
|
navArgument("episode") { type = NavType.IntType; defaultValue = 1 }
|
||||||
)
|
)
|
||||||
) { backStackEntry ->
|
) { backStackEntry ->
|
||||||
val slug = backStackEntry.arguments?.getString("slug") ?: return@composable
|
val slug = backStackEntry.arguments?.getString("slug") ?: return@composable
|
||||||
val episode = backStackEntry.arguments?.getInt("episode") ?: 1
|
val episode = backStackEntry.arguments?.getInt("episode") ?: 1
|
||||||
PlayerScreen(slug = slug, episode = episode)
|
PlayerScreen(slug = slug, episode = episode)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search
|
// Search
|
||||||
composable("search") {
|
composable("search") {
|
||||||
SearchScreen(
|
SearchScreen(
|
||||||
onMovieClick = { slug -> navController.navigate("detail/$slug") }
|
onMovieClick = { slug -> navController.navigate("detail/$slug") }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// My List
|
// My List
|
||||||
composable("mylist") {
|
composable("mylist") {
|
||||||
MyListScreen(
|
MyListScreen(
|
||||||
onMovieClick = { slug -> navController.navigate("detail/$slug") }
|
onMovieClick = { slug -> navController.navigate("detail/$slug") }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
composable("settings") {
|
composable("settings") {
|
||||||
SettingsScreen(
|
SettingsScreen(
|
||||||
currentTheme = currentTheme,
|
currentTheme = currentTheme,
|
||||||
onThemeChange = onThemeChange
|
onThemeChange = onThemeChange
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expose navController for SideNavRail
|
// Expose navController for SideNavRail
|
||||||
LaunchedEffect(navController) {
|
LaunchedEffect(navController) {
|
||||||
// Store nav controller reference for side nav
|
// Store nav controller reference for side nav
|
||||||
}
|
}
|
||||||
|
|
||||||
// Provide nav controller via local
|
// Provide nav controller via local
|
||||||
CompositionLocalProvider(LocalNavController provides navController) {}
|
CompositionLocalProvider(LocalNavController provides navController) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
val LocalNavController = staticCompositionLocalOf<androidx.navigation.NavHostController> {
|
val LocalNavController = staticCompositionLocalOf<androidx.navigation.NavHostController> {
|
||||||
error("NavController not provided")
|
error("NavController not provided")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,155 +1,200 @@
|
||||||
package com.streamflow.tv.ui.screens
|
package com.streamflow.tv.ui.screens
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.focus.FocusRequester
|
import androidx.compose.ui.focus.FocusRequester
|
||||||
import androidx.compose.ui.focus.focusRequester
|
import androidx.compose.ui.focus.focusRequester
|
||||||
import androidx.compose.ui.graphics.Brush
|
import androidx.compose.ui.graphics.Brush
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.layout.ContentScale
|
import androidx.compose.ui.layout.ContentScale
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.tv.material3.ClickableSurfaceDefaults
|
import androidx.tv.material3.ClickableSurfaceDefaults
|
||||||
import androidx.tv.material3.ExperimentalTvMaterial3Api
|
import androidx.tv.material3.ExperimentalTvMaterial3Api
|
||||||
import androidx.tv.material3.MaterialTheme
|
import androidx.tv.material3.MaterialTheme
|
||||||
import androidx.tv.material3.Surface
|
import androidx.tv.material3.Surface
|
||||||
import androidx.tv.material3.Text
|
import androidx.tv.material3.Text
|
||||||
import coil.compose.AsyncImage
|
import coil.compose.AsyncImage
|
||||||
import com.streamflow.tv.data.api.ApiClient
|
import com.streamflow.tv.data.api.ApiClient
|
||||||
import com.streamflow.tv.data.model.Episode
|
import com.streamflow.tv.data.model.Episode
|
||||||
import com.streamflow.tv.ui.components.EpisodeSelector
|
import com.streamflow.tv.ui.components.EpisodeSelector
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
||||||
import com.streamflow.tv.viewmodel.DetailViewModel
|
import com.streamflow.tv.viewmodel.DetailViewModel
|
||||||
|
|
||||||
@OptIn(ExperimentalTvMaterial3Api::class)
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun DetailScreen(
|
fun DetailScreen(
|
||||||
slug: String,
|
slug: String,
|
||||||
onPlayClick: (String, Int) -> Unit,
|
onPlayClick: (String, Int) -> Unit,
|
||||||
onBack: () -> Unit,
|
onBack: () -> Unit,
|
||||||
viewModel: DetailViewModel = viewModel()
|
viewModel: DetailViewModel = viewModel()
|
||||||
) {
|
) {
|
||||||
val uiState by viewModel.uiState.collectAsState()
|
val uiState by viewModel.uiState.collectAsState()
|
||||||
|
val colors = StreamFlowTheme.colors
|
||||||
LaunchedEffect(slug) {
|
|
||||||
viewModel.loadMovie(slug)
|
LaunchedEffect(slug) {
|
||||||
}
|
viewModel.loadMovie(slug)
|
||||||
|
}
|
||||||
Log.e("DetailScreen", "Composing DetailScreen(slug=$slug, isLoading=${uiState.isLoading})")
|
|
||||||
|
Log.d("DetailScreen", "Composing DetailScreen(slug=$slug, isLoading=${uiState.isLoading})")
|
||||||
Box(
|
|
||||||
modifier = Modifier.fillMaxSize(),
|
Box(
|
||||||
contentAlignment = Alignment.Center
|
modifier = Modifier
|
||||||
) {
|
.fillMaxSize()
|
||||||
val movie = uiState.movie ?: return@Box
|
.background(colors.background),
|
||||||
Log.e("DetailScreen", "Rendering movie details: ${movie.title}")
|
contentAlignment = Alignment.Center
|
||||||
|
) {
|
||||||
val colors = StreamFlowTheme.colors
|
if (uiState.isLoading) {
|
||||||
|
CircularLoadingIndicator()
|
||||||
// Background Image
|
} else if (uiState.error != null) {
|
||||||
AsyncImage(
|
ErrorState(message = uiState.error ?: "Unknown error", onRetry = { viewModel.loadMovie(slug) })
|
||||||
model = ApiClient.imageProxyUrl(movie.backdrop ?: movie.thumbnail, 1280),
|
} else {
|
||||||
contentDescription = null,
|
val movie = uiState.movie ?: return@Box
|
||||||
contentScale = ContentScale.Crop,
|
Log.d("DetailScreen", "Rendering movie details: ${movie.title}")
|
||||||
modifier = Modifier.fillMaxSize()
|
|
||||||
)
|
// Background Image
|
||||||
|
AsyncImage(
|
||||||
// Gradient Overlays
|
model = ApiClient.imageProxyUrl(movie.backdrop ?: movie.thumbnail, 1280),
|
||||||
Box(
|
contentDescription = null,
|
||||||
modifier = Modifier
|
contentScale = ContentScale.Crop,
|
||||||
.fillMaxSize()
|
modifier = Modifier.fillMaxSize()
|
||||||
.background(
|
)
|
||||||
Brush.horizontalGradient(
|
|
||||||
colors = listOf(
|
// Gradient Overlays
|
||||||
colors.background.copy(alpha = 0.95f),
|
Box(
|
||||||
colors.background.copy(alpha = 0.7f),
|
modifier = Modifier
|
||||||
Color.Transparent
|
.fillMaxSize()
|
||||||
)
|
.background(
|
||||||
)
|
Brush.horizontalGradient(
|
||||||
)
|
colors = listOf(
|
||||||
)
|
colors.background.copy(alpha = 0.95f),
|
||||||
Box(
|
colors.background.copy(alpha = 0.7f),
|
||||||
modifier = Modifier
|
Color.Transparent
|
||||||
.fillMaxWidth()
|
)
|
||||||
.fillMaxHeight(0.3f)
|
)
|
||||||
.align(Alignment.BottomCenter)
|
)
|
||||||
.background(
|
)
|
||||||
Brush.verticalGradient(
|
Box(
|
||||||
colors = listOf(Color.Transparent, colors.background)
|
modifier = Modifier
|
||||||
)
|
.fillMaxWidth()
|
||||||
)
|
.fillMaxHeight(0.3f)
|
||||||
)
|
.align(Alignment.BottomCenter)
|
||||||
|
.background(
|
||||||
// Content
|
Brush.verticalGradient(
|
||||||
val focusRequester = remember { FocusRequester() }
|
colors = listOf(Color.Transparent, colors.background)
|
||||||
|
)
|
||||||
LaunchedEffect(uiState.movie) {
|
)
|
||||||
if (uiState.movie != null) {
|
)
|
||||||
focusRequester.requestFocus()
|
|
||||||
android.util.Log.e("DetailScreen", "Focus requested on Play button")
|
// Content
|
||||||
}
|
val focusRequester = remember { FocusRequester() }
|
||||||
}
|
|
||||||
|
LaunchedEffect(uiState.movie) {
|
||||||
Column(
|
if (uiState.movie != null) {
|
||||||
modifier = Modifier
|
focusRequester.requestFocus()
|
||||||
.fillMaxSize()
|
}
|
||||||
.padding(horizontal = 48.dp, vertical = 32.dp),
|
}
|
||||||
verticalArrangement = Arrangement.Center
|
|
||||||
) {
|
Column(
|
||||||
Text(
|
modifier = Modifier
|
||||||
text = movie.title,
|
.fillMaxSize()
|
||||||
style = StreamFlowTheme.typography.displayLarge,
|
.padding(horizontal = 48.dp, vertical = 32.dp),
|
||||||
maxLines = 2,
|
verticalArrangement = Arrangement.Center
|
||||||
overflow = TextOverflow.Ellipsis
|
) {
|
||||||
)
|
Text(
|
||||||
|
text = movie.title,
|
||||||
Spacer(Modifier.height(16.dp))
|
style = StreamFlowTheme.typography.displayLarge,
|
||||||
|
maxLines = 2,
|
||||||
Text(
|
overflow = TextOverflow.Ellipsis
|
||||||
text = movie.description,
|
)
|
||||||
style = StreamFlowTheme.typography.bodyMedium,
|
|
||||||
maxLines = 3,
|
Spacer(Modifier.height(16.dp))
|
||||||
overflow = TextOverflow.Ellipsis,
|
|
||||||
modifier = Modifier.widthIn(max = 600.dp)
|
Text(
|
||||||
)
|
text = movie.description,
|
||||||
|
style = StreamFlowTheme.typography.bodyMedium,
|
||||||
Spacer(Modifier.height(32.dp))
|
maxLines = 3,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
Surface(
|
modifier = Modifier.widthIn(max = 600.dp)
|
||||||
onClick = { onPlayClick(movie.slug, 1) },
|
)
|
||||||
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(8.dp)),
|
|
||||||
colors = ClickableSurfaceDefaults.colors(
|
Spacer(Modifier.height(32.dp))
|
||||||
containerColor = colors.primary,
|
|
||||||
focusedContainerColor = colors.accent
|
Surface(
|
||||||
),
|
onClick = { onPlayClick(movie.slug, 1) },
|
||||||
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.05f),
|
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(8.dp)),
|
||||||
modifier = Modifier.focusRequester(focusRequester)
|
colors = ClickableSurfaceDefaults.colors(
|
||||||
) {
|
containerColor = colors.primary,
|
||||||
Text(
|
focusedContainerColor = colors.accent
|
||||||
"▶ Play",
|
),
|
||||||
style = StreamFlowTheme.typography.titleMedium.copy(color = Color.White),
|
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.05f),
|
||||||
modifier = Modifier.padding(horizontal = 24.dp, vertical = 12.dp)
|
modifier = Modifier.focusRequester(focusRequester)
|
||||||
)
|
) {
|
||||||
}
|
Text(
|
||||||
|
"▶ Play",
|
||||||
if (!movie.episodes.isNullOrEmpty()) {
|
style = StreamFlowTheme.typography.titleMedium.copy(color = Color.White),
|
||||||
Spacer(Modifier.height(32.dp))
|
modifier = Modifier.padding(horizontal = 24.dp, vertical = 12.dp)
|
||||||
|
)
|
||||||
EpisodeSelector(
|
}
|
||||||
episodes = movie.episodes,
|
|
||||||
currentEpisode = 1, // Default to 1 for initial detail load
|
if (!movie.episodes.isNullOrEmpty()) {
|
||||||
onEpisodeSelect = { episode -> onPlayClick(movie.slug, episode.number) },
|
Spacer(Modifier.height(32.dp))
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth()
|
EpisodeSelector(
|
||||||
.height(200.dp)
|
episodes = movie.episodes,
|
||||||
)
|
currentEpisode = 1,
|
||||||
}
|
onEpisodeSelect = { episode -> onPlayClick(movie.slug, episode.number) },
|
||||||
}
|
modifier = Modifier
|
||||||
}
|
.fillMaxWidth()
|
||||||
}
|
.height(200.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun CircularLoadingIndicator() {
|
||||||
|
Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
||||||
|
Text(
|
||||||
|
text = "Loading...",
|
||||||
|
style = StreamFlowTheme.typography.headlineMedium.copy(color = StreamFlowTheme.colors.primary)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
|
@Composable
|
||||||
|
fun ErrorState(message: String, onRetry: () -> Unit) {
|
||||||
|
Column(
|
||||||
|
modifier = Modifier.fillMaxSize(),
|
||||||
|
verticalArrangement = Arrangement.Center,
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
|
) {
|
||||||
|
val colors = StreamFlowTheme.colors
|
||||||
|
Text(
|
||||||
|
text = message,
|
||||||
|
style = StreamFlowTheme.typography.bodyLarge.copy(color = Color.Red),
|
||||||
|
modifier = Modifier.padding(bottom = 16.dp)
|
||||||
|
)
|
||||||
|
Surface(
|
||||||
|
onClick = onRetry,
|
||||||
|
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(8.dp)),
|
||||||
|
colors = ClickableSurfaceDefaults.colors(
|
||||||
|
containerColor = colors.surfaceVariant
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
"Retry",
|
||||||
|
modifier = Modifier.padding(horizontal = 24.dp, vertical = 12.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,112 +1,112 @@
|
||||||
package com.streamflow.tv.ui.screens
|
package com.streamflow.tv.ui.screens
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
import androidx.tv.foundation.lazy.list.TvLazyColumn
|
import androidx.tv.foundation.lazy.list.TvLazyColumn
|
||||||
import androidx.tv.foundation.lazy.list.items
|
import androidx.tv.foundation.lazy.list.items
|
||||||
import androidx.tv.material3.ExperimentalTvMaterial3Api
|
import androidx.tv.material3.ExperimentalTvMaterial3Api
|
||||||
import androidx.tv.material3.Text
|
import androidx.tv.material3.Text
|
||||||
import com.streamflow.tv.ui.components.HeroBanner
|
import com.streamflow.tv.ui.components.HeroBanner
|
||||||
import com.streamflow.tv.ui.components.MovieRow
|
import com.streamflow.tv.ui.components.MovieRow
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
||||||
import com.streamflow.tv.viewmodel.HomeViewModel
|
import com.streamflow.tv.viewmodel.HomeViewModel
|
||||||
|
|
||||||
@OptIn(ExperimentalTvMaterial3Api::class)
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun HomeScreen(
|
fun HomeScreen(
|
||||||
onMovieClick: (String) -> Unit,
|
onMovieClick: (String) -> Unit,
|
||||||
category: String? = null,
|
category: String? = null,
|
||||||
userDataRepository: com.streamflow.tv.data.repository.UserDataRepository? = null,
|
userDataRepository: com.streamflow.tv.data.repository.UserDataRepository? = null,
|
||||||
viewModel: HomeViewModel = viewModel()
|
viewModel: HomeViewModel = viewModel()
|
||||||
) {
|
) {
|
||||||
val uiState by viewModel.uiState.collectAsState()
|
val uiState by viewModel.uiState.collectAsState()
|
||||||
val colors = StreamFlowTheme.colors
|
val colors = StreamFlowTheme.colors
|
||||||
|
|
||||||
LaunchedEffect(category) {
|
LaunchedEffect(category) {
|
||||||
viewModel.loadHome(category, userDataRepository)
|
viewModel.loadHome(category, userDataRepository)
|
||||||
}
|
}
|
||||||
|
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.background(colors.background)
|
.background(colors.background)
|
||||||
) {
|
) {
|
||||||
if (uiState.isLoading) {
|
if (uiState.isLoading) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "Loading...",
|
text = "Loading...",
|
||||||
style = StreamFlowTheme.typography.headlineMedium.copy(color = colors.primary)
|
style = StreamFlowTheme.typography.headlineMedium.copy(color = colors.primary)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else if (uiState.error != null) {
|
} else if (uiState.error != null) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = uiState.error ?: "Unknown error",
|
text = uiState.error ?: "Unknown error",
|
||||||
style = StreamFlowTheme.typography.bodyLarge.copy(color = Color.Red)
|
style = StreamFlowTheme.typography.bodyLarge.copy(color = Color.Red)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
TvLazyColumn(
|
TvLazyColumn(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
contentPadding = PaddingValues(bottom = 24.dp)
|
contentPadding = PaddingValues(bottom = 24.dp)
|
||||||
) {
|
) {
|
||||||
// Hero Banner
|
// Hero Banner
|
||||||
if (uiState.heroMovies.isNotEmpty()) {
|
if (uiState.heroMovies.isNotEmpty()) {
|
||||||
item {
|
item {
|
||||||
HeroBanner(
|
HeroBanner(
|
||||||
movies = uiState.heroMovies,
|
movies = uiState.heroMovies,
|
||||||
onPlayClick = { movie -> onMovieClick(movie.slug) }
|
onPlayClick = { movie -> onMovieClick(movie.slug) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Continue Watching (Watch History)
|
// Continue Watching (Watch History)
|
||||||
if (uiState.watchedMovies.isNotEmpty()) {
|
if (uiState.watchedMovies.isNotEmpty()) {
|
||||||
item {
|
item {
|
||||||
MovieRow(
|
MovieRow(
|
||||||
title = "Continue Watching",
|
title = "Continue Watching",
|
||||||
movies = uiState.watchedMovies,
|
movies = uiState.watchedMovies,
|
||||||
onMovieClick = { movie -> onMovieClick(movie.slug) }
|
onMovieClick = { movie -> onMovieClick(movie.slug) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recommended for You
|
// Recommended for You
|
||||||
if (uiState.recommendedMovies.isNotEmpty()) {
|
if (uiState.recommendedMovies.isNotEmpty()) {
|
||||||
item {
|
item {
|
||||||
MovieRow(
|
MovieRow(
|
||||||
title = "Recommended for You",
|
title = "Recommended for You",
|
||||||
movies = uiState.recommendedMovies,
|
movies = uiState.recommendedMovies,
|
||||||
onMovieClick = { movie -> onMovieClick(movie.slug) }
|
onMovieClick = { movie -> onMovieClick(movie.slug) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Category rows
|
// Category rows
|
||||||
uiState.categoryMovies.forEach { (title, movies) ->
|
uiState.categoryMovies.forEach { (title, movies) ->
|
||||||
if (movies.isNotEmpty()) {
|
if (movies.isNotEmpty()) {
|
||||||
item {
|
item {
|
||||||
MovieRow(
|
MovieRow(
|
||||||
title = title,
|
title = title,
|
||||||
movies = movies,
|
movies = movies,
|
||||||
onMovieClick = { movie -> onMovieClick(movie.slug) }
|
onMovieClick = { movie -> onMovieClick(movie.slug) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,104 +1,104 @@
|
||||||
package com.streamflow.tv.ui.screens
|
package com.streamflow.tv.ui.screens
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
import androidx.tv.foundation.lazy.grid.TvGridCells
|
import androidx.tv.foundation.lazy.grid.TvGridCells
|
||||||
import androidx.tv.foundation.lazy.grid.TvLazyVerticalGrid
|
import androidx.tv.foundation.lazy.grid.TvLazyVerticalGrid
|
||||||
import androidx.tv.foundation.lazy.grid.items
|
import androidx.tv.foundation.lazy.grid.items
|
||||||
import androidx.tv.material3.ExperimentalTvMaterial3Api
|
import androidx.tv.material3.ExperimentalTvMaterial3Api
|
||||||
import androidx.tv.material3.Text
|
import androidx.tv.material3.Text
|
||||||
import com.streamflow.tv.ui.components.MovieCard
|
import com.streamflow.tv.ui.components.MovieCard
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
||||||
import com.streamflow.tv.viewmodel.MyListViewModel
|
import com.streamflow.tv.viewmodel.MyListViewModel
|
||||||
|
|
||||||
@OptIn(ExperimentalTvMaterial3Api::class)
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun MyListScreen(
|
fun MyListScreen(
|
||||||
onMovieClick: (String) -> Unit,
|
onMovieClick: (String) -> Unit,
|
||||||
viewModel: MyListViewModel = viewModel()
|
viewModel: MyListViewModel = viewModel()
|
||||||
) {
|
) {
|
||||||
val uiState by viewModel.uiState.collectAsState()
|
val uiState by viewModel.uiState.collectAsState()
|
||||||
val colors = StreamFlowTheme.colors
|
val colors = StreamFlowTheme.colors
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.background(colors.background)
|
.background(colors.background)
|
||||||
.padding(horizontal = 48.dp, vertical = 32.dp)
|
.padding(horizontal = 48.dp, vertical = 32.dp)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "My List",
|
text = "My List",
|
||||||
style = StreamFlowTheme.typography.displayMedium,
|
style = StreamFlowTheme.typography.displayMedium,
|
||||||
modifier = Modifier.padding(bottom = 24.dp)
|
modifier = Modifier.padding(bottom = 24.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
if (uiState.watchHistory.isEmpty() && uiState.savedMovies.isEmpty()) {
|
if (uiState.watchHistory.isEmpty() && uiState.savedMovies.isEmpty()) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||||
Text("❤️", style = StreamFlowTheme.typography.displayLarge)
|
Text("❤️", style = StreamFlowTheme.typography.displayLarge)
|
||||||
Text(
|
Text(
|
||||||
"Your list is empty.",
|
"Your list is empty.",
|
||||||
style = StreamFlowTheme.typography.headlineMedium,
|
style = StreamFlowTheme.typography.headlineMedium,
|
||||||
modifier = Modifier.padding(top = 12.dp)
|
modifier = Modifier.padding(top = 12.dp)
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
"Start watching or add movies to your list.",
|
"Start watching or add movies to your list.",
|
||||||
style = StreamFlowTheme.typography.bodyLarge,
|
style = StreamFlowTheme.typography.bodyLarge,
|
||||||
modifier = Modifier.padding(top = 4.dp)
|
modifier = Modifier.padding(top = 4.dp)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Continue Watching
|
// Continue Watching
|
||||||
if (uiState.watchHistory.isNotEmpty()) {
|
if (uiState.watchHistory.isNotEmpty()) {
|
||||||
Text(
|
Text(
|
||||||
text = "Continue Watching",
|
text = "Continue Watching",
|
||||||
style = StreamFlowTheme.typography.headlineMedium,
|
style = StreamFlowTheme.typography.headlineMedium,
|
||||||
modifier = Modifier.padding(bottom = 12.dp)
|
modifier = Modifier.padding(bottom = 12.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
TvLazyVerticalGrid(
|
TvLazyVerticalGrid(
|
||||||
columns = TvGridCells.Adaptive(180.dp),
|
columns = TvGridCells.Adaptive(180.dp),
|
||||||
contentPadding = PaddingValues(4.dp),
|
contentPadding = PaddingValues(4.dp),
|
||||||
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
||||||
verticalArrangement = Arrangement.spacedBy(16.dp),
|
verticalArrangement = Arrangement.spacedBy(16.dp),
|
||||||
modifier = Modifier.heightIn(max = 320.dp)
|
modifier = Modifier.heightIn(max = 320.dp)
|
||||||
) {
|
) {
|
||||||
items(uiState.watchHistory, key = { "h_${it.slug}" }) { movie ->
|
items(uiState.watchHistory, key = { "h_${it.slug}" }) { movie ->
|
||||||
MovieCard(movie = movie, onClick = { onMovieClick(movie.slug) })
|
MovieCard(movie = movie, onClick = { onMovieClick(movie.slug) })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(Modifier.height(24.dp))
|
Spacer(Modifier.height(24.dp))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Saved
|
// Saved
|
||||||
if (uiState.savedMovies.isNotEmpty()) {
|
if (uiState.savedMovies.isNotEmpty()) {
|
||||||
Text(
|
Text(
|
||||||
text = "Saved Movies",
|
text = "Saved Movies",
|
||||||
style = StreamFlowTheme.typography.headlineMedium,
|
style = StreamFlowTheme.typography.headlineMedium,
|
||||||
modifier = Modifier.padding(bottom = 12.dp)
|
modifier = Modifier.padding(bottom = 12.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
TvLazyVerticalGrid(
|
TvLazyVerticalGrid(
|
||||||
columns = TvGridCells.Adaptive(180.dp),
|
columns = TvGridCells.Adaptive(180.dp),
|
||||||
contentPadding = PaddingValues(4.dp),
|
contentPadding = PaddingValues(4.dp),
|
||||||
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
||||||
verticalArrangement = Arrangement.spacedBy(16.dp)
|
verticalArrangement = Arrangement.spacedBy(16.dp)
|
||||||
) {
|
) {
|
||||||
items(uiState.savedMovies, key = { "s_${it.slug}" }) { movie ->
|
items(uiState.savedMovies, key = { "s_${it.slug}" }) { movie ->
|
||||||
MovieCard(movie = movie, onClick = { onMovieClick(movie.slug) })
|
MovieCard(movie = movie, onClick = { onMovieClick(movie.slug) })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,192 +1,249 @@
|
||||||
package com.streamflow.tv.ui.screens
|
package com.streamflow.tv.ui.screens
|
||||||
|
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
import androidx.annotation.OptIn
|
import androidx.annotation.OptIn
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.input.key.*
|
import androidx.compose.ui.input.key.*
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.viewinterop.AndroidView
|
import androidx.compose.ui.viewinterop.AndroidView
|
||||||
import androidx.compose.foundation.focusable
|
import androidx.compose.foundation.focusable
|
||||||
import androidx.compose.ui.focus.FocusRequester
|
import androidx.compose.ui.focus.FocusRequester
|
||||||
import androidx.compose.ui.focus.focusRequester
|
import androidx.compose.ui.focus.focusRequester
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
import androidx.media3.common.MediaItem
|
import androidx.media3.common.MediaItem
|
||||||
import androidx.media3.common.util.UnstableApi
|
import androidx.media3.common.util.UnstableApi
|
||||||
import androidx.media3.exoplayer.ExoPlayer
|
import androidx.media3.exoplayer.ExoPlayer
|
||||||
import androidx.media3.exoplayer.hls.HlsMediaSource
|
import androidx.media3.exoplayer.hls.HlsMediaSource
|
||||||
import androidx.media3.datasource.DefaultDataSource
|
import androidx.media3.datasource.DefaultDataSource
|
||||||
import androidx.media3.ui.PlayerView
|
import androidx.media3.ui.PlayerView
|
||||||
import androidx.tv.material3.ExperimentalTvMaterial3Api
|
import androidx.tv.material3.ExperimentalTvMaterial3Api
|
||||||
import androidx.tv.material3.Text
|
import androidx.tv.material3.Text
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
||||||
import com.streamflow.tv.viewmodel.PlayerViewModel
|
import com.streamflow.tv.viewmodel.PlayerViewModel
|
||||||
|
|
||||||
@OptIn(UnstableApi::class)
|
@OptIn(UnstableApi::class)
|
||||||
@kotlin.OptIn(ExperimentalTvMaterial3Api::class)
|
@kotlin.OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun PlayerScreen(
|
fun PlayerScreen(
|
||||||
slug: String,
|
slug: String,
|
||||||
episode: Int = 1,
|
episode: Int = 1,
|
||||||
userDataRepository: com.streamflow.tv.data.repository.UserDataRepository? = null,
|
userDataRepository: com.streamflow.tv.data.repository.UserDataRepository? = null,
|
||||||
viewModel: PlayerViewModel = viewModel()
|
viewModel: PlayerViewModel = viewModel()
|
||||||
) {
|
) {
|
||||||
val uiState by viewModel.uiState.collectAsState()
|
val uiState by viewModel.uiState.collectAsState()
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val colors = StreamFlowTheme.colors
|
val colors = StreamFlowTheme.colors
|
||||||
var playerView by remember { mutableStateOf<PlayerView?>(null) }
|
var playerView by remember { mutableStateOf<PlayerView?>(null) }
|
||||||
|
|
||||||
LaunchedEffect(slug, episode) {
|
LaunchedEffect(slug, episode) {
|
||||||
viewModel.loadPlayer(slug, episode)
|
viewModel.loadPlayer(slug, episode)
|
||||||
}
|
}
|
||||||
|
|
||||||
LaunchedEffect(uiState.movie) {
|
LaunchedEffect(uiState.movie) {
|
||||||
if (uiState.movie != null && userDataRepository != null) {
|
if (uiState.movie != null && userDataRepository != null) {
|
||||||
viewModel.saveToHistory(userDataRepository)
|
viewModel.saveToHistory(userDataRepository)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExoPlayer instance
|
// ExoPlayer instance
|
||||||
val exoPlayer = remember {
|
val exoPlayer = remember {
|
||||||
ExoPlayer.Builder(context).build().apply {
|
ExoPlayer.Builder(context).build().apply {
|
||||||
playWhenReady = true
|
playWhenReady = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update player when source changes
|
// Wrap ExoPlayer to intercept next/previous UI clicks
|
||||||
LaunchedEffect(uiState.source) {
|
val forwardingPlayer = remember(exoPlayer, uiState.movie, uiState.currentEpisode) {
|
||||||
uiState.source?.let { source ->
|
object : androidx.media3.common.ForwardingPlayer(exoPlayer) {
|
||||||
val dataSourceFactory = DefaultDataSource.Factory(context)
|
override fun getAvailableCommands(): androidx.media3.common.Player.Commands {
|
||||||
val mediaItem = MediaItem.fromUri(source.streamUrl)
|
return super.getAvailableCommands().buildUpon()
|
||||||
|
.add(androidx.media3.common.Player.COMMAND_SEEK_TO_NEXT)
|
||||||
android.util.Log.e("StreamFlowPlayer", "Setting media source: ${source.streamUrl}")
|
.add(androidx.media3.common.Player.COMMAND_SEEK_TO_PREVIOUS)
|
||||||
|
.add(androidx.media3.common.Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM)
|
||||||
exoPlayer.addListener(object : androidx.media3.common.Player.Listener {
|
.add(androidx.media3.common.Player.COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM)
|
||||||
override fun onPlayerError(error: androidx.media3.common.PlaybackException) {
|
.build()
|
||||||
android.util.Log.e("StreamFlowPlayer", "Player Error: ${error.message}", error)
|
}
|
||||||
}
|
|
||||||
override fun onPlaybackStateChanged(playbackState: Int) {
|
override fun hasNextMediaItem(): Boolean {
|
||||||
android.util.Log.e("StreamFlowPlayer", "Playback State: $playbackState")
|
val eps = uiState.movie?.episodes ?: return false
|
||||||
}
|
if (eps.isEmpty()) return false
|
||||||
})
|
val maxEp = eps.maxOf { it.number }
|
||||||
|
return uiState.currentEpisode < maxEp
|
||||||
if (source.streamUrl.contains(".m3u8")) {
|
}
|
||||||
val hlsSource = HlsMediaSource.Factory(dataSourceFactory)
|
override fun hasPreviousMediaItem(): Boolean {
|
||||||
.createMediaSource(mediaItem)
|
val eps = uiState.movie?.episodes ?: return false
|
||||||
exoPlayer.setMediaSource(hlsSource)
|
if (eps.isEmpty()) return false
|
||||||
} else {
|
val minEp = eps.minOf { it.number }
|
||||||
exoPlayer.setMediaItem(mediaItem)
|
return uiState.currentEpisode > minEp
|
||||||
}
|
}
|
||||||
exoPlayer.prepare()
|
override fun seekToNextMediaItem() {
|
||||||
}
|
if (hasNextMediaItem()) {
|
||||||
}
|
viewModel.changeEpisode(uiState.currentEpisode + 1)
|
||||||
|
}
|
||||||
// Cleanup
|
}
|
||||||
DisposableEffect(Unit) {
|
override fun seekToNext() {
|
||||||
onDispose {
|
seekToNextMediaItem()
|
||||||
exoPlayer.release()
|
}
|
||||||
}
|
override fun seekToPreviousMediaItem() {
|
||||||
}
|
if (hasPreviousMediaItem()) {
|
||||||
|
viewModel.changeEpisode(uiState.currentEpisode - 1)
|
||||||
val focusRequester = remember { FocusRequester() }
|
}
|
||||||
|
}
|
||||||
Box(
|
override fun seekToPrevious() {
|
||||||
modifier = Modifier
|
seekToPreviousMediaItem()
|
||||||
.fillMaxSize()
|
}
|
||||||
.background(Color.Black)
|
}
|
||||||
.focusRequester(focusRequester)
|
}
|
||||||
.focusable()
|
|
||||||
.onPreviewKeyEvent { keyEvent ->
|
// Update player when source changes
|
||||||
if (keyEvent.type == KeyEventType.KeyDown) {
|
LaunchedEffect(uiState.source) {
|
||||||
when (keyEvent.nativeKeyEvent.keyCode) {
|
uiState.source?.let { source ->
|
||||||
android.view.KeyEvent.KEYCODE_DPAD_CENTER,
|
val dataSourceFactory = DefaultDataSource.Factory(context)
|
||||||
android.view.KeyEvent.KEYCODE_ENTER -> {
|
val mediaItem = MediaItem.fromUri(source.streamUrl)
|
||||||
// Toggle controls visibility
|
|
||||||
if (playerView?.isControllerFullyVisible == true) {
|
android.util.Log.e("StreamFlowPlayer", "Setting media source: ${source.streamUrl}")
|
||||||
playerView?.hideController()
|
|
||||||
} else {
|
exoPlayer.addListener(object : androidx.media3.common.Player.Listener {
|
||||||
playerView?.showController()
|
override fun onPlayerError(error: androidx.media3.common.PlaybackException) {
|
||||||
}
|
android.util.Log.e("StreamFlowPlayer", "Player Error: ${error.message}", error)
|
||||||
true
|
}
|
||||||
}
|
override fun onPlaybackStateChanged(playbackState: Int) {
|
||||||
android.view.KeyEvent.KEYCODE_DPAD_LEFT -> {
|
android.util.Log.e("StreamFlowPlayer", "Playback State: $playbackState")
|
||||||
// Seek backward 10s
|
}
|
||||||
playerView?.showController()
|
})
|
||||||
exoPlayer.seekTo(maxOf(0, exoPlayer.currentPosition - 10000))
|
|
||||||
true
|
if (source.streamUrl.contains(".m3u8")) {
|
||||||
}
|
val hlsSource = HlsMediaSource.Factory(dataSourceFactory)
|
||||||
android.view.KeyEvent.KEYCODE_DPAD_RIGHT -> {
|
.createMediaSource(mediaItem)
|
||||||
// Seek forward 10s
|
exoPlayer.setMediaSource(hlsSource)
|
||||||
playerView?.showController()
|
} else {
|
||||||
exoPlayer.seekTo(minOf(exoPlayer.duration, exoPlayer.currentPosition + 10000))
|
exoPlayer.setMediaItem(mediaItem)
|
||||||
true
|
}
|
||||||
}
|
exoPlayer.prepare()
|
||||||
android.view.KeyEvent.KEYCODE_DPAD_UP,
|
}
|
||||||
android.view.KeyEvent.KEYCODE_DPAD_DOWN -> {
|
}
|
||||||
playerView?.showController()
|
|
||||||
true
|
// Cleanup
|
||||||
}
|
DisposableEffect(Unit) {
|
||||||
else -> false
|
onDispose {
|
||||||
}
|
exoPlayer.release()
|
||||||
} else false
|
}
|
||||||
}
|
}
|
||||||
) {
|
|
||||||
LaunchedEffect(Unit) {
|
val focusRequester = remember { FocusRequester() }
|
||||||
focusRequester.requestFocus()
|
|
||||||
}
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
if (uiState.isLoading || uiState.source == null) {
|
.fillMaxSize()
|
||||||
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
.background(Color.Black)
|
||||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
.focusRequester(focusRequester)
|
||||||
Text(
|
.focusable()
|
||||||
"Loading stream...",
|
.onPreviewKeyEvent { keyEvent ->
|
||||||
style = StreamFlowTheme.typography.headlineMedium.copy(color = colors.primary)
|
if (keyEvent.type == KeyEventType.KeyDown) {
|
||||||
)
|
when (keyEvent.nativeKeyEvent.keyCode) {
|
||||||
uiState.movie?.let { movie ->
|
android.view.KeyEvent.KEYCODE_DPAD_CENTER,
|
||||||
Text(
|
android.view.KeyEvent.KEYCODE_ENTER -> {
|
||||||
movie.title,
|
// Toggle controls visibility
|
||||||
style = StreamFlowTheme.typography.bodyLarge,
|
if (playerView?.isControllerFullyVisible == true) {
|
||||||
modifier = Modifier.padding(top = 8.dp)
|
playerView?.hideController()
|
||||||
)
|
} else {
|
||||||
}
|
playerView?.showController()
|
||||||
}
|
}
|
||||||
}
|
true
|
||||||
} else {
|
}
|
||||||
// ExoPlayer View
|
android.view.KeyEvent.KEYCODE_DPAD_LEFT -> {
|
||||||
AndroidView(
|
// Seek backward 10s
|
||||||
factory = { ctx ->
|
playerView?.showController()
|
||||||
PlayerView(ctx).apply {
|
exoPlayer.seekTo(maxOf(0, exoPlayer.currentPosition - 10000))
|
||||||
player = exoPlayer
|
true
|
||||||
useController = true
|
}
|
||||||
setShowNextButton(false)
|
android.view.KeyEvent.KEYCODE_DPAD_RIGHT -> {
|
||||||
setShowPreviousButton(false)
|
// Seek forward 10s
|
||||||
controllerAutoShow = true
|
playerView?.showController()
|
||||||
keepScreenOn = true // Prevent screen sleep during playback
|
exoPlayer.seekTo(minOf(exoPlayer.duration, exoPlayer.currentPosition + 10000))
|
||||||
layoutParams = FrameLayout.LayoutParams(
|
true
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
}
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT
|
android.view.KeyEvent.KEYCODE_DPAD_UP,
|
||||||
)
|
android.view.KeyEvent.KEYCODE_DPAD_DOWN -> {
|
||||||
playerView = this
|
playerView?.showController()
|
||||||
}
|
true
|
||||||
},
|
}
|
||||||
modifier = Modifier.fillMaxSize()
|
android.view.KeyEvent.KEYCODE_MEDIA_NEXT -> {
|
||||||
)
|
if (forwardingPlayer.hasNextMediaItem()) {
|
||||||
}
|
forwardingPlayer.seekToNextMediaItem()
|
||||||
|
}
|
||||||
// Error overlay
|
true
|
||||||
uiState.error?.let { error ->
|
}
|
||||||
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
android.view.KeyEvent.KEYCODE_MEDIA_PREVIOUS -> {
|
||||||
Text(
|
if (forwardingPlayer.hasPreviousMediaItem()) {
|
||||||
error,
|
forwardingPlayer.seekToPreviousMediaItem()
|
||||||
style = StreamFlowTheme.typography.bodyLarge.copy(color = Color.Red)
|
}
|
||||||
)
|
true
|
||||||
}
|
}
|
||||||
}
|
else -> false
|
||||||
}
|
}
|
||||||
}
|
} else false
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
LaunchedEffect(Unit) {
|
||||||
|
focusRequester.requestFocus()
|
||||||
|
}
|
||||||
|
|
||||||
|
if (uiState.isLoading || uiState.source == null) {
|
||||||
|
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
||||||
|
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||||
|
Text(
|
||||||
|
"Loading stream...",
|
||||||
|
style = StreamFlowTheme.typography.headlineMedium.copy(color = colors.primary)
|
||||||
|
)
|
||||||
|
uiState.movie?.let { movie ->
|
||||||
|
Text(
|
||||||
|
movie.title,
|
||||||
|
style = StreamFlowTheme.typography.bodyLarge,
|
||||||
|
modifier = Modifier.padding(top = 8.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// ExoPlayer View
|
||||||
|
android.util.Log.e("StreamFlowPlayer", "Drawing AndroidView for Player")
|
||||||
|
AndroidView(
|
||||||
|
factory = { ctx ->
|
||||||
|
android.util.Log.e("StreamFlowPlayer", "Creating PlayerView factory")
|
||||||
|
PlayerView(ctx).apply {
|
||||||
|
player = forwardingPlayer
|
||||||
|
useController = true
|
||||||
|
setShowNextButton(true)
|
||||||
|
setShowPreviousButton(true)
|
||||||
|
controllerAutoShow = true
|
||||||
|
keepScreenOn = true // Prevent screen sleep during playback
|
||||||
|
layoutParams = FrameLayout.LayoutParams(
|
||||||
|
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||||
|
ViewGroup.LayoutParams.MATCH_PARENT
|
||||||
|
)
|
||||||
|
playerView = this
|
||||||
|
}
|
||||||
|
},
|
||||||
|
modifier = Modifier.fillMaxSize()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error overlay
|
||||||
|
uiState.error?.let { error ->
|
||||||
|
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
||||||
|
Text(
|
||||||
|
error,
|
||||||
|
style = StreamFlowTheme.typography.bodyLarge.copy(color = Color.Red)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,124 +1,124 @@
|
||||||
package com.streamflow.tv.ui.screens
|
package com.streamflow.tv.ui.screens
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.foundation.text.BasicTextField
|
import androidx.compose.foundation.text.BasicTextField
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.SolidColor
|
import androidx.compose.ui.graphics.SolidColor
|
||||||
import androidx.compose.ui.text.input.TextFieldValue
|
import androidx.compose.ui.text.input.TextFieldValue
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
import androidx.tv.foundation.lazy.grid.TvGridCells
|
import androidx.tv.foundation.lazy.grid.TvGridCells
|
||||||
import androidx.tv.foundation.lazy.grid.TvLazyVerticalGrid
|
import androidx.tv.foundation.lazy.grid.TvLazyVerticalGrid
|
||||||
import androidx.tv.foundation.lazy.grid.items
|
import androidx.tv.foundation.lazy.grid.items
|
||||||
import androidx.tv.material3.*
|
import androidx.tv.material3.*
|
||||||
import com.streamflow.tv.ui.components.MovieCard
|
import com.streamflow.tv.ui.components.MovieCard
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
||||||
import com.streamflow.tv.viewmodel.SearchViewModel
|
import com.streamflow.tv.viewmodel.SearchViewModel
|
||||||
|
|
||||||
@OptIn(ExperimentalTvMaterial3Api::class)
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun SearchScreen(
|
fun SearchScreen(
|
||||||
onMovieClick: (String) -> Unit,
|
onMovieClick: (String) -> Unit,
|
||||||
viewModel: SearchViewModel = viewModel()
|
viewModel: SearchViewModel = viewModel()
|
||||||
) {
|
) {
|
||||||
val uiState by viewModel.uiState.collectAsState()
|
val uiState by viewModel.uiState.collectAsState()
|
||||||
val colors = StreamFlowTheme.colors
|
val colors = StreamFlowTheme.colors
|
||||||
var textValue by remember { mutableStateOf(TextFieldValue("")) }
|
var textValue by remember { mutableStateOf(TextFieldValue("")) }
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.background(colors.background)
|
.background(colors.background)
|
||||||
.padding(horizontal = 48.dp, vertical = 32.dp)
|
.padding(horizontal = 48.dp, vertical = 32.dp)
|
||||||
) {
|
) {
|
||||||
// Search bar
|
// Search bar
|
||||||
Text(
|
Text(
|
||||||
text = "Search",
|
text = "Search",
|
||||||
style = StreamFlowTheme.typography.displayMedium,
|
style = StreamFlowTheme.typography.displayMedium,
|
||||||
modifier = Modifier.padding(bottom = 16.dp)
|
modifier = Modifier.padding(bottom = 16.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.background(colors.surfaceVariant, RoundedCornerShape(12.dp))
|
.background(colors.surfaceVariant, RoundedCornerShape(12.dp))
|
||||||
.padding(horizontal = 16.dp, vertical = 12.dp)
|
.padding(horizontal = 16.dp, vertical = 12.dp)
|
||||||
) {
|
) {
|
||||||
Text("🔍 ", style = StreamFlowTheme.typography.titleMedium)
|
Text("🔍 ", style = StreamFlowTheme.typography.titleMedium)
|
||||||
BasicTextField(
|
BasicTextField(
|
||||||
value = textValue,
|
value = textValue,
|
||||||
onValueChange = {
|
onValueChange = {
|
||||||
textValue = it
|
textValue = it
|
||||||
if (it.text.length >= 2) {
|
if (it.text.length >= 2) {
|
||||||
viewModel.search(it.text)
|
viewModel.search(it.text)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
textStyle = StreamFlowTheme.typography.titleMedium,
|
textStyle = StreamFlowTheme.typography.titleMedium,
|
||||||
cursorBrush = SolidColor(colors.primary),
|
cursorBrush = SolidColor(colors.primary),
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
decorationBox = { innerTextField ->
|
decorationBox = { innerTextField ->
|
||||||
Box {
|
Box {
|
||||||
if (textValue.text.isEmpty()) {
|
if (textValue.text.isEmpty()) {
|
||||||
Text(
|
Text(
|
||||||
"Type to search...",
|
"Type to search...",
|
||||||
style = StreamFlowTheme.typography.titleMedium.copy(
|
style = StreamFlowTheme.typography.titleMedium.copy(
|
||||||
color = Color.White.copy(alpha = 0.3f)
|
color = Color.White.copy(alpha = 0.3f)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
innerTextField()
|
innerTextField()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(Modifier.height(24.dp))
|
Spacer(Modifier.height(24.dp))
|
||||||
|
|
||||||
// Results
|
// Results
|
||||||
when {
|
when {
|
||||||
uiState.isLoading -> {
|
uiState.isLoading -> {
|
||||||
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
||||||
Text("Searching...", style = StreamFlowTheme.typography.bodyLarge.copy(color = colors.primary))
|
Text("Searching...", style = StreamFlowTheme.typography.bodyLarge.copy(color = colors.primary))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uiState.results.isNotEmpty() -> {
|
uiState.results.isNotEmpty() -> {
|
||||||
TvLazyVerticalGrid(
|
TvLazyVerticalGrid(
|
||||||
columns = TvGridCells.Adaptive(180.dp),
|
columns = TvGridCells.Adaptive(180.dp),
|
||||||
contentPadding = PaddingValues(4.dp),
|
contentPadding = PaddingValues(4.dp),
|
||||||
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
||||||
verticalArrangement = Arrangement.spacedBy(16.dp)
|
verticalArrangement = Arrangement.spacedBy(16.dp)
|
||||||
) {
|
) {
|
||||||
items(uiState.results, key = { it.slug }) { movie ->
|
items(uiState.results, key = { it.slug }) { movie ->
|
||||||
MovieCard(
|
MovieCard(
|
||||||
movie = movie,
|
movie = movie,
|
||||||
onClick = { onMovieClick(movie.slug) }
|
onClick = { onMovieClick(movie.slug) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uiState.hasSearched -> {
|
uiState.hasSearched -> {
|
||||||
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
||||||
Text("No results found", style = StreamFlowTheme.typography.bodyLarge)
|
Text("No results found", style = StreamFlowTheme.typography.bodyLarge)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
||||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||||
Text("🎬", style = StreamFlowTheme.typography.displayLarge)
|
Text("🎬", style = StreamFlowTheme.typography.displayLarge)
|
||||||
Text(
|
Text(
|
||||||
"Search for movies and shows",
|
"Search for movies and shows",
|
||||||
style = StreamFlowTheme.typography.bodyLarge,
|
style = StreamFlowTheme.typography.bodyLarge,
|
||||||
modifier = Modifier.padding(top = 12.dp)
|
modifier = Modifier.padding(top = 12.dp)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,171 +1,171 @@
|
||||||
package com.streamflow.tv.ui.screens
|
package com.streamflow.tv.ui.screens
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.foundation.text.BasicTextField
|
import androidx.compose.foundation.text.BasicTextField
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.SolidColor
|
import androidx.compose.ui.graphics.SolidColor
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.text.input.TextFieldValue
|
import androidx.compose.ui.text.input.TextFieldValue
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.tv.material3.*
|
import androidx.tv.material3.*
|
||||||
import com.streamflow.tv.data.api.ApiClient
|
import com.streamflow.tv.data.api.ApiClient
|
||||||
import com.streamflow.tv.data.repository.UserDataRepository
|
import com.streamflow.tv.data.repository.UserDataRepository
|
||||||
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
import com.streamflow.tv.ui.theme.StreamFlowTheme
|
||||||
import kotlinx.coroutines.flow.first
|
import kotlinx.coroutines.flow.first
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
@OptIn(ExperimentalTvMaterial3Api::class)
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun SettingsScreen(
|
fun SettingsScreen(
|
||||||
currentTheme: String,
|
currentTheme: String,
|
||||||
onThemeChange: (String) -> Unit
|
onThemeChange: (String) -> Unit
|
||||||
) {
|
) {
|
||||||
val colors = StreamFlowTheme.colors
|
val colors = StreamFlowTheme.colors
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val scope = rememberCoroutineScope()
|
val scope = rememberCoroutineScope()
|
||||||
val userRepo = remember { UserDataRepository(context) }
|
val userRepo = remember { UserDataRepository(context) }
|
||||||
|
|
||||||
var serverUrl by remember { mutableStateOf(TextFieldValue(ApiClient.baseUrl.removeSuffix("/"))) }
|
var serverUrl by remember { mutableStateOf(TextFieldValue(ApiClient.baseUrl.removeSuffix("/"))) }
|
||||||
|
|
||||||
LaunchedEffect(Unit) {
|
LaunchedEffect(Unit) {
|
||||||
val savedUrl = userRepo.serverUrl.first()
|
val savedUrl = userRepo.serverUrl.first()
|
||||||
serverUrl = TextFieldValue(savedUrl)
|
serverUrl = TextFieldValue(savedUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
val themes = listOf(
|
val themes = listOf(
|
||||||
Triple("default", "StreamFlow", Color(0xFF06B6D4)),
|
Triple("default", "StreamFlow", Color(0xFF06B6D4)),
|
||||||
Triple("netflix", "Netflix", Color(0xFFE50914)),
|
Triple("netflix", "Netflix", Color(0xFFE50914)),
|
||||||
Triple("apple", "Apple TV+", Color(0xFFFFFFFF))
|
Triple("apple", "Apple TV+", Color(0xFFFFFFFF))
|
||||||
)
|
)
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.background(colors.background)
|
.background(colors.background)
|
||||||
.padding(horizontal = 48.dp, vertical = 32.dp)
|
.padding(horizontal = 48.dp, vertical = 32.dp)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "Settings",
|
text = "Settings",
|
||||||
style = StreamFlowTheme.typography.displayMedium,
|
style = StreamFlowTheme.typography.displayMedium,
|
||||||
modifier = Modifier.padding(bottom = 32.dp)
|
modifier = Modifier.padding(bottom = 32.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = "CHOOSE THEME",
|
text = "CHOOSE THEME",
|
||||||
style = StreamFlowTheme.typography.labelSmall.copy(
|
style = StreamFlowTheme.typography.labelSmall.copy(
|
||||||
color = Color.White.copy(alpha = 0.5f)
|
color = Color.White.copy(alpha = 0.5f)
|
||||||
),
|
),
|
||||||
modifier = Modifier.padding(bottom = 12.dp)
|
modifier = Modifier.padding(bottom = 12.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
Row(horizontalArrangement = Arrangement.spacedBy(16.dp)) {
|
Row(horizontalArrangement = Arrangement.spacedBy(16.dp)) {
|
||||||
themes.forEach { (id, name, color) ->
|
themes.forEach { (id, name, color) ->
|
||||||
val isSelected = currentTheme == id
|
val isSelected = currentTheme == id
|
||||||
|
|
||||||
Surface(
|
Surface(
|
||||||
onClick = { onThemeChange(id) },
|
onClick = { onThemeChange(id) },
|
||||||
modifier = Modifier.width(200.dp),
|
modifier = Modifier.width(200.dp),
|
||||||
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(16.dp)),
|
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(16.dp)),
|
||||||
colors = ClickableSurfaceDefaults.colors(
|
colors = ClickableSurfaceDefaults.colors(
|
||||||
containerColor = if (isSelected) Color.White.copy(alpha = 0.1f) else colors.surfaceVariant,
|
containerColor = if (isSelected) Color.White.copy(alpha = 0.1f) else colors.surfaceVariant,
|
||||||
focusedContainerColor = Color.White.copy(alpha = 0.15f)
|
focusedContainerColor = Color.White.copy(alpha = 0.15f)
|
||||||
),
|
),
|
||||||
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.05f)
|
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.05f)
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.padding(20.dp),
|
modifier = Modifier.padding(20.dp),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(48.dp)
|
.size(48.dp)
|
||||||
.background(Color.Black, RoundedCornerShape(12.dp)),
|
.background(Color.Black, RoundedCornerShape(12.dp)),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = name.first().toString(),
|
text = name.first().toString(),
|
||||||
style = StreamFlowTheme.typography.headlineLarge.copy(color = color)
|
style = StreamFlowTheme.typography.headlineLarge.copy(color = color)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(Modifier.height(12.dp))
|
Spacer(Modifier.height(12.dp))
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = name,
|
text = name,
|
||||||
style = StreamFlowTheme.typography.titleMedium
|
style = StreamFlowTheme.typography.titleMedium
|
||||||
)
|
)
|
||||||
|
|
||||||
if (isSelected) {
|
if (isSelected) {
|
||||||
Text(
|
Text(
|
||||||
text = "✓ Active",
|
text = "✓ Active",
|
||||||
style = StreamFlowTheme.typography.labelSmall.copy(
|
style = StreamFlowTheme.typography.labelSmall.copy(
|
||||||
color = Color(0xFF22C55E)
|
color = Color(0xFF22C55E)
|
||||||
),
|
),
|
||||||
modifier = Modifier.padding(top = 4.dp)
|
modifier = Modifier.padding(top = 4.dp)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(Modifier.height(40.dp))
|
Spacer(Modifier.height(40.dp))
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = "SERVER URL",
|
text = "SERVER URL",
|
||||||
style = StreamFlowTheme.typography.labelSmall.copy(
|
style = StreamFlowTheme.typography.labelSmall.copy(
|
||||||
color = Color.White.copy(alpha = 0.5f)
|
color = Color.White.copy(alpha = 0.5f)
|
||||||
),
|
),
|
||||||
modifier = Modifier.padding(bottom = 12.dp)
|
modifier = Modifier.padding(bottom = 12.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.spacedBy(12.dp)
|
horizontalArrangement = Arrangement.spacedBy(12.dp)
|
||||||
) {
|
) {
|
||||||
BasicTextField(
|
BasicTextField(
|
||||||
value = serverUrl,
|
value = serverUrl,
|
||||||
onValueChange = { serverUrl = it },
|
onValueChange = { serverUrl = it },
|
||||||
textStyle = StreamFlowTheme.typography.titleMedium,
|
textStyle = StreamFlowTheme.typography.titleMedium,
|
||||||
cursorBrush = SolidColor(colors.primary),
|
cursorBrush = SolidColor(colors.primary),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.width(400.dp)
|
.width(400.dp)
|
||||||
.background(colors.surfaceVariant, RoundedCornerShape(12.dp))
|
.background(colors.surfaceVariant, RoundedCornerShape(12.dp))
|
||||||
.padding(horizontal = 16.dp, vertical = 12.dp)
|
.padding(horizontal = 16.dp, vertical = 12.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
Surface(
|
Surface(
|
||||||
onClick = {
|
onClick = {
|
||||||
val url = serverUrl.text.trim()
|
val url = serverUrl.text.trim()
|
||||||
ApiClient.baseUrl = url
|
ApiClient.baseUrl = url
|
||||||
scope.launch { userRepo.setServerUrl(url) }
|
scope.launch { userRepo.setServerUrl(url) }
|
||||||
},
|
},
|
||||||
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(8.dp)),
|
shape = ClickableSurfaceDefaults.shape(shape = RoundedCornerShape(8.dp)),
|
||||||
colors = ClickableSurfaceDefaults.colors(
|
colors = ClickableSurfaceDefaults.colors(
|
||||||
containerColor = colors.primary,
|
containerColor = colors.primary,
|
||||||
focusedContainerColor = colors.accent
|
focusedContainerColor = colors.accent
|
||||||
),
|
),
|
||||||
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.05f)
|
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.05f)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
"Save",
|
"Save",
|
||||||
style = StreamFlowTheme.typography.labelLarge.copy(color = Color.White),
|
style = StreamFlowTheme.typography.labelLarge.copy(color = Color.White),
|
||||||
modifier = Modifier.padding(horizontal = 16.dp, vertical = 10.dp)
|
modifier = Modifier.padding(horizontal = 16.dp, vertical = 10.dp)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(Modifier.height(16.dp))
|
Spacer(Modifier.height(16.dp))
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = "Enter the IP address and port of your StreamFlow backend server.",
|
text = "Enter the IP address and port of your StreamFlow backend server.",
|
||||||
style = StreamFlowTheme.typography.bodyMedium,
|
style = StreamFlowTheme.typography.bodyMedium,
|
||||||
modifier = Modifier.widthIn(max = 500.dp)
|
modifier = Modifier.widthIn(max = 500.dp)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,28 @@
|
||||||
package com.streamflow.tv.ui.theme
|
package com.streamflow.tv.ui.theme
|
||||||
|
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
// StreamFlow Default Theme (Cyan/Blue)
|
// StreamFlow Default Theme (Cyan/Blue)
|
||||||
val StreamFlowPrimary = Color(0xFF06B6D4)
|
val StreamFlowPrimary = Color(0xFF06B6D4)
|
||||||
val StreamFlowSecondary = Color(0xFF3B82F6)
|
val StreamFlowSecondary = Color(0xFF3B82F6)
|
||||||
val StreamFlowAccent = Color(0xFF22D3EE)
|
val StreamFlowAccent = Color(0xFF22D3EE)
|
||||||
|
|
||||||
// Netflix Theme (Red)
|
// Netflix Theme (Red)
|
||||||
val NetflixPrimary = Color(0xFFE50914)
|
val NetflixPrimary = Color(0xFFE50914)
|
||||||
val NetflixSecondary = Color(0xFFB81D24)
|
val NetflixSecondary = Color(0xFFB81D24)
|
||||||
val NetflixAccent = Color(0xFFFF3D3D)
|
val NetflixAccent = Color(0xFFFF3D3D)
|
||||||
|
|
||||||
// Apple TV+ Theme (White/Silver)
|
// Apple TV+ Theme (White/Silver)
|
||||||
val ApplePrimary = Color(0xFFFFFFFF)
|
val ApplePrimary = Color(0xFFFFFFFF)
|
||||||
val AppleSecondary = Color(0xFFA1A1AA)
|
val AppleSecondary = Color(0xFFA1A1AA)
|
||||||
val AppleAccent = Color(0xFFD4D4D8)
|
val AppleAccent = Color(0xFFD4D4D8)
|
||||||
|
|
||||||
// Common
|
// Common
|
||||||
val DarkBackground = Color(0xFF141414)
|
val DarkBackground = Color(0xFF141414)
|
||||||
val DarkSurface = Color(0xFF1A1A1A)
|
val DarkSurface = Color(0xFF1A1A1A)
|
||||||
val DarkSurfaceVariant = Color(0xFF262626)
|
val DarkSurfaceVariant = Color(0xFF262626)
|
||||||
val TextPrimary = Color(0xFFFFFFFF)
|
val TextPrimary = Color(0xFFFFFFFF)
|
||||||
val TextSecondary = Color(0xFF9CA3AF)
|
val TextSecondary = Color(0xFF9CA3AF)
|
||||||
val TextMuted = Color(0xFF6B7280)
|
val TextMuted = Color(0xFF6B7280)
|
||||||
val CardBackground = Color(0xFF1E1E1E)
|
val CardBackground = Color(0xFF1E1E1E)
|
||||||
val DividerColor = Color(0x1AFFFFFF)
|
val DividerColor = Color(0x1AFFFFFF)
|
||||||
|
|
|
||||||
|
|
@ -1,65 +1,122 @@
|
||||||
package com.streamflow.tv.ui.theme
|
package com.streamflow.tv.ui.theme
|
||||||
|
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.tv.material3.*
|
||||||
data class StreamFlowColors(
|
|
||||||
val primary: Color,
|
data class StreamFlowColors(
|
||||||
val secondary: Color,
|
val primary: Color,
|
||||||
val accent: Color,
|
val secondary: Color,
|
||||||
val background: Color = DarkBackground,
|
val accent: Color,
|
||||||
val surface: Color = DarkSurface,
|
val background: Color = DarkBackground,
|
||||||
val surfaceVariant: Color = DarkSurfaceVariant,
|
val surface: Color = DarkSurface,
|
||||||
val textPrimary: Color = TextPrimary,
|
val surfaceVariant: Color = DarkSurfaceVariant,
|
||||||
val textSecondary: Color = TextSecondary,
|
val textPrimary: Color = TextPrimary,
|
||||||
val card: Color = CardBackground,
|
val textSecondary: Color = TextSecondary,
|
||||||
val divider: Color = DividerColor
|
val card: Color = CardBackground,
|
||||||
)
|
val divider: Color = DividerColor
|
||||||
|
)
|
||||||
val LocalStreamFlowColors = staticCompositionLocalOf {
|
|
||||||
StreamFlowColors(
|
val LocalStreamFlowColors = staticCompositionLocalOf {
|
||||||
primary = StreamFlowPrimary,
|
StreamFlowColors(
|
||||||
secondary = StreamFlowSecondary,
|
primary = StreamFlowPrimary,
|
||||||
accent = StreamFlowAccent
|
secondary = StreamFlowSecondary,
|
||||||
)
|
accent = StreamFlowAccent
|
||||||
}
|
)
|
||||||
|
}
|
||||||
object StreamFlowTheme {
|
|
||||||
val colors: StreamFlowColors
|
object StreamFlowTheme {
|
||||||
@Composable
|
val colors: StreamFlowColors
|
||||||
@ReadOnlyComposable
|
@Composable
|
||||||
get() = LocalStreamFlowColors.current
|
@ReadOnlyComposable
|
||||||
|
get() = LocalStreamFlowColors.current
|
||||||
val typography = AppTypography
|
|
||||||
}
|
val typography = AppTypography
|
||||||
|
}
|
||||||
fun streamFlowColors(themeName: String): StreamFlowColors {
|
|
||||||
return when (themeName) {
|
fun streamFlowColors(themeName: String): StreamFlowColors {
|
||||||
"netflix" -> StreamFlowColors(
|
return when (themeName) {
|
||||||
primary = NetflixPrimary,
|
"netflix" -> StreamFlowColors(
|
||||||
secondary = NetflixSecondary,
|
primary = NetflixPrimary,
|
||||||
accent = NetflixAccent
|
secondary = NetflixSecondary,
|
||||||
)
|
accent = NetflixAccent
|
||||||
"apple" -> StreamFlowColors(
|
)
|
||||||
primary = ApplePrimary,
|
"apple" -> StreamFlowColors(
|
||||||
secondary = AppleSecondary,
|
primary = ApplePrimary,
|
||||||
accent = AppleAccent
|
secondary = AppleSecondary,
|
||||||
)
|
accent = AppleAccent
|
||||||
else -> StreamFlowColors(
|
)
|
||||||
primary = StreamFlowPrimary,
|
else -> StreamFlowColors(
|
||||||
secondary = StreamFlowSecondary,
|
primary = StreamFlowPrimary,
|
||||||
accent = StreamFlowAccent
|
secondary = StreamFlowSecondary,
|
||||||
)
|
accent = StreamFlowAccent
|
||||||
}
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Composable
|
|
||||||
fun StreamFlowTvTheme(
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
||||||
themeName: String = "default",
|
@Composable
|
||||||
content: @Composable () -> Unit
|
fun StreamFlowTvTheme(
|
||||||
) {
|
themeName: String = "default",
|
||||||
val colors = streamFlowColors(themeName)
|
content: @Composable () -> Unit
|
||||||
CompositionLocalProvider(LocalStreamFlowColors provides colors) {
|
) {
|
||||||
content()
|
val colors = streamFlowColors(themeName)
|
||||||
}
|
|
||||||
}
|
val colorScheme = ColorScheme(
|
||||||
|
primary = colors.primary,
|
||||||
|
onPrimary = Color.White,
|
||||||
|
primaryContainer = colors.primary.copy(alpha = 0.3f),
|
||||||
|
onPrimaryContainer = Color.White,
|
||||||
|
secondary = colors.secondary,
|
||||||
|
onSecondary = Color.White,
|
||||||
|
secondaryContainer = colors.secondary.copy(alpha = 0.3f),
|
||||||
|
onSecondaryContainer = Color.White,
|
||||||
|
tertiary = colors.accent,
|
||||||
|
onTertiary = Color.Black,
|
||||||
|
tertiaryContainer = colors.accent.copy(alpha = 0.3f),
|
||||||
|
onTertiaryContainer = Color.White,
|
||||||
|
background = colors.background,
|
||||||
|
onBackground = Color.White,
|
||||||
|
surface = colors.surface,
|
||||||
|
onSurface = Color.White,
|
||||||
|
surfaceVariant = colors.surfaceVariant,
|
||||||
|
onSurfaceVariant = Color.White,
|
||||||
|
error = Color.Red,
|
||||||
|
onError = Color.White,
|
||||||
|
errorContainer = Color.Red.copy(alpha = 0.1f),
|
||||||
|
onErrorContainer = Color.Red,
|
||||||
|
border = colors.divider,
|
||||||
|
borderVariant = colors.divider,
|
||||||
|
scrim = Color.Black,
|
||||||
|
inverseSurface = Color.White,
|
||||||
|
inverseOnSurface = Color.Black,
|
||||||
|
inversePrimary = colors.primary,
|
||||||
|
surfaceTint = colors.primary
|
||||||
|
)
|
||||||
|
|
||||||
|
val tvTypography = Typography(
|
||||||
|
displayLarge = AppTypography.displayLarge,
|
||||||
|
displayMedium = AppTypography.displayMedium,
|
||||||
|
displaySmall = AppTypography.displayMedium,
|
||||||
|
headlineLarge = AppTypography.headlineLarge,
|
||||||
|
headlineMedium = AppTypography.headlineMedium,
|
||||||
|
headlineSmall = AppTypography.headlineMedium,
|
||||||
|
titleLarge = AppTypography.titleLarge,
|
||||||
|
titleMedium = AppTypography.titleMedium,
|
||||||
|
titleSmall = AppTypography.titleMedium,
|
||||||
|
bodyLarge = AppTypography.bodyLarge,
|
||||||
|
bodyMedium = AppTypography.bodyMedium,
|
||||||
|
bodySmall = AppTypography.bodyMedium,
|
||||||
|
labelLarge = AppTypography.labelLarge,
|
||||||
|
labelMedium = AppTypography.labelLarge,
|
||||||
|
labelSmall = AppTypography.labelSmall
|
||||||
|
)
|
||||||
|
|
||||||
|
CompositionLocalProvider(LocalStreamFlowColors provides colors) {
|
||||||
|
MaterialTheme(
|
||||||
|
colorScheme = colorScheme,
|
||||||
|
typography = tvTypography,
|
||||||
|
content = content
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,59 +1,59 @@
|
||||||
package com.streamflow.tv.ui.theme
|
package com.streamflow.tv.ui.theme
|
||||||
|
|
||||||
import androidx.compose.ui.text.TextStyle
|
import androidx.compose.ui.text.TextStyle
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
|
|
||||||
object AppTypography {
|
object AppTypography {
|
||||||
val displayLarge = TextStyle(
|
val displayLarge = TextStyle(
|
||||||
fontSize = 36.sp,
|
fontSize = 36.sp,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
color = TextPrimary,
|
color = TextPrimary,
|
||||||
letterSpacing = (-0.5).sp
|
letterSpacing = (-0.5).sp
|
||||||
)
|
)
|
||||||
val displayMedium = TextStyle(
|
val displayMedium = TextStyle(
|
||||||
fontSize = 28.sp,
|
fontSize = 28.sp,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
color = TextPrimary
|
color = TextPrimary
|
||||||
)
|
)
|
||||||
val headlineLarge = TextStyle(
|
val headlineLarge = TextStyle(
|
||||||
fontSize = 24.sp,
|
fontSize = 24.sp,
|
||||||
fontWeight = FontWeight.SemiBold,
|
fontWeight = FontWeight.SemiBold,
|
||||||
color = TextPrimary
|
color = TextPrimary
|
||||||
)
|
)
|
||||||
val headlineMedium = TextStyle(
|
val headlineMedium = TextStyle(
|
||||||
fontSize = 20.sp,
|
fontSize = 20.sp,
|
||||||
fontWeight = FontWeight.SemiBold,
|
fontWeight = FontWeight.SemiBold,
|
||||||
color = TextPrimary
|
color = TextPrimary
|
||||||
)
|
)
|
||||||
val titleLarge = TextStyle(
|
val titleLarge = TextStyle(
|
||||||
fontSize = 18.sp,
|
fontSize = 18.sp,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
color = TextPrimary
|
color = TextPrimary
|
||||||
)
|
)
|
||||||
val titleMedium = TextStyle(
|
val titleMedium = TextStyle(
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
color = TextPrimary
|
color = TextPrimary
|
||||||
)
|
)
|
||||||
val bodyLarge = TextStyle(
|
val bodyLarge = TextStyle(
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
fontWeight = FontWeight.Normal,
|
fontWeight = FontWeight.Normal,
|
||||||
color = TextSecondary
|
color = TextSecondary
|
||||||
)
|
)
|
||||||
val bodyMedium = TextStyle(
|
val bodyMedium = TextStyle(
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
fontWeight = FontWeight.Normal,
|
fontWeight = FontWeight.Normal,
|
||||||
color = TextSecondary
|
color = TextSecondary
|
||||||
)
|
)
|
||||||
val labelLarge = TextStyle(
|
val labelLarge = TextStyle(
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
color = TextPrimary
|
color = TextPrimary
|
||||||
)
|
)
|
||||||
val labelSmall = TextStyle(
|
val labelSmall = TextStyle(
|
||||||
fontSize = 12.sp,
|
fontSize = 12.sp,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
color = TextMuted
|
color = TextMuted
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,45 @@
|
||||||
package com.streamflow.tv.viewmodel
|
package com.streamflow.tv.viewmodel
|
||||||
|
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.streamflow.tv.data.model.MovieDetail
|
import com.streamflow.tv.data.model.MovieDetail
|
||||||
import com.streamflow.tv.data.repository.MovieRepository
|
import com.streamflow.tv.data.repository.MovieRepository
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
data class DetailUiState(
|
data class DetailUiState(
|
||||||
val movie: MovieDetail? = null,
|
val movie: MovieDetail? = null,
|
||||||
val isLoading: Boolean = true,
|
val isLoading: Boolean = true,
|
||||||
val error: String? = null,
|
val error: String? = null,
|
||||||
val isInMyList: Boolean = false
|
val isInMyList: Boolean = false
|
||||||
)
|
)
|
||||||
|
|
||||||
class DetailViewModel : ViewModel() {
|
class DetailViewModel : ViewModel() {
|
||||||
|
|
||||||
private val repository = MovieRepository()
|
private val repository = MovieRepository()
|
||||||
private val _uiState = MutableStateFlow(DetailUiState())
|
private val _uiState = MutableStateFlow(DetailUiState())
|
||||||
val uiState: StateFlow<DetailUiState> = _uiState
|
val uiState: StateFlow<DetailUiState> = _uiState
|
||||||
|
|
||||||
fun loadMovie(slug: String) {
|
fun loadMovie(slug: String) {
|
||||||
android.util.Log.e("DetailVM", "loadMovie($slug) called")
|
android.util.Log.e("DetailVM", "loadMovie($slug) called")
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
_uiState.value = DetailUiState(isLoading = true)
|
_uiState.value = DetailUiState(isLoading = true)
|
||||||
try {
|
try {
|
||||||
val movie = repository.getMovieDetail(slug)
|
val movie = repository.getMovieDetail(slug)
|
||||||
android.util.Log.e("DetailVM", "loadMovie success: ${movie.title}, episodes: ${movie.episodes?.size}")
|
android.util.Log.e("DetailVM", "loadMovie success: ${movie.title}, episodes: ${movie.episodes?.size}")
|
||||||
_uiState.value = DetailUiState(movie = movie, isLoading = false)
|
_uiState.value = DetailUiState(movie = movie, isLoading = false)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
android.util.Log.e("DetailVM", "loadMovie failed", e)
|
android.util.Log.e("DetailVM", "loadMovie failed", e)
|
||||||
_uiState.value = DetailUiState(
|
_uiState.value = DetailUiState(
|
||||||
isLoading = false,
|
isLoading = false,
|
||||||
error = e.message ?: "Failed to load movie details"
|
error = e.message ?: "Failed to load movie details"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun toggleMyList(isInList: Boolean) {
|
fun toggleMyList(isInList: Boolean) {
|
||||||
_uiState.value = _uiState.value.copy(isInMyList = !isInList)
|
_uiState.value = _uiState.value.copy(isInMyList = !isInList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,144 +1,110 @@
|
||||||
package com.streamflow.tv.viewmodel
|
package com.streamflow.tv.viewmodel
|
||||||
|
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.streamflow.tv.data.model.Movie
|
import com.streamflow.tv.data.model.Movie
|
||||||
import com.streamflow.tv.data.repository.MovieRepository
|
import com.streamflow.tv.data.repository.MovieRepository
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
import kotlinx.coroutines.flow.first
|
import kotlinx.coroutines.flow.first
|
||||||
import kotlinx.coroutines.async
|
import kotlinx.coroutines.async
|
||||||
import kotlinx.coroutines.awaitAll
|
import kotlinx.coroutines.awaitAll
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
data class HomeUiState(
|
data class HomeUiState(
|
||||||
val heroMovies: List<Movie> = emptyList(),
|
val heroMovies: List<Movie> = emptyList(),
|
||||||
val watchedMovies: List<Movie> = emptyList(),
|
val watchedMovies: List<Movie> = emptyList(),
|
||||||
val recommendedMovies: List<Movie> = emptyList(),
|
val recommendedMovies: List<Movie> = emptyList(),
|
||||||
val categoryMovies: Map<String, List<Movie>> = emptyMap(),
|
val categoryMovies: Map<String, List<Movie>> = emptyMap(),
|
||||||
val isLoading: Boolean = true,
|
val isLoading: Boolean = true,
|
||||||
val error: String? = null,
|
val error: String? = null,
|
||||||
val currentCategory: String? = null
|
val currentCategory: String? = null
|
||||||
)
|
)
|
||||||
|
|
||||||
class HomeViewModel : ViewModel() {
|
class HomeViewModel : ViewModel() {
|
||||||
|
|
||||||
private val repository = MovieRepository()
|
private val repository = MovieRepository()
|
||||||
private val _uiState = MutableStateFlow(HomeUiState())
|
private val _uiState = MutableStateFlow(HomeUiState())
|
||||||
val uiState: StateFlow<HomeUiState> = _uiState
|
val uiState: StateFlow<HomeUiState> = _uiState
|
||||||
|
|
||||||
private var userDataRepository: com.streamflow.tv.data.repository.UserDataRepository? = null
|
private var userDataRepository: com.streamflow.tv.data.repository.UserDataRepository? = null
|
||||||
|
|
||||||
private val categories = listOf(
|
private val categories = listOf(
|
||||||
"phim-le" to "Phim Lẻ",
|
"phim-le" to "Phim Lẻ",
|
||||||
"phim-bo" to "Phim Bộ",
|
"phim-bo" to "Phim Bộ",
|
||||||
"hoat-hinh" to "Hoạt Hình",
|
"hoat-hinh" to "Hoạt Hình",
|
||||||
"tv-shows" to "TV Shows"
|
"tv-shows" to "TV Shows"
|
||||||
)
|
)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
loadHome()
|
loadHome()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun loadHome(
|
fun loadHome(
|
||||||
category: String? = null,
|
category: String? = null,
|
||||||
userRepo: com.streamflow.tv.data.repository.UserDataRepository? = null
|
userRepo: com.streamflow.tv.data.repository.UserDataRepository? = null
|
||||||
) {
|
) {
|
||||||
if (userRepo != null) {
|
if (userRepo != null) {
|
||||||
this.userDataRepository = userRepo
|
this.userDataRepository = userRepo
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
_uiState.value = _uiState.value.copy(isLoading = true, error = null, currentCategory = category)
|
_uiState.value = _uiState.value.copy(isLoading = true, error = null, currentCategory = category)
|
||||||
try {
|
try {
|
||||||
// Load history if repository is available
|
// Load history if repository is available
|
||||||
val history = userRepo?.watchHistory?.first() ?: emptyList()
|
val history = userRepo?.watchHistory?.first() ?: emptyList()
|
||||||
|
|
||||||
if (category != null) {
|
if (category != null) {
|
||||||
// Load single category
|
// Load single category
|
||||||
val response = repository.getHomeVideos(category)
|
val response = repository.getHomeVideos(category)
|
||||||
_uiState.value = _uiState.value.copy(
|
_uiState.value = _uiState.value.copy(
|
||||||
heroMovies = response.items.take(5),
|
heroMovies = response.items.take(5),
|
||||||
watchedMovies = history,
|
watchedMovies = history,
|
||||||
recommendedMovies = response.items.filter { m -> history.none { it.slug == m.slug } }.shuffled().take(10),
|
recommendedMovies = response.items.filter { m -> history.none { it.slug == m.slug } }.shuffled().take(10),
|
||||||
categoryMovies = mapOf(
|
categoryMovies = mapOf(
|
||||||
categories.find { it.first == category }?.second.orEmpty() to response.items
|
categories.find { it.first == category }?.second.orEmpty() to response.items
|
||||||
),
|
),
|
||||||
isLoading = false
|
isLoading = false
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
// Load all categories for home
|
// Load all categories for home
|
||||||
val allMovies = java.util.Collections.synchronizedMap(mutableMapOf<String, List<Movie>>())
|
val allMovies = java.util.Collections.synchronizedMap(mutableMapOf<String, List<Movie>>())
|
||||||
val allFlattened = java.util.Collections.synchronizedList(mutableListOf<Movie>())
|
val allFlattened = java.util.Collections.synchronizedList(mutableListOf<Movie>())
|
||||||
|
|
||||||
kotlinx.coroutines.coroutineScope {
|
kotlinx.coroutines.coroutineScope {
|
||||||
// 1. Initial categories
|
// Load main categories only (to avoid OOM on TV devices)
|
||||||
val categoryTasks = categories.map { (slug, name) ->
|
val categoryTasks = categories.map { (slug, name) ->
|
||||||
async {
|
async {
|
||||||
try {
|
try {
|
||||||
val response = repository.getHomeVideos(slug)
|
val response = repository.getHomeVideos(slug)
|
||||||
allMovies[name] = response.items
|
allMovies[name] = response.items.take(15)
|
||||||
allFlattened.addAll(response.items)
|
allFlattened.addAll(response.items.take(15))
|
||||||
response.items
|
response.items
|
||||||
} catch (_: Exception) { emptyList<Movie>() }
|
} catch (_: Exception) { emptyList<Movie>() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. Fetch Genres & Countries metadata in parallel
|
// Wait for categories
|
||||||
val genresDeferred = async { try { repository.getGenres().take(8) } catch (_: Exception) { emptyList() } }
|
categoryTasks.awaitAll()
|
||||||
val countriesDeferred = async { try { repository.getCountries().take(5) } catch (_: Exception) { emptyList() } }
|
}
|
||||||
|
|
||||||
val genres = genresDeferred.await()
|
val heroItems = allMovies[categories.first().second]?.take(5) ?: emptyList()
|
||||||
val countries = countriesDeferred.await()
|
|
||||||
|
_uiState.value = _uiState.value.copy(
|
||||||
// 3. Fetch Genre and Country content in parallel
|
heroMovies = heroItems,
|
||||||
val genreTasks = genres.map { genre ->
|
watchedMovies = history,
|
||||||
async {
|
recommendedMovies = allFlattened.filter { m -> history.none { it.slug == m.slug } }
|
||||||
try {
|
.distinctBy { it.slug }.shuffled().take(15),
|
||||||
val response = repository.getHomeVideos(genre.slug)
|
categoryMovies = allMovies.toMap(),
|
||||||
if (response.items.isNotEmpty()) {
|
isLoading = false
|
||||||
allMovies["Genre: ${genre.name}"] = response.items
|
)
|
||||||
allFlattened.addAll(response.items)
|
}
|
||||||
}
|
} catch (e: Exception) {
|
||||||
} catch (_: Exception) { }
|
_uiState.value = _uiState.value.copy(
|
||||||
}
|
isLoading = false,
|
||||||
}
|
error = e.message ?: "Failed to load content"
|
||||||
|
)
|
||||||
val countryTasks = countries.map { country ->
|
}
|
||||||
async {
|
}
|
||||||
try {
|
}
|
||||||
val response = repository.getHomeVideos(country.slug)
|
}
|
||||||
if (response.items.isNotEmpty()) {
|
|
||||||
allMovies["Country: ${country.name}"] = response.items
|
|
||||||
allFlattened.addAll(response.items)
|
|
||||||
}
|
|
||||||
} catch (_: Exception) { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wait for everything
|
|
||||||
categoryTasks.awaitAll()
|
|
||||||
genreTasks.awaitAll()
|
|
||||||
countryTasks.awaitAll()
|
|
||||||
}
|
|
||||||
|
|
||||||
val heroItems = allMovies[categories.first().second]?.take(5) ?: emptyList()
|
|
||||||
|
|
||||||
_uiState.value = _uiState.value.copy(
|
|
||||||
heroMovies = heroItems,
|
|
||||||
watchedMovies = history,
|
|
||||||
recommendedMovies = allFlattened.filter { m -> history.none { it.slug == m.slug } }
|
|
||||||
.distinctBy { it.slug }.shuffled().take(15),
|
|
||||||
categoryMovies = allMovies.toMap(),
|
|
||||||
isLoading = false
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} catch (e: Exception) {
|
|
||||||
_uiState.value = _uiState.value.copy(
|
|
||||||
isLoading = false,
|
|
||||||
error = e.message ?: "Failed to load content"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,48 +1,48 @@
|
||||||
package com.streamflow.tv.viewmodel
|
package com.streamflow.tv.viewmodel
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import androidx.lifecycle.AndroidViewModel
|
import androidx.lifecycle.AndroidViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.streamflow.tv.data.model.Movie
|
import com.streamflow.tv.data.model.Movie
|
||||||
import com.streamflow.tv.data.repository.UserDataRepository
|
import com.streamflow.tv.data.repository.UserDataRepository
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
import kotlinx.coroutines.flow.collectLatest
|
import kotlinx.coroutines.flow.collectLatest
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
data class MyListUiState(
|
data class MyListUiState(
|
||||||
val savedMovies: List<Movie> = emptyList(),
|
val savedMovies: List<Movie> = emptyList(),
|
||||||
val watchHistory: List<Movie> = emptyList()
|
val watchHistory: List<Movie> = emptyList()
|
||||||
)
|
)
|
||||||
|
|
||||||
class MyListViewModel(application: Application) : AndroidViewModel(application) {
|
class MyListViewModel(application: Application) : AndroidViewModel(application) {
|
||||||
|
|
||||||
private val userRepo = UserDataRepository(application)
|
private val userRepo = UserDataRepository(application)
|
||||||
private val _uiState = MutableStateFlow(MyListUiState())
|
private val _uiState = MutableStateFlow(MyListUiState())
|
||||||
val uiState: StateFlow<MyListUiState> = _uiState
|
val uiState: StateFlow<MyListUiState> = _uiState
|
||||||
|
|
||||||
init {
|
init {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
userRepo.myList.collectLatest { list ->
|
userRepo.myList.collectLatest { list ->
|
||||||
_uiState.value = _uiState.value.copy(savedMovies = list)
|
_uiState.value = _uiState.value.copy(savedMovies = list)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
userRepo.watchHistory.collectLatest { history ->
|
userRepo.watchHistory.collectLatest { history ->
|
||||||
_uiState.value = _uiState.value.copy(watchHistory = history)
|
_uiState.value = _uiState.value.copy(watchHistory = history)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun addToMyList(movie: Movie) {
|
fun addToMyList(movie: Movie) {
|
||||||
viewModelScope.launch { userRepo.addToMyList(movie) }
|
viewModelScope.launch { userRepo.addToMyList(movie) }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun removeFromMyList(slug: String) {
|
fun removeFromMyList(slug: String) {
|
||||||
viewModelScope.launch { userRepo.removeFromMyList(slug) }
|
viewModelScope.launch { userRepo.removeFromMyList(slug) }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun addToHistory(movie: Movie) {
|
fun addToHistory(movie: Movie) {
|
||||||
viewModelScope.launch { userRepo.addToHistory(movie) }
|
viewModelScope.launch { userRepo.addToHistory(movie) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,96 +1,100 @@
|
||||||
package com.streamflow.tv.viewmodel
|
package com.streamflow.tv.viewmodel
|
||||||
|
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.streamflow.tv.data.model.MovieDetail
|
import com.streamflow.tv.data.model.MovieDetail
|
||||||
import com.streamflow.tv.data.model.VideoSource
|
import com.streamflow.tv.data.model.VideoSource
|
||||||
import com.streamflow.tv.data.repository.MovieRepository
|
import com.streamflow.tv.data.repository.MovieRepository
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
data class PlayerUiState(
|
data class PlayerUiState(
|
||||||
val movie: MovieDetail? = null,
|
val movie: MovieDetail? = null,
|
||||||
val source: VideoSource? = null,
|
val source: VideoSource? = null,
|
||||||
val currentEpisode: Int = 1,
|
val currentEpisode: Int = 1,
|
||||||
val isLoading: Boolean = true,
|
val isLoading: Boolean = true,
|
||||||
val error: String? = null
|
val error: String? = null
|
||||||
)
|
)
|
||||||
|
|
||||||
class PlayerViewModel : ViewModel() {
|
class PlayerViewModel : ViewModel() {
|
||||||
|
|
||||||
private val repository = MovieRepository()
|
private val repository = MovieRepository()
|
||||||
private val _uiState = MutableStateFlow(PlayerUiState())
|
private val _uiState = MutableStateFlow(PlayerUiState())
|
||||||
val uiState: StateFlow<PlayerUiState> = _uiState
|
val uiState: StateFlow<PlayerUiState> = _uiState
|
||||||
|
|
||||||
fun loadPlayer(slug: String, episode: Int = 1) {
|
fun loadPlayer(slug: String, episode: Int = 1) {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
_uiState.value = PlayerUiState(isLoading = true, currentEpisode = episode)
|
_uiState.value = PlayerUiState(isLoading = true, currentEpisode = episode)
|
||||||
try {
|
try {
|
||||||
val movie = repository.getMovieDetail(slug)
|
val movie = repository.getMovieDetail(slug)
|
||||||
_uiState.value = _uiState.value.copy(movie = movie)
|
_uiState.value = _uiState.value.copy(movie = movie)
|
||||||
loadStream(movie, episode)
|
loadStream(movie, episode)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
_uiState.value = _uiState.value.copy(
|
_uiState.value = _uiState.value.copy(
|
||||||
isLoading = false,
|
isLoading = false,
|
||||||
error = e.message ?: "Failed to load"
|
error = e.message ?: "Failed to load"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun changeEpisode(episode: Int) {
|
fun changeEpisode(episode: Int) {
|
||||||
val movie = _uiState.value.movie ?: return
|
val movie = _uiState.value.movie ?: return
|
||||||
_uiState.value = _uiState.value.copy(currentEpisode = episode, isLoading = true, source = null)
|
_uiState.value = _uiState.value.copy(currentEpisode = episode, isLoading = true, source = null)
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
loadStream(movie, episode)
|
loadStream(movie, episode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun saveToHistory(userDataRepository: com.streamflow.tv.data.repository.UserDataRepository) {
|
fun saveToHistory(userDataRepository: com.streamflow.tv.data.repository.UserDataRepository) {
|
||||||
val movie = _uiState.value.movie ?: return
|
val movie = _uiState.value.movie ?: return
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
userDataRepository.addToHistory(movie.toMovie())
|
userDataRepository.addToHistory(movie.toMovie())
|
||||||
android.util.Log.e("PlayerViewModel", "Movie saved to history: ${movie.title}")
|
android.util.Log.e("PlayerViewModel", "Movie saved to history: ${movie.title}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun loadStream(movie: MovieDetail, episode: Int) {
|
private suspend fun loadStream(movie: MovieDetail, episode: Int) {
|
||||||
try {
|
try {
|
||||||
val ep = movie.episodes?.find { it.number == episode }
|
val ep = movie.episodes?.find { it.number == episode }
|
||||||
android.util.Log.e("PlayerViewModel", "Loading stream for slug=${movie.slug} episode=$episode. Episode data: $ep")
|
android.util.Log.e("PlayerViewModel", "Loading stream for slug=${movie.slug} episode=$episode. Episode data: $ep")
|
||||||
|
|
||||||
if (ep != null && (ep.url.contains(".m3u8") || ep.url.contains("index.m3u8"))) {
|
if (ep != null && (ep.url.contains(".m3u8") || ep.url.contains("index.m3u8"))) {
|
||||||
// Direct HLS URL
|
// Direct HLS URL
|
||||||
android.util.Log.e("PlayerViewModel", "Direct HLS URL found: ${ep.url}")
|
android.util.Log.e("PlayerViewModel", "Direct HLS URL found: ${ep.url}")
|
||||||
_uiState.value = _uiState.value.copy(
|
_uiState.value = _uiState.value.copy(
|
||||||
source = VideoSource(
|
source = VideoSource(
|
||||||
streamUrl = ep.url,
|
streamUrl = ep.url,
|
||||||
resolution = "HD",
|
resolution = "HD",
|
||||||
formatId = "hls"
|
formatId = "hls"
|
||||||
),
|
),
|
||||||
isLoading = false
|
isLoading = false
|
||||||
)
|
)
|
||||||
} else {
|
} else if (ep != null && ep.url.isNotEmpty()) {
|
||||||
// Need to extract
|
// Non-HLS URL — try to extract via backend
|
||||||
val targetUrl = ep?.url
|
android.util.Log.e("PlayerViewModel", "Extracting from URL: ${ep.url}")
|
||||||
?: "https://phimmoichill.network/xem-phim/${movie.slug}/tap-$episode"
|
val source = repository.extractVideo(ep.url)
|
||||||
|
android.util.Log.e("PlayerViewModel", "Extraction successful: $source")
|
||||||
android.util.Log.e("PlayerViewModel", "Extracting from URL: $targetUrl")
|
|
||||||
val source = repository.extractVideo(targetUrl)
|
_uiState.value = _uiState.value.copy(
|
||||||
android.util.Log.e("PlayerViewModel", "Extraction successful: $source")
|
source = source,
|
||||||
|
isLoading = false
|
||||||
_uiState.value = _uiState.value.copy(
|
)
|
||||||
source = source,
|
} else {
|
||||||
isLoading = false
|
// No valid episode URL found
|
||||||
)
|
android.util.Log.e("PlayerViewModel", "No stream URL found for episode $episode")
|
||||||
}
|
_uiState.value = _uiState.value.copy(
|
||||||
} catch (e: Exception) {
|
isLoading = false,
|
||||||
android.util.Log.e("PlayerViewModel", "Error loading stream", e)
|
error = "No stream available for episode $episode"
|
||||||
_uiState.value = _uiState.value.copy(
|
)
|
||||||
isLoading = false,
|
}
|
||||||
error = e.message ?: "Failed to extract stream"
|
} catch (e: Exception) {
|
||||||
)
|
android.util.Log.e("PlayerViewModel", "Error loading stream", e)
|
||||||
}
|
_uiState.value = _uiState.value.copy(
|
||||||
}
|
isLoading = false,
|
||||||
}
|
error = e.message ?: "Failed to extract stream"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,39 +1,39 @@
|
||||||
package com.streamflow.tv.viewmodel
|
package com.streamflow.tv.viewmodel
|
||||||
|
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.streamflow.tv.data.model.Movie
|
import com.streamflow.tv.data.model.Movie
|
||||||
import com.streamflow.tv.data.repository.MovieRepository
|
import com.streamflow.tv.data.repository.MovieRepository
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
data class SearchUiState(
|
data class SearchUiState(
|
||||||
val query: String = "",
|
val query: String = "",
|
||||||
val results: List<Movie> = emptyList(),
|
val results: List<Movie> = emptyList(),
|
||||||
val isLoading: Boolean = false,
|
val isLoading: Boolean = false,
|
||||||
val hasSearched: Boolean = false
|
val hasSearched: Boolean = false
|
||||||
)
|
)
|
||||||
|
|
||||||
class SearchViewModel : ViewModel() {
|
class SearchViewModel : ViewModel() {
|
||||||
|
|
||||||
private val repository = MovieRepository()
|
private val repository = MovieRepository()
|
||||||
private val _uiState = MutableStateFlow(SearchUiState())
|
private val _uiState = MutableStateFlow(SearchUiState())
|
||||||
val uiState: StateFlow<SearchUiState> = _uiState
|
val uiState: StateFlow<SearchUiState> = _uiState
|
||||||
|
|
||||||
fun search(query: String) {
|
fun search(query: String) {
|
||||||
if (query.isBlank()) return
|
if (query.isBlank()) return
|
||||||
_uiState.value = SearchUiState(query = query, isLoading = true, hasSearched = true)
|
_uiState.value = SearchUiState(query = query, isLoading = true, hasSearched = true)
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
try {
|
try {
|
||||||
val response = repository.searchVideos(query)
|
val response = repository.searchVideos(query)
|
||||||
_uiState.value = _uiState.value.copy(
|
_uiState.value = _uiState.value.copy(
|
||||||
results = response.items,
|
results = response.items,
|
||||||
isLoading = false
|
isLoading = false
|
||||||
)
|
)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
_uiState.value = _uiState.value.copy(isLoading = false)
|
_uiState.value = _uiState.value.copy(isLoading = false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,33 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="320dp"
|
android:width="320dp"
|
||||||
android:height="180dp"
|
android:height="180dp"
|
||||||
android:viewportWidth="320"
|
android:viewportWidth="320"
|
||||||
android:viewportHeight="180">
|
android:viewportHeight="180">
|
||||||
|
|
||||||
<!-- Background -->
|
<!-- Background -->
|
||||||
<path
|
<path
|
||||||
android:pathData="M0,0h320v180H0z"
|
android:pathData="M0,0h320v180H0z"
|
||||||
android:fillColor="#141414"/>
|
android:fillColor="#141414"/>
|
||||||
|
|
||||||
<!-- Gradient accent bar -->
|
<!-- Gradient accent bar -->
|
||||||
<path
|
<path
|
||||||
android:pathData="M0,160h320v20H0z"
|
android:pathData="M0,160h320v20H0z"
|
||||||
android:fillColor="#06B6D4"/>
|
android:fillColor="#06B6D4"/>
|
||||||
|
|
||||||
<!-- Icon circle -->
|
<!-- Icon circle -->
|
||||||
<path
|
<path
|
||||||
android:pathData="M160,75m-30,0a30,30 0,1 1,60 0a30,30 0,1 1,-60 0"
|
android:pathData="M160,75m-30,0a30,30 0,1 1,60 0a30,30 0,1 1,-60 0"
|
||||||
android:fillColor="#06B6D4"/>
|
android:fillColor="#06B6D4"/>
|
||||||
|
|
||||||
<!-- Play triangle -->
|
<!-- Play triangle -->
|
||||||
<path
|
<path
|
||||||
android:pathData="M152,60L172,75L152,90z"
|
android:pathData="M152,60L172,75L152,90z"
|
||||||
android:fillColor="#FFFFFF"/>
|
android:fillColor="#FFFFFF"/>
|
||||||
|
|
||||||
<!-- Text: StreamFlow -->
|
<!-- Text: StreamFlow -->
|
||||||
<path
|
<path
|
||||||
android:pathData="M95,130h130"
|
android:pathData="M95,130h130"
|
||||||
android:strokeColor="#FFFFFF"
|
android:strokeColor="#FFFFFF"
|
||||||
android:strokeWidth="0.5"/>
|
android:strokeWidth="0.5"/>
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="48dp"
|
android:width="48dp"
|
||||||
android:height="48dp"
|
android:height="48dp"
|
||||||
android:viewportWidth="48"
|
android:viewportWidth="48"
|
||||||
android:viewportHeight="48">
|
android:viewportHeight="48">
|
||||||
|
|
||||||
<!-- Background rounded rect -->
|
<!-- Background rounded rect -->
|
||||||
<path
|
<path
|
||||||
android:pathData="M8,0h32a8,8 0,0 1,8 8v32a8,8 0,0 1,-8 8H8A8,8 0,0 1,0 40V8A8,8 0,0 1,8 0z"
|
android:pathData="M8,0h32a8,8 0,0 1,8 8v32a8,8 0,0 1,-8 8H8A8,8 0,0 1,0 40V8A8,8 0,0 1,8 0z"
|
||||||
android:fillColor="#06B6D4"/>
|
android:fillColor="#06B6D4"/>
|
||||||
|
|
||||||
<!-- Play triangle -->
|
<!-- Play triangle -->
|
||||||
<path
|
<path
|
||||||
android:pathData="M18,12L36,24L18,36z"
|
android:pathData="M18,12L36,24L18,36z"
|
||||||
android:fillColor="#FFFFFF"/>
|
android:fillColor="#FFFFFF"/>
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">StreamFlow</string>
|
<string name="app_name">StreamFlow</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<style name="Theme.StreamFlowTV" parent="@style/Theme.Leanback">
|
<style name="Theme.StreamFlowTV" parent="@style/Theme.Leanback">
|
||||||
<item name="android:windowIsTranslucent">true</item>
|
<item name="android:windowIsTranslucent">true</item>
|
||||||
<item name="android:windowBackground">@android:color/transparent</item>
|
<item name="android:windowBackground">@android:color/transparent</item>
|
||||||
<item name="android:backgroundDimEnabled">false</item>
|
<item name="android:backgroundDimEnabled">false</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.2.2" apply false
|
id("com.android.application") version "8.2.2" apply false
|
||||||
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
|
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,35 @@
|
||||||
> Task :app:checkKotlinGradlePluginConfigurationErrors
|
> Task :app:checkKotlinGradlePluginConfigurationErrors
|
||||||
> Task :app:preBuild UP-TO-DATE
|
> Task :app:preBuild UP-TO-DATE
|
||||||
> Task :app:preDebugBuild UP-TO-DATE
|
> Task :app:preDebugBuild UP-TO-DATE
|
||||||
> Task :app:checkDebugAarMetadata UP-TO-DATE
|
> Task :app:checkDebugAarMetadata UP-TO-DATE
|
||||||
> Task :app:generateDebugResValues UP-TO-DATE
|
> Task :app:generateDebugResValues UP-TO-DATE
|
||||||
> Task :app:mapDebugSourceSetPaths UP-TO-DATE
|
> Task :app:mapDebugSourceSetPaths UP-TO-DATE
|
||||||
> Task :app:generateDebugResources UP-TO-DATE
|
> Task :app:generateDebugResources UP-TO-DATE
|
||||||
> Task :app:mergeDebugResources UP-TO-DATE
|
> Task :app:mergeDebugResources UP-TO-DATE
|
||||||
> Task :app:packageDebugResources UP-TO-DATE
|
> Task :app:packageDebugResources UP-TO-DATE
|
||||||
> Task :app:parseDebugLocalResources UP-TO-DATE
|
> Task :app:parseDebugLocalResources UP-TO-DATE
|
||||||
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
|
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
|
||||||
> Task :app:extractDeepLinksDebug UP-TO-DATE
|
> Task :app:extractDeepLinksDebug UP-TO-DATE
|
||||||
> Task :app:processDebugMainManifest UP-TO-DATE
|
> Task :app:processDebugMainManifest UP-TO-DATE
|
||||||
> Task :app:processDebugManifest UP-TO-DATE
|
> Task :app:processDebugManifest UP-TO-DATE
|
||||||
> Task :app:processDebugManifestForPackage UP-TO-DATE
|
> Task :app:processDebugManifestForPackage UP-TO-DATE
|
||||||
> Task :app:processDebugResources UP-TO-DATE
|
> Task :app:processDebugResources UP-TO-DATE
|
||||||
|
|
||||||
> Task :app:compileDebugKotlin FAILED
|
> Task :app:compileDebugKotlin FAILED
|
||||||
e: file:///C:/Users/Admin/Documents/Streamflow/android-tv/app/src/main/java/com/streamflow/tv/ui/screens/DetailScreen.kt:120:56 Unresolved reference: accent
|
e: file:///C:/Users/Admin/Documents/Streamflow/android-tv/app/src/main/java/com/streamflow/tv/ui/screens/DetailScreen.kt:120:56 Unresolved reference: accent
|
||||||
|
|
||||||
FAILURE: Build failed with an exception.
|
FAILURE: Build failed with an exception.
|
||||||
|
|
||||||
* What went wrong:
|
* What went wrong:
|
||||||
Execution failed for task ':app:compileDebugKotlin'.
|
Execution failed for task ':app:compileDebugKotlin'.
|
||||||
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
|
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
|
||||||
> Compilation error. See log for more details
|
> Compilation error. See log for more details
|
||||||
|
|
||||||
* Try:
|
* Try:
|
||||||
> Run with --stacktrace option to get the stack trace.
|
> Run with --stacktrace option to get the stack trace.
|
||||||
> Run with --info or --debug option to get more log output.
|
> Run with --info or --debug option to get more log output.
|
||||||
> Run with --scan to get full insights.
|
> Run with --scan to get full insights.
|
||||||
> Get more help at https://help.gradle.org.
|
> Get more help at https://help.gradle.org.
|
||||||
|
|
||||||
BUILD FAILED in 3s
|
BUILD FAILED in 3s
|
||||||
14 actionable tasks: 2 executed, 12 up-to-date
|
14 actionable tasks: 2 executed, 12 up-to-date
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,35 @@
|
||||||
> Task :app:checkKotlinGradlePluginConfigurationErrors
|
> Task :app:checkKotlinGradlePluginConfigurationErrors
|
||||||
> Task :app:preBuild UP-TO-DATE
|
> Task :app:preBuild UP-TO-DATE
|
||||||
> Task :app:preDebugBuild UP-TO-DATE
|
> Task :app:preDebugBuild UP-TO-DATE
|
||||||
> Task :app:checkDebugAarMetadata UP-TO-DATE
|
> Task :app:checkDebugAarMetadata UP-TO-DATE
|
||||||
> Task :app:generateDebugResValues UP-TO-DATE
|
> Task :app:generateDebugResValues UP-TO-DATE
|
||||||
> Task :app:mapDebugSourceSetPaths UP-TO-DATE
|
> Task :app:mapDebugSourceSetPaths UP-TO-DATE
|
||||||
> Task :app:generateDebugResources UP-TO-DATE
|
> Task :app:generateDebugResources UP-TO-DATE
|
||||||
> Task :app:mergeDebugResources UP-TO-DATE
|
> Task :app:mergeDebugResources UP-TO-DATE
|
||||||
> Task :app:packageDebugResources UP-TO-DATE
|
> Task :app:packageDebugResources UP-TO-DATE
|
||||||
> Task :app:parseDebugLocalResources UP-TO-DATE
|
> Task :app:parseDebugLocalResources UP-TO-DATE
|
||||||
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
|
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
|
||||||
> Task :app:extractDeepLinksDebug UP-TO-DATE
|
> Task :app:extractDeepLinksDebug UP-TO-DATE
|
||||||
> Task :app:processDebugMainManifest UP-TO-DATE
|
> Task :app:processDebugMainManifest UP-TO-DATE
|
||||||
> Task :app:processDebugManifest UP-TO-DATE
|
> Task :app:processDebugManifest UP-TO-DATE
|
||||||
> Task :app:processDebugManifestForPackage UP-TO-DATE
|
> Task :app:processDebugManifestForPackage UP-TO-DATE
|
||||||
> Task :app:processDebugResources UP-TO-DATE
|
> Task :app:processDebugResources UP-TO-DATE
|
||||||
|
|
||||||
> Task :app:compileDebugKotlin FAILED
|
> Task :app:compileDebugKotlin FAILED
|
||||||
e: file:///C:/Users/Admin/Documents/Streamflow/android-tv/app/src/main/java/com/streamflow/tv/ui/screens/DetailScreen.kt:114:56 Unresolved reference: accent
|
e: file:///C:/Users/Admin/Documents/Streamflow/android-tv/app/src/main/java/com/streamflow/tv/ui/screens/DetailScreen.kt:114:56 Unresolved reference: accent
|
||||||
|
|
||||||
FAILURE: Build failed with an exception.
|
FAILURE: Build failed with an exception.
|
||||||
|
|
||||||
* What went wrong:
|
* What went wrong:
|
||||||
Execution failed for task ':app:compileDebugKotlin'.
|
Execution failed for task ':app:compileDebugKotlin'.
|
||||||
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
|
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
|
||||||
> Compilation error. See log for more details
|
> Compilation error. See log for more details
|
||||||
|
|
||||||
* Try:
|
* Try:
|
||||||
> Run with --stacktrace option to get the stack trace.
|
> Run with --stacktrace option to get the stack trace.
|
||||||
> Run with --info or --debug option to get more log output.
|
> Run with --info or --debug option to get more log output.
|
||||||
> Run with --scan to get full insights.
|
> Run with --scan to get full insights.
|
||||||
> Get more help at https://help.gradle.org.
|
> Get more help at https://help.gradle.org.
|
||||||
|
|
||||||
BUILD FAILED in 1s
|
BUILD FAILED in 1s
|
||||||
14 actionable tasks: 2 executed, 12 up-to-date
|
14 actionable tasks: 2 executed, 12 up-to-date
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,37 @@
|
||||||
> Task :app:checkKotlinGradlePluginConfigurationErrors
|
> Task :app:checkKotlinGradlePluginConfigurationErrors
|
||||||
> Task :app:preBuild UP-TO-DATE
|
> Task :app:preBuild UP-TO-DATE
|
||||||
> Task :app:preDebugBuild UP-TO-DATE
|
> Task :app:preDebugBuild UP-TO-DATE
|
||||||
> Task :app:checkDebugAarMetadata UP-TO-DATE
|
> Task :app:checkDebugAarMetadata UP-TO-DATE
|
||||||
> Task :app:generateDebugResValues UP-TO-DATE
|
> Task :app:generateDebugResValues UP-TO-DATE
|
||||||
> Task :app:mapDebugSourceSetPaths UP-TO-DATE
|
> Task :app:mapDebugSourceSetPaths UP-TO-DATE
|
||||||
> Task :app:generateDebugResources UP-TO-DATE
|
> Task :app:generateDebugResources UP-TO-DATE
|
||||||
> Task :app:mergeDebugResources UP-TO-DATE
|
> Task :app:mergeDebugResources UP-TO-DATE
|
||||||
> Task :app:packageDebugResources UP-TO-DATE
|
> Task :app:packageDebugResources UP-TO-DATE
|
||||||
> Task :app:parseDebugLocalResources UP-TO-DATE
|
> Task :app:parseDebugLocalResources UP-TO-DATE
|
||||||
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
|
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
|
||||||
> Task :app:extractDeepLinksDebug UP-TO-DATE
|
> Task :app:extractDeepLinksDebug UP-TO-DATE
|
||||||
> Task :app:processDebugMainManifest UP-TO-DATE
|
> Task :app:processDebugMainManifest UP-TO-DATE
|
||||||
> Task :app:processDebugManifest UP-TO-DATE
|
> Task :app:processDebugManifest UP-TO-DATE
|
||||||
> Task :app:processDebugManifestForPackage UP-TO-DATE
|
> Task :app:processDebugManifestForPackage UP-TO-DATE
|
||||||
> Task :app:processDebugResources UP-TO-DATE
|
> Task :app:processDebugResources UP-TO-DATE
|
||||||
|
|
||||||
> Task :app:compileDebugKotlin FAILED
|
> Task :app:compileDebugKotlin FAILED
|
||||||
e: file:///C:/Users/Admin/Documents/Streamflow/android-tv/app/src/main/java/com/streamflow/tv/ui/screens/DetailScreen.kt:140:21 Cannot find a parameter with this name: onEpisodeClick
|
e: file:///C:/Users/Admin/Documents/Streamflow/android-tv/app/src/main/java/com/streamflow/tv/ui/screens/DetailScreen.kt:140:21 Cannot find a parameter with this name: onEpisodeClick
|
||||||
e: file:///C:/Users/Admin/Documents/Streamflow/android-tv/app/src/main/java/com/streamflow/tv/ui/screens/DetailScreen.kt:140:40 Cannot infer a type for this parameter. Please specify it explicitly.
|
e: file:///C:/Users/Admin/Documents/Streamflow/android-tv/app/src/main/java/com/streamflow/tv/ui/screens/DetailScreen.kt:140:40 Cannot infer a type for this parameter. Please specify it explicitly.
|
||||||
e: file:///C:/Users/Admin/Documents/Streamflow/android-tv/app/src/main/java/com/streamflow/tv/ui/screens/DetailScreen.kt:141:21 No value passed for parameter 'onEpisodeSelect'
|
e: file:///C:/Users/Admin/Documents/Streamflow/android-tv/app/src/main/java/com/streamflow/tv/ui/screens/DetailScreen.kt:141:21 No value passed for parameter 'onEpisodeSelect'
|
||||||
|
|
||||||
FAILURE: Build failed with an exception.
|
FAILURE: Build failed with an exception.
|
||||||
|
|
||||||
* What went wrong:
|
* What went wrong:
|
||||||
Execution failed for task ':app:compileDebugKotlin'.
|
Execution failed for task ':app:compileDebugKotlin'.
|
||||||
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
|
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
|
||||||
> Compilation error. See log for more details
|
> Compilation error. See log for more details
|
||||||
|
|
||||||
* Try:
|
* Try:
|
||||||
> Run with --stacktrace option to get the stack trace.
|
> Run with --stacktrace option to get the stack trace.
|
||||||
> Run with --info or --debug option to get more log output.
|
> Run with --info or --debug option to get more log output.
|
||||||
> Run with --scan to get full insights.
|
> Run with --scan to get full insights.
|
||||||
> Get more help at https://help.gradle.org.
|
> Get more help at https://help.gradle.org.
|
||||||
|
|
||||||
BUILD FAILED in 1s
|
BUILD FAILED in 1s
|
||||||
14 actionable tasks: 2 executed, 12 up-to-date
|
14 actionable tasks: 2 executed, 12 up-to-date
|
||||||
|
|
|
||||||
299
android-tv/build_error.txt
Normal file
299
android-tv/build_error.txt
Normal file
|
|
@ -0,0 +1,299 @@
|
||||||
|
WARNING: A restricted method in java.lang.System has been called
|
||||||
|
WARNING: java.lang.System::load has been called by net.rubygrapefruit.platform.internal.NativeLibraryLoader in an unnamed module (file:/Users/khoa.vo/.gradle/wrapper/dists/gradle-8.9-bin/90cnw93cvbtalezasaz0blq0a/gradle-8.9/lib/native-platform-0.22-milestone-26.jar)
|
||||||
|
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
|
||||||
|
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
|
||||||
|
|
||||||
|
|
||||||
|
FAILURE: Build failed with an exception.
|
||||||
|
|
||||||
|
* What went wrong:
|
||||||
|
25.0.1
|
||||||
|
|
||||||
|
* Try:
|
||||||
|
> Run with --info or --debug option to get more log output.
|
||||||
|
> Run with --scan to get full insights.
|
||||||
|
> Get more help at https://help.gradle.org.
|
||||||
|
|
||||||
|
* Exception is:
|
||||||
|
java.lang.IllegalArgumentException: 25.0.1
|
||||||
|
at org.jetbrains.kotlin.com.intellij.util.lang.JavaVersion.parse(JavaVersion.java:305)
|
||||||
|
at org.jetbrains.kotlin.com.intellij.util.lang.JavaVersion.current(JavaVersion.java:174)
|
||||||
|
at org.jetbrains.kotlin.cli.jvm.modules.JavaVersionUtilsKt.isAtLeastJava9(javaVersionUtils.kt:11)
|
||||||
|
at org.jetbrains.kotlin.cli.jvm.modules.CoreJrtFileSystem$Companion$globalJrtFsCache$1.invoke(CoreJrtFileSystem.kt:83)
|
||||||
|
at org.jetbrains.kotlin.cli.jvm.modules.CoreJrtFileSystem$Companion$globalJrtFsCache$1.invoke(CoreJrtFileSystem.kt:74)
|
||||||
|
at org.jetbrains.kotlin.cli.jvm.modules.CoreJrtFileSystem.globalJrtFsCache$lambda$1(CoreJrtFileSystem.kt:74)
|
||||||
|
at org.jetbrains.kotlin.com.intellij.util.containers.ConcurrentFactoryMap$2.create(ConcurrentFactoryMap.java:174)
|
||||||
|
at org.jetbrains.kotlin.com.intellij.util.containers.ConcurrentFactoryMap.get(ConcurrentFactoryMap.java:40)
|
||||||
|
at org.jetbrains.kotlin.cli.jvm.modules.CoreJrtFileSystem$roots$1.invoke(CoreJrtFileSystem.kt:34)
|
||||||
|
at org.jetbrains.kotlin.cli.jvm.modules.CoreJrtFileSystem$roots$1.invoke(CoreJrtFileSystem.kt:33)
|
||||||
|
at org.jetbrains.kotlin.cli.jvm.modules.CoreJrtFileSystem.roots$lambda$0(CoreJrtFileSystem.kt:33)
|
||||||
|
at org.jetbrains.kotlin.com.intellij.util.containers.ConcurrentFactoryMap$2.create(ConcurrentFactoryMap.java:174)
|
||||||
|
at org.jetbrains.kotlin.com.intellij.util.containers.ConcurrentFactoryMap.get(ConcurrentFactoryMap.java:40)
|
||||||
|
at org.jetbrains.kotlin.cli.jvm.modules.CoreJrtFileSystem.findFileByPath(CoreJrtFileSystem.kt:42)
|
||||||
|
at org.jetbrains.kotlin.cli.jvm.modules.CliJavaModuleFinder.<init>(CliJavaModuleFinder.kt:44)
|
||||||
|
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:210)
|
||||||
|
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt)
|
||||||
|
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:446)
|
||||||
|
at org.gradle.kotlin.dsl.support.KotlinCompilerKt$kotlinCoreEnvironmentFor$1.create(KotlinCompiler.kt:429)
|
||||||
|
at org.gradle.kotlin.dsl.support.KotlinCompilerKt$kotlinCoreEnvironmentFor$1.create(KotlinCompiler.kt:425)
|
||||||
|
at org.gradle.internal.SystemProperties.withSystemProperty(SystemProperties.java:123)
|
||||||
|
at org.gradle.kotlin.dsl.support.KotlinCompilerKt.kotlinCoreEnvironmentFor(KotlinCompiler.kt:425)
|
||||||
|
at org.gradle.kotlin.dsl.support.KotlinCompilerKt.compileKotlinScriptModuleTo(KotlinCompiler.kt:184)
|
||||||
|
at org.gradle.kotlin.dsl.support.KotlinCompilerKt.compileKotlinScriptToDirectory(KotlinCompiler.kt:148)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler$compileScript$1.invoke(ResidualProgramCompiler.kt:712)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler$compileScript$1.invoke(ResidualProgramCompiler.kt:711)
|
||||||
|
at org.gradle.kotlin.dsl.provider.StandardKotlinScriptEvaluator$InterpreterHost$runCompileBuildOperation$1.call(KotlinScriptEvaluator.kt:186)
|
||||||
|
at org.gradle.kotlin.dsl.provider.StandardKotlinScriptEvaluator$InterpreterHost$runCompileBuildOperation$1.call(KotlinScriptEvaluator.kt:183)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
|
||||||
|
at org.gradle.kotlin.dsl.provider.StandardKotlinScriptEvaluator$InterpreterHost.runCompileBuildOperation(KotlinScriptEvaluator.kt:183)
|
||||||
|
at org.gradle.kotlin.dsl.execution.Interpreter$compile$1$1$1$1.invoke(Interpreter.kt:332)
|
||||||
|
at org.gradle.kotlin.dsl.execution.Interpreter$compile$1$1$1$1.invoke(Interpreter.kt:332)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.compileScript-C5AE47M(ResidualProgramCompiler.kt:711)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.compileStage1-EfyMToc(ResidualProgramCompiler.kt:694)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.emitStage1Sequence(ResidualProgramCompiler.kt:246)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.emitStage1Sequence(ResidualProgramCompiler.kt:237)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.emit(ResidualProgramCompiler.kt:197)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.emit(ResidualProgramCompiler.kt:181)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.access$emit(ResidualProgramCompiler.kt:83)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler$emitDynamicProgram$1$1.invoke(ResidualProgramCompiler.kt:122)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler$emitDynamicProgram$1$1.invoke(ResidualProgramCompiler.kt:120)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler$overrideExecute$1.invoke(ResidualProgramCompiler.kt:547)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler$overrideExecute$1.invoke(ResidualProgramCompiler.kt:546)
|
||||||
|
at org.gradle.kotlin.dsl.support.bytecode.AsmExtensionsKt.method(AsmExtensions.kt:131)
|
||||||
|
at org.gradle.kotlin.dsl.support.bytecode.AsmExtensionsKt.publicMethod(AsmExtensions.kt:114)
|
||||||
|
at org.gradle.kotlin.dsl.support.bytecode.AsmExtensionsKt.publicMethod$default(AsmExtensions.kt:106)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.overrideExecute(ResidualProgramCompiler.kt:546)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.access$overrideExecute(ResidualProgramCompiler.kt:83)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler$emitDynamicProgram$1.invoke(ResidualProgramCompiler.kt:120)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler$emitDynamicProgram$1.invoke(ResidualProgramCompiler.kt:118)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler$program$3.invoke(ResidualProgramCompiler.kt:672)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler$program$3.invoke(ResidualProgramCompiler.kt:670)
|
||||||
|
at org.gradle.kotlin.dsl.support.bytecode.AsmExtensionsKt.publicClass-7y5yvvE(AsmExtensions.kt:39)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.program-5oOsWEo(ResidualProgramCompiler.kt:670)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.access$program-5oOsWEo(ResidualProgramCompiler.kt:83)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.emitDynamicProgram(ResidualProgramCompiler.kt:797)
|
||||||
|
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.compile(ResidualProgramCompiler.kt:101)
|
||||||
|
at org.gradle.kotlin.dsl.execution.Interpreter$compile$1.invoke(Interpreter.kt:335)
|
||||||
|
at org.gradle.kotlin.dsl.execution.Interpreter$compile$1.invoke(Interpreter.kt:299)
|
||||||
|
at org.gradle.kotlin.dsl.provider.StandardKotlinScriptEvaluator$KotlinScriptCompilationAndInstrumentation.compile(KotlinScriptEvaluator.kt:408)
|
||||||
|
at org.gradle.internal.scripts.BuildScriptCompilationAndInstrumentation.execute(BuildScriptCompilationAndInstrumentation.java:95)
|
||||||
|
at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:105)
|
||||||
|
at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)
|
||||||
|
at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:59)
|
||||||
|
at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:56)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
|
||||||
|
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:56)
|
||||||
|
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)
|
||||||
|
at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:42)
|
||||||
|
at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:75)
|
||||||
|
at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
|
||||||
|
at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:50)
|
||||||
|
at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:28)
|
||||||
|
at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:61)
|
||||||
|
at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:26)
|
||||||
|
at org.gradle.internal.execution.steps.NoInputChangesStep.execute(NoInputChangesStep.java:30)
|
||||||
|
at org.gradle.internal.execution.steps.NoInputChangesStep.execute(NoInputChangesStep.java:21)
|
||||||
|
at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:69)
|
||||||
|
at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:46)
|
||||||
|
at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:189)
|
||||||
|
at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:75)
|
||||||
|
at org.gradle.internal.Either$Right.fold(Either.java:175)
|
||||||
|
at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:62)
|
||||||
|
at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:73)
|
||||||
|
at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:48)
|
||||||
|
at org.gradle.internal.execution.steps.NeverUpToDateStep.execute(NeverUpToDateStep.java:34)
|
||||||
|
at org.gradle.internal.execution.steps.NeverUpToDateStep.execute(NeverUpToDateStep.java:22)
|
||||||
|
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
|
||||||
|
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
|
||||||
|
at org.gradle.internal.execution.steps.ResolveNonIncrementalCachingStateStep.executeDelegate(ResolveNonIncrementalCachingStateStep.java:50)
|
||||||
|
at org.gradle.internal.execution.steps.AbstractResolveCachingStateStep.execute(AbstractResolveCachingStateStep.java:71)
|
||||||
|
at org.gradle.internal.execution.steps.AbstractResolveCachingStateStep.execute(AbstractResolveCachingStateStep.java:39)
|
||||||
|
at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:105)
|
||||||
|
at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:54)
|
||||||
|
at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:64)
|
||||||
|
at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:43)
|
||||||
|
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
|
||||||
|
at org.gradle.internal.execution.steps.AssignImmutableWorkspaceStep.lambda$executeInTemporaryWorkspace$3(AssignImmutableWorkspaceStep.java:209)
|
||||||
|
at org.gradle.internal.execution.workspace.impl.CacheBasedImmutableWorkspaceProvider$1.withTemporaryWorkspace(CacheBasedImmutableWorkspaceProvider.java:119)
|
||||||
|
at org.gradle.internal.execution.steps.AssignImmutableWorkspaceStep.executeInTemporaryWorkspace(AssignImmutableWorkspaceStep.java:199)
|
||||||
|
at org.gradle.internal.execution.steps.AssignImmutableWorkspaceStep.lambda$execute$0(AssignImmutableWorkspaceStep.java:121)
|
||||||
|
at org.gradle.internal.execution.steps.AssignImmutableWorkspaceStep.execute(AssignImmutableWorkspaceStep.java:121)
|
||||||
|
at org.gradle.internal.execution.steps.AssignImmutableWorkspaceStep.execute(AssignImmutableWorkspaceStep.java:90)
|
||||||
|
at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:38)
|
||||||
|
at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:23)
|
||||||
|
at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.lambda$execute$2(ExecuteWorkBuildOperationFiringStep.java:67)
|
||||||
|
at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:67)
|
||||||
|
at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:39)
|
||||||
|
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:46)
|
||||||
|
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:34)
|
||||||
|
at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:48)
|
||||||
|
at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:35)
|
||||||
|
at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:61)
|
||||||
|
at org.gradle.kotlin.dsl.provider.StandardKotlinScriptEvaluator$InterpreterHost.cachedDirFor(KotlinScriptEvaluator.kt:278)
|
||||||
|
at org.gradle.kotlin.dsl.execution.Interpreter.compile(Interpreter.kt:299)
|
||||||
|
at org.gradle.kotlin.dsl.execution.Interpreter.emitSpecializedProgramFor(Interpreter.kt:266)
|
||||||
|
at org.gradle.kotlin.dsl.execution.Interpreter.eval(Interpreter.kt:198)
|
||||||
|
at org.gradle.kotlin.dsl.provider.StandardKotlinScriptEvaluator.evaluate(KotlinScriptEvaluator.kt:124)
|
||||||
|
at org.gradle.kotlin.dsl.provider.KotlinScriptPluginFactory$create$1.invoke(KotlinScriptPluginFactory.kt:51)
|
||||||
|
at org.gradle.kotlin.dsl.provider.KotlinScriptPluginFactory$create$1.invoke(KotlinScriptPluginFactory.kt:48)
|
||||||
|
at org.gradle.kotlin.dsl.provider.KotlinScriptPlugin.apply(KotlinScriptPlugin.kt:35)
|
||||||
|
at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:68)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
|
||||||
|
at org.gradle.configuration.BuildOperationScriptPlugin.lambda$apply$0(BuildOperationScriptPlugin.java:65)
|
||||||
|
at org.gradle.internal.code.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:44)
|
||||||
|
at org.gradle.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:65)
|
||||||
|
at org.gradle.initialization.ScriptEvaluatingSettingsProcessor.applySettingsScript(ScriptEvaluatingSettingsProcessor.java:75)
|
||||||
|
at org.gradle.initialization.ScriptEvaluatingSettingsProcessor.process(ScriptEvaluatingSettingsProcessor.java:68)
|
||||||
|
at org.gradle.initialization.SettingsEvaluatedCallbackFiringSettingsProcessor.process(SettingsEvaluatedCallbackFiringSettingsProcessor.java:34)
|
||||||
|
at org.gradle.initialization.RootBuildCacheControllerSettingsProcessor.process(RootBuildCacheControllerSettingsProcessor.java:47)
|
||||||
|
at org.gradle.initialization.BuildOperationSettingsProcessor$2.call(BuildOperationSettingsProcessor.java:49)
|
||||||
|
at org.gradle.initialization.BuildOperationSettingsProcessor$2.call(BuildOperationSettingsProcessor.java:46)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
|
||||||
|
at org.gradle.initialization.BuildOperationSettingsProcessor.process(BuildOperationSettingsProcessor.java:46)
|
||||||
|
at org.gradle.initialization.DefaultSettingsLoader.findSettingsAndLoadIfAppropriate(DefaultSettingsLoader.java:143)
|
||||||
|
at org.gradle.initialization.DefaultSettingsLoader.findAndLoadSettings(DefaultSettingsLoader.java:63)
|
||||||
|
at org.gradle.initialization.SettingsAttachingSettingsLoader.findAndLoadSettings(SettingsAttachingSettingsLoader.java:33)
|
||||||
|
at org.gradle.internal.composite.CommandLineIncludedBuildSettingsLoader.findAndLoadSettings(CommandLineIncludedBuildSettingsLoader.java:35)
|
||||||
|
at org.gradle.internal.composite.ChildBuildRegisteringSettingsLoader.findAndLoadSettings(ChildBuildRegisteringSettingsLoader.java:44)
|
||||||
|
at org.gradle.internal.composite.CompositeBuildSettingsLoader.findAndLoadSettings(CompositeBuildSettingsLoader.java:35)
|
||||||
|
at org.gradle.initialization.InitScriptHandlingSettingsLoader.findAndLoadSettings(InitScriptHandlingSettingsLoader.java:33)
|
||||||
|
at org.gradle.api.internal.initialization.CacheConfigurationsHandlingSettingsLoader.findAndLoadSettings(CacheConfigurationsHandlingSettingsLoader.java:36)
|
||||||
|
at org.gradle.initialization.GradlePropertiesHandlingSettingsLoader.findAndLoadSettings(GradlePropertiesHandlingSettingsLoader.java:38)
|
||||||
|
at org.gradle.initialization.DefaultSettingsPreparer.prepareSettings(DefaultSettingsPreparer.java:31)
|
||||||
|
at org.gradle.initialization.BuildOperationFiringSettingsPreparer$LoadBuild.doLoadBuild(BuildOperationFiringSettingsPreparer.java:71)
|
||||||
|
at org.gradle.initialization.BuildOperationFiringSettingsPreparer$LoadBuild.run(BuildOperationFiringSettingsPreparer.java:66)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
|
||||||
|
at org.gradle.initialization.BuildOperationFiringSettingsPreparer.prepareSettings(BuildOperationFiringSettingsPreparer.java:54)
|
||||||
|
at org.gradle.initialization.VintageBuildModelController.lambda$prepareSettings$1(VintageBuildModelController.java:80)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.lambda$doTransition$14(StateTransitionController.java:255)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:266)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:254)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.lambda$transitionIfNotPreviously$11(StateTransitionController.java:213)
|
||||||
|
at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:34)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.transitionIfNotPreviously(StateTransitionController.java:209)
|
||||||
|
at org.gradle.initialization.VintageBuildModelController.prepareSettings(VintageBuildModelController.java:80)
|
||||||
|
at org.gradle.initialization.VintageBuildModelController.prepareToScheduleTasks(VintageBuildModelController.java:70)
|
||||||
|
at org.gradle.internal.build.DefaultBuildLifecycleController.lambda$prepareToScheduleTasks$6(DefaultBuildLifecycleController.java:175)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.lambda$doTransition$14(StateTransitionController.java:255)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:266)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:254)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.lambda$maybeTransition$9(StateTransitionController.java:190)
|
||||||
|
at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:34)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.maybeTransition(StateTransitionController.java:186)
|
||||||
|
at org.gradle.internal.build.DefaultBuildLifecycleController.prepareToScheduleTasks(DefaultBuildLifecycleController.java:173)
|
||||||
|
at org.gradle.internal.buildtree.DefaultBuildTreeWorkPreparer.scheduleRequestedTasks(DefaultBuildTreeWorkPreparer.java:36)
|
||||||
|
at org.gradle.internal.cc.impl.VintageBuildTreeWorkController$scheduleAndRunRequestedTasks$1.apply(VintageBuildTreeWorkController.kt:36)
|
||||||
|
at org.gradle.internal.cc.impl.VintageBuildTreeWorkController$scheduleAndRunRequestedTasks$1.apply(VintageBuildTreeWorkController.kt:35)
|
||||||
|
at org.gradle.composite.internal.DefaultIncludedBuildTaskGraph.withNewWorkGraph(DefaultIncludedBuildTaskGraph.java:112)
|
||||||
|
at org.gradle.internal.cc.impl.VintageBuildTreeWorkController.scheduleAndRunRequestedTasks(VintageBuildTreeWorkController.kt:35)
|
||||||
|
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$scheduleAndRunTasks$1(DefaultBuildTreeLifecycleController.java:77)
|
||||||
|
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:120)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.lambda$transition$6(StateTransitionController.java:169)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:266)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.lambda$transition$7(StateTransitionController.java:169)
|
||||||
|
at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
|
||||||
|
at org.gradle.internal.model.StateTransitionController.transition(StateTransitionController.java:169)
|
||||||
|
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:117)
|
||||||
|
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.scheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:77)
|
||||||
|
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.scheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:72)
|
||||||
|
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
|
||||||
|
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
|
||||||
|
at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49)
|
||||||
|
at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:65)
|
||||||
|
at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:140)
|
||||||
|
at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
|
||||||
|
at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40)
|
||||||
|
at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:130)
|
||||||
|
at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40)
|
||||||
|
at org.gradle.internal.buildtree.InitDeprecationLoggingActionExecutor.execute(InitDeprecationLoggingActionExecutor.java:62)
|
||||||
|
at org.gradle.internal.buildtree.InitProblems.execute(InitProblems.java:36)
|
||||||
|
at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
|
||||||
|
at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:71)
|
||||||
|
at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:60)
|
||||||
|
at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:71)
|
||||||
|
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
|
||||||
|
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
|
||||||
|
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
|
||||||
|
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
|
||||||
|
at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36)
|
||||||
|
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:267)
|
||||||
|
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:131)
|
||||||
|
at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36)
|
||||||
|
at org.gradle.tooling.internal.provider.continuous.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:110)
|
||||||
|
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
|
||||||
|
at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
|
||||||
|
at org.gradle.internal.buildprocess.execution.BuildSessionLifecycleBuildActionExecutor$ActionImpl.apply(BuildSessionLifecycleBuildActionExecutor.java:92)
|
||||||
|
at org.gradle.internal.buildprocess.execution.BuildSessionLifecycleBuildActionExecutor$ActionImpl.apply(BuildSessionLifecycleBuildActionExecutor.java:80)
|
||||||
|
at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:71)
|
||||||
|
at org.gradle.internal.buildprocess.execution.BuildSessionLifecycleBuildActionExecutor.execute(BuildSessionLifecycleBuildActionExecutor.java:62)
|
||||||
|
at org.gradle.internal.buildprocess.execution.BuildSessionLifecycleBuildActionExecutor.execute(BuildSessionLifecycleBuildActionExecutor.java:41)
|
||||||
|
at org.gradle.internal.buildprocess.execution.StartParamsValidatingActionExecutor.execute(StartParamsValidatingActionExecutor.java:64)
|
||||||
|
at org.gradle.internal.buildprocess.execution.StartParamsValidatingActionExecutor.execute(StartParamsValidatingActionExecutor.java:32)
|
||||||
|
at org.gradle.internal.buildprocess.execution.SessionFailureReportingActionExecutor.execute(SessionFailureReportingActionExecutor.java:51)
|
||||||
|
at org.gradle.internal.buildprocess.execution.SessionFailureReportingActionExecutor.execute(SessionFailureReportingActionExecutor.java:39)
|
||||||
|
at org.gradle.internal.buildprocess.execution.SetupLoggingActionExecutor.execute(SetupLoggingActionExecutor.java:47)
|
||||||
|
at org.gradle.internal.buildprocess.execution.SetupLoggingActionExecutor.execute(SetupLoggingActionExecutor.java:31)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:70)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
|
||||||
|
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
|
||||||
|
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
|
||||||
|
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
|
||||||
|
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.lambda$execute$0(ForwardClientInput.java:40)
|
||||||
|
at org.gradle.internal.daemon.clientinput.ClientInputForwarder.forwardInput(ClientInputForwarder.java:80)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:37)
|
||||||
|
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:64)
|
||||||
|
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
|
||||||
|
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
|
||||||
|
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
|
||||||
|
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
|
||||||
|
at org.gradle.launcher.daemon.server.DaemonStateCoordinator.lambda$runCommand$0(DaemonStateCoordinator.java:320)
|
||||||
|
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
|
||||||
|
at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48)
|
||||||
|
|
||||||
|
|
||||||
|
BUILD FAILED in 4s
|
||||||
1
android-tv/dump_initial.xml
Normal file
1
android-tv/dump_initial.xml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><hierarchy rotation="0"><node index="0" text="" resource-id="" class="android.widget.FrameLayout" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1920,1080]"><node index="0" text="" resource-id="" class="android.widget.LinearLayout" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1920,1080]"><node index="0" text="" resource-id="android:id/content" class="android.widget.FrameLayout" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1920,1080]"><node index="0" text="" resource-id="" class="android.view.View" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1920,1080]" /><node index="1" text="" resource-id="" class="android.view.View" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1920,1080]"><node index="0" text="" resource-id="" class="android.view.View" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][10,10]" /><node index="1" text="" resource-id="" class="android.view.View" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[10,0][20,10]" /><node index="2" text="" resource-id="" class="android.view.View" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[20,0][30,10]" /><node index="3" text="" resource-id="" class="android.view.View" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,10][10,20]" /><node index="4" text="" resource-id="" class="android.view.View" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[10,10][20,20]" /><node index="5" text="" resource-id="" class="android.view.View" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[20,10][30,20]" /><node index="6" text="" resource-id="" class="android.view.View" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,20][10,30]" /><node index="7" text="" resource-id="" class="android.view.View" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[10,20][20,30]" /><node index="8" text="" resource-id="" class="android.view.View" package="com.google.android.youtube.tv" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[20,20][30,30]" /></node></node></node></node></hierarchy>
|
||||||
420
android-tv/gradle-8.4/LICENSE
Normal file
420
android-tv/gradle-8.4/LICENSE
Normal file
|
|
@ -0,0 +1,420 @@
|
||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
Licenses for included components:
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
Eclipse Public License 1.0
|
||||||
|
https://opensource.org/licenses/EPL-1.0
|
||||||
|
|
||||||
|
junit:junit
|
||||||
|
org.sonatype.aether:aether-api
|
||||||
|
org.sonatype.aether:aether-connector-wagon
|
||||||
|
org.sonatype.aether:aether-impl
|
||||||
|
org.sonatype.aether:aether-spi
|
||||||
|
org.sonatype.aether:aether-util
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
3-Clause BSD
|
||||||
|
https://opensource.org/licenses/BSD-3-Clause
|
||||||
|
|
||||||
|
com.google.code.findbugs:jsr305
|
||||||
|
|
||||||
|
org.hamcrest:hamcrest-core
|
||||||
|
BSD License
|
||||||
|
|
||||||
|
Copyright (c) 2000-2015 www.hamcrest.org
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
conditions and the following disclaimer. Redistributions in binary form must reproduce
|
||||||
|
the above copyright notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
Neither the name of Hamcrest nor the names of its contributors may be used to endorse
|
||||||
|
or promote products derived from this software without specific prior written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||||
|
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||||
|
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||||
|
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
|
||||||
|
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGE.
|
||||||
|
|
||||||
|
com.esotericsoftware.kryo:kryo
|
||||||
|
com.esotericsoftware.minlog:minlog
|
||||||
|
Copyright (c) 2008-2018, Nathan Sweet All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
org.ow2.asm:asm
|
||||||
|
org.ow2.asm:asm-analysis
|
||||||
|
org.ow2.asm:asm-commons
|
||||||
|
org.ow2.asm:asm-tree
|
||||||
|
org.ow2.asm:asm-util
|
||||||
|
ASM: a very small and fast Java bytecode manipulation framework
|
||||||
|
Copyright (c) 2000-2011 INRIA, France Telecom
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
1. Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
3. Neither the name of the copyright holders nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
MIT
|
||||||
|
|
||||||
|
com.googlecode.plist:dd-plist
|
||||||
|
dd-plist - An open source library to parse and generate property lists
|
||||||
|
Copyright (C) 2016 Daniel Dreibrodt
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
org.bouncycastle:bcpg-jdk15on
|
||||||
|
org.bouncycastle:bcprov-jdk15on
|
||||||
|
Copyright (c) 2000 - 2019 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
org.slf4j:jcl-over-slf4j
|
||||||
|
org.slf4j:jul-to-slf4j
|
||||||
|
org.slf4j:log4j-over-slf4j
|
||||||
|
org.slf4j:slf4j-api
|
||||||
|
Copyright (c) 2004-2017 QOS.ch
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
CDDL
|
||||||
|
https://opensource.org/licenses/CDDL-1.0
|
||||||
|
|
||||||
|
com.sun.xml.bind:jaxb-impl
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
LGPL 2.1
|
||||||
|
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
|
||||||
|
|
||||||
|
org.samba.jcifs:jcifs
|
||||||
|
|
||||||
|
org.jetbrains.intellij.deps:trove4j
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
License for the GNU Trove library included by the Kotlin embeddable compiler
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
The source code for GNU Trove is licensed under the Lesser GNU Public License (LGPL).
|
||||||
|
|
||||||
|
Copyright (c) 2001, Eric D. Friedman All Rights Reserved. This library is free software; you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
|
||||||
|
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
|
Two classes (HashFunctions and PrimeFinder) included in Trove are licensed under the following terms:
|
||||||
|
|
||||||
|
Copyright (c) 1999 CERN - European Organization for Nuclear Research. Permission to use, copy, modify, distribute and sell this software
|
||||||
|
and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and
|
||||||
|
that both that copyright notice and this permission notice appear in supporting documentation. CERN makes no representations about the
|
||||||
|
suitability of this software for any purpose. It is provided "as is" without expressed or implied warranty.
|
||||||
|
|
||||||
|
The source code of modified GNU Trove library is available at
|
||||||
|
https://github.com/JetBrains/intellij-deps-trove4j (with trove4j_changes.txt describing the changes)
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
Eclipse Distribution License 1.0
|
||||||
|
https://www.eclipse.org/org/documents/edl-v10.php
|
||||||
|
|
||||||
|
org.eclipse.jgit:org.eclipse.jgit
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
BSD-style
|
||||||
|
|
||||||
|
com.jcraft:jsch
|
||||||
|
com.jcraft:jzlib
|
||||||
|
|
||||||
|
Copyright (c) 2000-2011 ymnk, JCraft,Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The names of the authors may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||||
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
|
||||||
|
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||||
|
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||||
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
Eclipse Public License 2.0
|
||||||
|
https://www.eclipse.org/legal/epl-2.0/
|
||||||
|
|
||||||
|
org.junit.platform:junit-platform-launcher
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
Mozilla Public License 2.0
|
||||||
|
https://www.mozilla.org/en-US/MPL/2.0/
|
||||||
|
|
||||||
|
org.mozilla:rhino
|
||||||
21
android-tv/gradle-8.4/NOTICE
Normal file
21
android-tv/gradle-8.4/NOTICE
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
=========================================================================
|
||||||
|
== NOTICE file corresponding to the section 4 d of ==
|
||||||
|
== the Apache License, Version 2.0, ==
|
||||||
|
== in this case for the Gradle distribution. ==
|
||||||
|
=========================================================================
|
||||||
|
|
||||||
|
This product includes software developed by
|
||||||
|
The Apache Software Foundation (http://www.apache.org/).
|
||||||
|
|
||||||
|
It includes the following other software:
|
||||||
|
|
||||||
|
Groovy (http://groovy-lang.org)
|
||||||
|
SLF4J (http://www.slf4j.org)
|
||||||
|
JUnit (http://www.junit.org)
|
||||||
|
JCIFS (http://jcifs.samba.org)
|
||||||
|
HttpClient (https://hc.apache.org/httpcomponents-client-4.5.x/)
|
||||||
|
|
||||||
|
For licenses, see the LICENSE file.
|
||||||
|
|
||||||
|
If any software distributed with Gradle does not have an Apache 2 License, its license is explicitly listed in the
|
||||||
|
LICENSE file.
|
||||||
11
android-tv/gradle-8.4/README
Normal file
11
android-tv/gradle-8.4/README
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
Gradle is a build tool with a focus on build automation and support for multi-language development. If you are building, testing, publishing, and deploying software on any platform, Gradle offers a flexible model that can support the entire development lifecycle from compiling and packaging code to publishing web sites. Gradle has been designed to support build automation across multiple languages and platforms including Java, Scala, Android, C/C++, and Groovy, and is closely integrated with development tools and continuous integration servers including Eclipse, IntelliJ, and Jenkins.
|
||||||
|
|
||||||
|
For more information about Gradle, please visit: https://gradle.org
|
||||||
|
|
||||||
|
If you are using the "all" distribution, the User Manual is included in your distribution.
|
||||||
|
|
||||||
|
If you are using the "bin" distribution, a copy of the User Manual is available on https://docs.gradle.org.
|
||||||
|
|
||||||
|
Typing `gradle help` prints the command line help.
|
||||||
|
|
||||||
|
Typing `gradle tasks` shows all the tasks of a Gradle build.
|
||||||
249
android-tv/gradle-8.4/bin/gradle
Normal file
249
android-tv/gradle-8.4/bin/gradle
Normal file
|
|
@ -0,0 +1,249 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright © 2015-2021 the original authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
app_path=$0
|
||||||
|
|
||||||
|
# Need this for daisy-chained symlinks.
|
||||||
|
while
|
||||||
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
|
[ -h "$app_path" ]
|
||||||
|
do
|
||||||
|
ls=$( ls -ld "$app_path" )
|
||||||
|
link=${ls#*' -> '}
|
||||||
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# This is normally unused
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}.." > /dev/null && pwd -P ) || exit
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD=maximum
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "$( uname )" in #(
|
||||||
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
|
Darwin* ) darwin=true ;; #(
|
||||||
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
|
NONSTOP* ) nonstop=true ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/lib/gradle-launcher-8.4.jar
|
||||||
|
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
|
else
|
||||||
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD=java
|
||||||
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
|
case $MAX_FD in #(
|
||||||
|
max*)
|
||||||
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC2039,SC3045
|
||||||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
|
warn "Could not query maximum file descriptor limit"
|
||||||
|
esac
|
||||||
|
case $MAX_FD in #(
|
||||||
|
'' | soft) :;; #(
|
||||||
|
*)
|
||||||
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC2039,SC3045
|
||||||
|
ulimit -n "$MAX_FD" ||
|
||||||
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
|
# * args from the command line
|
||||||
|
# * the main class name
|
||||||
|
# * -classpath
|
||||||
|
# * -D...appname settings
|
||||||
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'" \"-javaagent:$APP_HOME/lib/agents/gradle-instrumentation-agent-8.4.jar\""
|
||||||
|
|
||||||
|
# Collect all arguments for the java command:
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
|
# and any embedded shellness will be escaped.
|
||||||
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.launcher.GradleMain \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
||||||
92
android-tv/gradle-8.4/bin/gradle.bat
Normal file
92
android-tv/gradle-8.4/bin/gradle.bat
Normal file
|
|
@ -0,0 +1,92 @@
|
||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%"=="" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%..
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" "-javaagent:%APP_HOME%/lib/agents/gradle-instrumentation-agent-8.4.jar"
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\lib\gradle-launcher-8.4.jar
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.launcher.GradleMain %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
||||||
1
android-tv/gradle-8.4/init.d/readme.txt
Normal file
1
android-tv/gradle-8.4/init.d/readme.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
You can add .gradle (e.g. test.gradle) init scripts to this directory. Each one is executed at the start of the build.
|
||||||
BIN
android-tv/gradle-8.4/lib/HikariCP-4.0.3.jar
Normal file
BIN
android-tv/gradle-8.4/lib/HikariCP-4.0.3.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/annotations-24.0.1.jar
Normal file
BIN
android-tv/gradle-8.4/lib/annotations-24.0.1.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/ant-1.10.13.jar
Normal file
BIN
android-tv/gradle-8.4/lib/ant-1.10.13.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/ant-antlr-1.10.12.jar
Normal file
BIN
android-tv/gradle-8.4/lib/ant-antlr-1.10.12.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/ant-junit-1.10.12.jar
Normal file
BIN
android-tv/gradle-8.4/lib/ant-junit-1.10.12.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/ant-launcher-1.10.13.jar
Normal file
BIN
android-tv/gradle-8.4/lib/ant-launcher-1.10.13.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/antlr4-runtime-4.7.2.jar
Normal file
BIN
android-tv/gradle-8.4/lib/antlr4-runtime-4.7.2.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/asm-9.5.jar
Normal file
BIN
android-tv/gradle-8.4/lib/asm-9.5.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/asm-commons-9.5.jar
Normal file
BIN
android-tv/gradle-8.4/lib/asm-commons-9.5.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/asm-tree-9.5.jar
Normal file
BIN
android-tv/gradle-8.4/lib/asm-tree-9.5.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/commons-compress-1.21.jar
Normal file
BIN
android-tv/gradle-8.4/lib/commons-compress-1.21.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/commons-io-2.11.0.jar
Normal file
BIN
android-tv/gradle-8.4/lib/commons-io-2.11.0.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/commons-lang-2.6.jar
Normal file
BIN
android-tv/gradle-8.4/lib/commons-lang-2.6.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/failureaccess-1.0.1.jar
Normal file
BIN
android-tv/gradle-8.4/lib/failureaccess-1.0.1.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/fastutil-8.5.2-min.jar
Normal file
BIN
android-tv/gradle-8.4/lib/fastutil-8.5.2-min.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/file-events-0.22-milestone-25.jar
Normal file
BIN
android-tv/gradle-8.4/lib/file-events-0.22-milestone-25.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-api-metadata-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-api-metadata-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-base-annotations-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-base-annotations-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-base-services-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-base-services-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-base-services-groovy-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-base-services-groovy-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-bootstrap-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-bootstrap-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-build-cache-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-build-cache-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-build-cache-base-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-build-cache-base-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-build-cache-packaging-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-build-cache-packaging-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-build-events-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-build-events-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-build-operations-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-build-operations-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-build-option-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-build-option-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-cli-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-cli-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-core-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-core-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-core-api-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-core-api-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-enterprise-logging-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-enterprise-logging-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-enterprise-operations-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-enterprise-operations-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-enterprise-workers-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-enterprise-workers-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-execution-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-execution-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-file-collections-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-file-collections-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-file-temp-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-file-temp-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-file-watching-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-file-watching-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-files-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-files-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-functional-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-functional-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-hashing-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-hashing-8.4.jar
Normal file
Binary file not shown.
BIN
android-tv/gradle-8.4/lib/gradle-installation-beacon-8.4.jar
Normal file
BIN
android-tv/gradle-8.4/lib/gradle-installation-beacon-8.4.jar
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue