Initial commit: HorrorTV Android TV App for Chromecast 4K
Features: - Horror-themed categories (Scream, Halloween, Conjuring, etc.) - ExoPlayer native video playback from streamimdb.me - D-pad navigation with visible focus indicators (8dp border + shadow) - Custom app icon (Scream mask) - VideoExtractor for HTML parsing and URL resolution - FocusRequester crash fixes - HLS streaming support Built with: - Kotlin + Jetpack Compose - ExoPlayer 1.4.0 - Hilt DI - Coil image loading - OMDb API integration Tested on Chromecast 4K with working video playback.
This commit is contained in:
162
README.md
Normal file
162
README.md
Normal file
@@ -0,0 +1,162 @@
|
||||
# HorrorTV
|
||||
|
||||
A horror movie streaming app for Android TV and Chromecast with Google TV 4K.
|
||||
|
||||
## Features
|
||||
|
||||
- **Featured Horror Categories**: Browse curated horror movie collections (Scream, Halloween, Conjuring, Exorcist, Nightmare, Insidious, Terrifier, Hereditary, It, Poltergeist, Saw, Paranormal)
|
||||
- **Search Movies**: Search by movie name or IMDB ID (e.g., `tt1234567`)
|
||||
- **WebView Streaming**: Stream movies via playimdb.com integration
|
||||
- **TV-Optimized UI**: Built with Jetpack Compose for TV with D-pad navigation support
|
||||
- **Movie Details**: View plot, year, rating, and poster information from OMDb API
|
||||
|
||||
## Tech Stack
|
||||
|
||||
| Category | Technology |
|
||||
|----------|------------|
|
||||
| Language | Kotlin |
|
||||
| UI Framework | Jetpack Compose for TV (tv-foundation, tv-material) |
|
||||
| Networking | Retrofit + OkHttp + Gson |
|
||||
| Image Loading | Coil |
|
||||
| Dependency Injection | Hilt |
|
||||
| Architecture | MVVM with Clean Architecture layers |
|
||||
| API | OMDb API |
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
HorrorTV/
|
||||
├── app/
|
||||
│ ├── src/main/
|
||||
│ │ ├── java/com/horrortv/app/
|
||||
│ │ │ ├── data/
|
||||
│ │ │ │ ├── remote/omdb/ # OMDb API service & DTOs
|
||||
│ │ │ │ └── repository/ # Repository implementations
|
||||
│ │ │ ├── di/ # Hilt modules
|
||||
│ │ │ ├── domain/
|
||||
│ │ │ │ ├── model/ # Domain models (Movie)
|
||||
│ │ │ │ └ repository/ # Repository interfaces
|
||||
│ │ │ ├── presentation/
|
||||
│ │ │ │ ├── home/ # Home screen, rows, cards
|
||||
│ │ │ │ ├── search/ # Search screen & ViewModel
|
||||
│ │ │ │ ├── detail/ # Movie detail screen
|
||||
│ │ │ │ ├── player/ # WebView streaming player
|
||||
│ │ │ │ └ theme/ # Horror-themed colors, typography
|
||||
│ │ │ ├── util/ # Constants, utilities
|
||||
│ │ │ └── MainApplication.kt # Hilt entry point
|
||||
│ │ ├── res/
|
||||
│ │ │ ├── drawable/ # Launcher background
|
||||
│ │ │ ├── mipmap/ # App icons & banner
|
||||
│ │ │ └ values/strings.xml # App name
|
||||
│ │ └ AndroidManifest.xml # TV features & activities
|
||||
│ ├── build.gradle.kts # App dependencies
|
||||
│ └ proguard-rules.pro
|
||||
├── gradle/
|
||||
│ └ wrapper/gradle-wrapper.properties
|
||||
├── build.gradle.kts # Project config
|
||||
├── settings.gradle.kts
|
||||
└ .gitignore
|
||||
```
|
||||
|
||||
## How to Build
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Android Studio with Android SDK 34
|
||||
- JDK 17
|
||||
- Gradle 8.x
|
||||
|
||||
### Build Commands
|
||||
|
||||
```bash
|
||||
# Debug APK
|
||||
./gradlew assembleDebug
|
||||
|
||||
# Release APK
|
||||
./gradlew assembleRelease
|
||||
|
||||
# Clean build
|
||||
./gradlew clean assembleDebug
|
||||
|
||||
# Install on connected device
|
||||
./gradlew installDebug
|
||||
```
|
||||
|
||||
On Windows:
|
||||
```powershell
|
||||
gradlew.bat assembleDebug
|
||||
```
|
||||
|
||||
## How to Install on Chromecast 4K
|
||||
|
||||
1. **Enable Developer Options**:
|
||||
- Go to Settings → System → About
|
||||
- Click on "Build" 7 times until "Developer options unlocked"
|
||||
|
||||
2. **Enable ADB Debugging**:
|
||||
- Settings → System → Developer options → ADB debugging → On
|
||||
|
||||
3. **Connect via ADB**:
|
||||
```bash
|
||||
# Find Chromecast IP in Settings → Network → WiFi
|
||||
adb connect <CHROMECAST_IP>:5555
|
||||
```
|
||||
|
||||
4. **Install APK**:
|
||||
```bash
|
||||
adb install -r app/build/outputs/apk/debug/app-debug.apk
|
||||
```
|
||||
|
||||
5. **Launch App**:
|
||||
- The app will appear in your Apps section on Chromecast
|
||||
- Select "HorrorTV" from the home screen
|
||||
|
||||
## API Configuration
|
||||
|
||||
The app uses the **OMDb API** to fetch movie metadata:
|
||||
|
||||
- **API Key**: `5854c81e` (hardcoded in `Constants.kt`)
|
||||
- **Base URL**: `https://www.omdbapi.com/`
|
||||
|
||||
To use your own API key, modify `Constants.kt`:
|
||||
```kotlin
|
||||
const val OMDB_API_KEY = "your_api_key_here"
|
||||
```
|
||||
|
||||
Get a free API key at: https://www.omdbapi.com/apikey.aspx
|
||||
|
||||
## Usage
|
||||
|
||||
### Navigation
|
||||
|
||||
| Action | D-Pad Control |
|
||||
|--------|---------------|
|
||||
| Move focus | Arrow keys (Up/Down/Left/Right) |
|
||||
| Select | Center button (Enter) |
|
||||
| Back | Back button |
|
||||
| Search | Search button or menu |
|
||||
|
||||
### Features
|
||||
|
||||
1. **Browse Categories**: Navigate through horror movie rows using Up/Down arrows
|
||||
2. **View Movie**: Press Select on a movie poster to see details
|
||||
3. **Play Movie**: Press Play button on detail screen to stream via WebView
|
||||
4. **Search**: Access search from the top menu, type movie name or IMDB ID
|
||||
|
||||
### IMDB ID Search
|
||||
|
||||
Enter an IMDB ID in the format `tt1234567` or `tt12345678` to find specific movies.
|
||||
|
||||
## Architecture
|
||||
|
||||
The app follows Clean Architecture principles:
|
||||
|
||||
- **Presentation Layer**: Jetpack Compose TV UI with ViewModels
|
||||
- **Domain Layer**: Business models and repository interfaces
|
||||
- **Data Layer**: OMDb API implementation and repository
|
||||
|
||||
Dependency flow: Presentation → Domain → Data
|
||||
|
||||
## License
|
||||
|
||||
This project is for educational purposes. Movie streaming via playimdb.com may require appropriate licensing in your region.
|
||||
Reference in New Issue
Block a user