digital logic updates
This commit is contained in:
@@ -159,27 +159,63 @@ curl "http://localhost:8080/debug/tmdb/tt1674782"
|
||||
```json
|
||||
{
|
||||
"movie_priority": "import_then_digital",
|
||||
"priority_explanation": "1st: Radarr import history, 2nd: TMDB digital release, 3rd: file mtime",
|
||||
"release_date_priority": ["digital", "physical", "theatrical"],
|
||||
"priority_explanation": "1st: Radarr import history, 2nd: Release dates (digital → physical → theatrical), 3rd: file mtime",
|
||||
"date_sources": {
|
||||
"radarr_import": {"date": "2025-07-08T03:30:04+00:00", "source": "radarr:history.import"},
|
||||
"digital_release": {"date": "2023-05-15T00:00:00+00:00", "source": "tmdb:digital"}
|
||||
"radarr_import": {"date": "2025-08-29T12:14:28+00:00", "source": "radarr:db.file.dateAdded"},
|
||||
"digital_release": {"date": "1996-05-03T00:00:00+00:00", "source": "tmdb:theatrical"}
|
||||
},
|
||||
"selected_date": "2025-07-08T03:30:04+00:00"
|
||||
"file_date_detected": true,
|
||||
"would_prefer_digital": true,
|
||||
"selected_date": "1996-05-03T00:00:00+00:00",
|
||||
"selected_source": "tmdb:theatrical (preferred over file date)"
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Release Date Priority System
|
||||
|
||||
NFOGuard uses a **smart fallback system** when Radarr has no valid import history:
|
||||
|
||||
### 1. **Digital Release** (streaming/VOD)
|
||||
- Netflix, Amazon Prime, iTunes, etc.
|
||||
- **TMDB Source**: Release type 4
|
||||
- **Typical**: 45-90 days after theatrical
|
||||
|
||||
### 2. **Physical Release** (DVD/Blu-ray)
|
||||
- Physical media release dates
|
||||
- **TMDB Source**: Release type 5
|
||||
- **Typical**: 90-120 days after theatrical
|
||||
|
||||
### 3. **Theatrical Release** (cinema)
|
||||
- Original movie theater release
|
||||
- **TMDB Source**: Release type 3
|
||||
- **Most Authoritative**: Always used when no digital/physical exists
|
||||
|
||||
### Configuration Examples
|
||||
|
||||
**For "The Craft (1996)"** (predates digital):
|
||||
- ❌ Digital: Not available (movie too old)
|
||||
- ❌ Physical: DVD from 2000 (too late)
|
||||
- ✅ **Theatrical: 1996-05-03** ← **Selected**
|
||||
|
||||
**For "Top Gun Maverick (2022)"** (modern movie):
|
||||
- ✅ **Digital: 2022-08-23** ← **Selected** (your priority)
|
||||
- ⏭️ Physical: 2022-10-31 (skipped due to priority)
|
||||
- ⏭️ Theatrical: 2022-05-27 (skipped due to priority)
|
||||
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
### Manual Imports Show File Dates Instead of Digital Releases
|
||||
### Manual Imports Show File Dates Instead of Release Dates
|
||||
|
||||
**Problem**: Movies manually imported show recent file dates like `2025-08-29T12:14:28+00:00`
|
||||
|
||||
**Solution**:
|
||||
1. Enable TMDB integration:
|
||||
1. Enable TMDB integration and configure fallback priority:
|
||||
```bash
|
||||
# Add to your .env file
|
||||
TMDB_API_KEY=your_tmdb_api_key
|
||||
PREFER_DIGITAL_OVER_FILE_DATES=true
|
||||
PREFER_RELEASE_DATES_OVER_FILE_DATES=true
|
||||
RELEASE_DATE_PRIORITY=digital,physical,theatrical
|
||||
```
|
||||
|
||||
2. Test the priority logic:
|
||||
@@ -187,7 +223,7 @@ curl "http://localhost:8080/debug/tmdb/tt1674782"
|
||||
curl "http://localhost:8080/debug/movie/tt0115963/priority"
|
||||
```
|
||||
|
||||
3. Should show digital date selection when reasonable
|
||||
3. Should show release date selection based on your priority order
|
||||
|
||||
### "0 Movies Processed" During Manual Scan
|
||||
|
||||
@@ -226,14 +262,35 @@ curl "http://localhost:8080/debug/tmdb/tt1674782"
|
||||
RADARR_DB_PASSWORD=your_actual_password
|
||||
```
|
||||
|
||||
### Digital Dates Not Found
|
||||
### Release Dates Not Found
|
||||
|
||||
**Problem**: `"external_apis": {"tmdb_enabled": false}`
|
||||
**Problem**: `"external_apis": {"tmdb_enabled": false}` or no release dates detected
|
||||
|
||||
**Solution**:
|
||||
1. Add TMDB API key to `.env`
|
||||
1. Add TMDB API key and configure fallback order:
|
||||
```bash
|
||||
# Add to your .env
|
||||
TMDB_API_KEY=your_api_key
|
||||
RELEASE_DATE_PRIORITY=digital,physical,theatrical
|
||||
```
|
||||
2. Restart container: `docker-compose restart`
|
||||
3. Verify: `curl "http://localhost:8080/debug/movie/tt0115963/priority"`
|
||||
3. Test all release types: `curl "http://localhost:8080/debug/tmdb/tt0115963"`
|
||||
4. Verify priority logic: `curl "http://localhost:8080/debug/movie/tt0115963/priority"`
|
||||
|
||||
### Customizing Release Date Priority
|
||||
|
||||
**Default Order**: `digital,physical,theatrical` (your preference)
|
||||
**Alternative Orders**:
|
||||
```bash
|
||||
# Prefer theatrical dates for older movies
|
||||
RELEASE_DATE_PRIORITY=theatrical,digital,physical
|
||||
|
||||
# Physical media collector preference
|
||||
RELEASE_DATE_PRIORITY=physical,digital,theatrical
|
||||
|
||||
# Digital-first modern preference
|
||||
RELEASE_DATE_PRIORITY=digital,theatrical,physical
|
||||
```
|
||||
|
||||
## 📖 Example Workflow
|
||||
You add The Blacklist in Sonarr.
|
||||
|
||||
Reference in New Issue
Block a user