Skip to content
Kellerman81 edited this page Dec 21, 2025 · 1 revision

Web Interface

The web interface provides a comprehensive management dashboard for go_media_downloader with configuration tools, testing utilities, database management, and monitoring features.

Accessing the Web Interface

Setup:

  1. Configure web interface in config.toml:

    [general]
    webport = "9090"
    webapikey = "your_secure_api_key"
    web_portal_enabled = true
    disable_swagger = false
  2. Start the application

  3. Navigate to http://localhost:9090/api/admin

  4. Login with credentials:

    • Username: admin
    • Password: Your configured API key (or admin if not set)

Session Information:

  • Session duration: 24 hours
  • CSRF token protection on all state-changing operations
  • HTTP-only session cookies
  • Automatic session cleanup for expired sessions

Navigation Structure

The sidebar provides access to all features organized into four sections:

Configuration

  • General, IMDB, Media, Downloader
  • Lists, Indexers, Paths, Notifications
  • Regex, Quality, Scheduler, Series Config

Database

  • DBMovies, DBMovie Titles, DBSeries
  • Episodes, Series, Files
  • Histories, Unmatcheds, Job Histories

Management

  • Queue, Scheduler, Statistics
  • Job Management, Database Maintenance
  • Search & Download, Log Viewer

Tools

  • Cron Generator, Naming Generator
  • Quality Reorder, Test Parsing
  • Test Naming, Test Metadata
  • Trakt Authentication, Regex Tester

Tools & Features

1. Cron Generator

Location: /api/admin/crongen

Generate and validate cron expressions for task scheduling.

Features:

Quick Presets:

  • Every 30 seconds: */30 * * * * *
  • Every 5 minutes: 0 */5 * * * *
  • Every hour: 0 0 * * * *
  • Daily at midnight: 0 0 0 * * *
  • Daily at noon: 0 0 12 * * *
  • Weekly (Sunday): 0 0 0 * * 0
  • Monthly: 0 0 0 1 * *

Manual Input Fields:

  • Second (0-59)
  • Minute (0-59)
  • Hour (0-23)
  • Day (1-31, supports L for last day)
  • Month (1-12, supports JAN-DEC)
  • Weekday (0-6, 0=Sunday, supports SUN-SAT)

Real-time Validation:

  • Human-readable cron descriptions
  • Shows next execution times
  • Validates expression syntax
  • Copy generated expression to clipboard

Example Expressions:

0 0 * * * *        # Every hour at :00
0 */15 * * * *     # Every 15 minutes
0 0 0 * * 1-5      # Weekdays at midnight
0 0 12 1 * *       # First day of month at noon
0 30 9 * * 1,3,5   # Monday, Wednesday, Friday at 9:30 AM

API Endpoint:

  • POST /api/admin/crongen/validate - Validate cron expression

2. Naming Generator

Location: /api/admin/naming-generator

Advanced template generator for file naming and notifications.

Data Types:

Parser Type - For media file naming templates:

  • Used in media group naming configuration
  • Generates file and folder names

Notification Type - For notification messages:

  • Used in media group notification configuration
  • Generates notification content

Available Fields (Movies):

  • {{.Dbmovie.Title}} - Movie title
  • {{.Dbmovie.Year}} - Release year
  • {{.Dbmovie.ImdbID}} - IMDB ID
  • {{.Dbmovie.Runtime}} - Runtime in minutes
  • {{.Dbmovie.Genres}} - Genre list
  • {{.Dbmovie.VoteAverage}} - Average rating
  • {{.Source.Resolution}} - Video resolution (1080p, 720p, etc.)
  • {{.Source.Quality}} - Source quality (BluRay, WEB-DL, etc.)
  • {{.Source.Codec}} - Video codec (x265, x264, etc.)
  • {{.Source.Audio}} - Audio codec (DTS, AC3, etc.)
  • {{.Source.Proper}} - Boolean: is proper release
  • {{.Source.Extended}} - Boolean: is extended edition
  • {{.Source.Repack}} - Boolean: is repack
  • {{.Source.Imdb}} - IMDB ID from release

Available Fields (Series):

  • {{.Dbserie.Seriename}} - Series name
  • {{.DbserieEpisode.Season}} - Season number
  • {{.DbserieEpisode.Episode}} - Episode number
  • {{.DbserieEpisode.Identifier}} - S##E## format
  • {{.DbserieEpisode.Title}} - Episode title
  • {{range .Episodes}}E{{printf "%02d" .}}{{end}} - Multiple episodes
  • {{.Dbserie.ImdbID}} - IMDB ID
  • {{.Dbserie.ThetvdbID}} - TVDB ID
  • {{.Source.*}} - Same as movies

Available Fields (Notifications):

  • {{.Time}} - Timestamp
  • {{.Title}} - Media title
  • {{.Year}} - Release year (movies)
  • {{.Season}} - Season number (series)
  • {{.Episode}} - Episode number (series)
  • {{.Identifier}} - Episode/year identifier
  • {{.InputNotifier.SourcePath}} - Original file path
  • {{.InputNotifier.Targetpath}} - Destination path
  • {{.Configuration}} - Media group name
  • {{.Replaced}} - Array of replaced files
  • {{range .Replaced}}{{.}},{{end}} - Iterate replacements

Features:

  • Drag-and-drop field selection
  • Template structure presets
  • Field search functionality
  • Live template preview
  • Template validation
  • Category-based field organization
  • Copy generated template to clipboard

Example Templates:

# Movie naming
"{{.Dbmovie.Title}} ({{.Dbmovie.Year}})/{{.Dbmovie.Title}} ({{.Dbmovie.Year}}) [{{.Source.Resolution}} {{.Source.Quality}}]"

# Series naming
"{{.Dbserie.Seriename}}/Season {{printf \"%02s\" .DbserieEpisode.Season}}/{{.Dbserie.Seriename}} S{{printf \"%02s\" .DbserieEpisode.Season}}E{{printf \"%02d\" .DbserieEpisode.Episode}}"

# Notification message
"{{.Title}} - moved from {{.InputNotifier.SourcePath}} to {{.InputNotifier.Targetpath}}"

API Endpoints:

  • GET /admin/naming-generator/fields/:type - Get available fields
  • POST /admin/naming-generator/preview - Preview template
  • POST /admin/naming-generator/verify - Verify syntax

3. Quality Reorder

Location: /api/admin/quality-reorder

Manage quality detection priority and parsing rules.

Quality Types:

  1. Resolution - 1080p, 720p, 2160p, 480p, etc.
  2. Quality - BluRay, WEB-DL, HDTV, DVDRip, etc.
  3. Codec - x264, x265, HEVC, AV1, etc.
  4. Audio - AAC, DTS, TrueHD, AC3, etc.

Features:

  • Set numeric priority values (higher number = higher priority)
  • Reorder quality detection sequence
  • Add custom quality detection rules
  • Remove quality rules
  • Reset to default rules
  • Profile-specific quality configuration

Priority Management:

  • Each quality item has a priority score
  • Higher priority items are preferred during parsing
  • Used for automatic quality selection
  • Affects upgrade decisions

Adding Custom Rules:

  1. Select quality type (Resolution/Quality/Codec/Audio)
  2. Enter quality name (e.g., "4K", "UHD")
  3. Optionally provide regex pattern for detection
  4. Set priority value
  5. Save rule

API Endpoints:

  • GET /api/admin/quality-reorder - Get current quality rules
  • POST /api/admin/quality-reorder - Update quality rules
  • POST /api/admin/quality-reorder/add-rule - Add new rule
  • POST /api/admin/quality-reorder/reset-rules - Reset defaults
  • GET /api/admin/quality-profile-rules - Get profile rules

4. Test Parsing

Location: /api/admin/testparse

Test file name parsing against configured regex patterns.

Purpose: Validate that release names are correctly parsed to extract quality information.

Input:

  • Filename or release name string
  • Optional: Select specific regex configuration to test

Testing Against:

  • Configured regex patterns from quality profiles
  • Global scanning patterns
  • Quality detection rules

Output:

  • Matches Found: True/false indicator
  • Extracted Values:
    • Resolution (1080p, 720p, etc.)
    • Quality (BluRay, WEB-DL, etc.)
    • Codec (x265, x264, etc.)
    • Audio (DTS, AC3, etc.)
    • Proper/Repack flags
  • Match Details: Which pattern matched
  • Error Messages: If parsing failed

Example Test Cases:

Input: "The.Matrix.1999.1080p.BluRay.x264.DTS-HD"
Output:
  Resolution: 1080p
  Quality: BluRay
  Codec: x264
  Audio: DTS

Input: "Breaking.Bad.S01E01.720p.WEB-DL.x265.AAC"
Output:
  Season: 01
  Episode: 01
  Resolution: 720p
  Quality: WEB-DL
  Codec: x265
  Audio: AAC

API Endpoints:

  • GET /admin/testparse - Display test page
  • POST /admin/testparse - Execute parsing test

5. Test Naming

Location: /api/admin/namingtest

Test naming templates with sample data before deploying to production.

Purpose: Preview how naming templates will format actual files.

Input:

  • Template string with placeholders
  • Test data selection (choose sample movie/series)
  • Manual field value overrides

Features:

  • Live template preview
  • Variable substitution validation
  • Error detection for invalid templates
  • Format string validation (printf)
  • Escaped character support
  • Multiple test cases

Output:

  • Generated Filename/Path: Preview of final result
  • Validation Errors: Invalid syntax, missing variables
  • Warnings: Potential issues

Example Tests:

Template:
"{{.Dbmovie.Title}} ({{.Dbmovie.Year}})/{{.Dbmovie.Title}} [{{.Source.Resolution}}]"

Sample Data:
  Title: "The Matrix"
  Year: 1999
  Resolution: 1080p

Result:
"The Matrix (1999)/The Matrix [1080p]"

API Endpoints:

  • GET /admin/namingtest - Display test page
  • POST /admin/namingtest - Execute template test

6. Test Metadata

Location: /api/admin/moviemetadata

Test metadata retrieval from external sources (TMDB, IMDB, Trakt).

Purpose: Verify that metadata APIs are working and returning correct information.

Input:

  • Movie or series name
  • Year (optional, for disambiguation)
  • Data type (movie or series)

Features:

  • Search IMDB database
  • Retrieve metadata from TMDB
  • Query Trakt API
  • Display comprehensive results

Output:

  • Basic Information:

    • Title (original and localized)
    • Year/release date
    • Runtime
    • Language
  • Ratings & Popularity:

    • IMDB rating and vote count
    • TMDB rating
    • Trakt rating
  • Content Details:

    • Plot/overview
    • Genres
    • Status (released, upcoming, etc.)
  • Identifiers:

    • IMDB ID
    • TMDB ID
    • TVDB ID (series)
    • Trakt ID
  • Additional:

    • Alternative titles
    • Cast information (if available)
    • Poster/backdrop URLs

API Endpoints:

  • GET /admin/moviemetadata - Display test page
  • POST /admin/moviemetadata - Execute metadata lookup

7. Trakt Authentication

Location: /api/admin/traktauth

Configure Trakt API OAuth authentication for list integration.

OAuth Setup Process:

  1. Generate Authorization URL:

    • Click "Get Trakt Authorization URL"
    • System generates OAuth request
    • Authorization URL displayed
  2. User Authorization:

    • Click authorization URL
    • Redirected to Trakt login page
    • Approve access to your account
  3. Token Exchange:

    • Copy authorization code from callback URL
    • Paste code into web interface
    • System exchanges code for access token
    • Refresh token stored for future use
  4. Verification:

    • Token status displayed (active/expired)
    • User information shown
    • List access confirmed

Features:

  • Token management
  • Auto token refresh before expiration
  • Token revocation
  • User list loading
  • Watchlist import
  • Sync status indicator

Using Trakt Lists: After authentication, you can:

  • Import Trakt watchlists
  • Sync user lists
  • Auto-remove from Trakt lists after import (if configured)
  • View list statistics

API Endpoints:

  • GET /api/trakt/authorize - Get authorization URL
  • GET /api/trakt/token/:code - Exchange code for token
  • GET /api/trakt/user/:user/:list - Fetch user's list
  • POST /api/trakt/refresh - Refresh expired token

Database Management

Location: /api/admin/database/:tablename

Manageable Tables:

Movie Tables:

  • DBMovies - Movie metadata from external sources
  • DBMovie Titles - Alternative movie titles
  • Movies - Tracked movies with list associations
  • Movie Files - Downloaded movie files
  • Movie Histories - Download history
  • Movie Unmatcheds - Files that couldn't be matched

Series Tables:

  • DBSeries - Series metadata from external sources
  • DBSerie Episodes - Episode information
  • DBSerie Alternates - Alternative series names
  • Series - Tracked series with list associations
  • Serie Episodes - Tracked episodes
  • Serie Episode Files - Downloaded episode files
  • Serie Episode Histories - Episode download history
  • Serie Episode Unmatcheds - Unmatched episode files

Other Tables:

  • Qualities - Quality detection rules
  • Job Histories - Scheduler job execution history

CRUD Operations:

  • View: Paginated table view with sorting
  • Add: Modal form to insert new records
  • Edit: Inline or modal editing
  • Delete: Single or bulk deletion
  • Export: Export table data to CSV

Filtering: Custom filter fields per table:

  • Movies: Title, year, IMDB ID, rating, language
  • Series: Series name, TVDB ID, status
  • Files: Quality, resolution, codec
  • Histories: Date range, download status

Advanced Features:

  • AJAX-powered searchable dropdowns
  • Dynamic data loading for large datasets
  • Related record lookups
  • Pagination with customizable page size
  • Sortable columns
  • Bulk operations

API Endpoints:

  • POST /api/admin/table/:name/insert - Insert record
  • POST /api/admin/table/:name/update/:id - Update record
  • DELETE /api/admin/table/:name/delete/:id - Delete record
  • POST /api/admin/dropdown/:table/:field - Load dropdown options

Configuration Forms

Location: /api/admin/config/:configtype

Edit all application configuration through web forms.

Configuration Types:

  1. General - Core application settings

    • Web port, API key
    • Logging configuration
    • Worker pools
    • Cache settings
  2. IMDB - IMDB integration

    • Indexed types
    • Indexed languages
    • Database optimization
  3. Media - Media groups

    • Movies configuration
    • Series configuration
    • Naming templates
    • Quality profiles
  4. Downloader - Download clients

    • SABnzbd, NZBGet
    • qBittorrent, Transmission
    • rTorrent, Deluge, Drone
  5. Lists - List sources

    • IMDB, Trakt, TMDB
    • Plex, Jellyfin
    • RSS feeds, scrapers
  6. Indexers - Search indexers

    • Newznab/Torznab configuration
    • API keys, categories
    • Rate limiting
  7. Paths - File system paths

    • Storage paths
    • Import paths
    • File handling rules
  8. Notifications - Alert services

    • Pushover, Gotify
    • Pushbullet, Apprise
    • CSV logging
  9. Regex - Custom patterns

    • Release name filtering
    • Quality detection
    • Group filtering
  10. Quality - Quality profiles

    • Wanted qualities
    • Cutoff settings
    • Reorder rules
  11. Scheduler - Job scheduling

    • Cron expressions
    • Interval schedules
    • Task configuration

Features:

  • Dynamic form rendering
  • Type-specific input controls
  • Form validation with error messages
  • CSRF token protection
  • Real-time preview (where applicable)
  • Hierarchical sections

API Endpoints:

  • GET /admin/config/:configtype - Display configuration form
  • POST /admin/config/:configtype/update - Save configuration
  • GET /api/config/all - Get all configurations
  • GET /api/config/get/:name - Get specific configuration
  • POST /api/config/update/:name - Update via API

Management Features

Job Management

Location: /api/admin/jobmanagement

Manually trigger scheduled tasks.

Available Jobs:

  • Data Scan - Scan media folders for new files
  • Data Import - Import files from download folders
  • Feeds - Update metadata from lists
  • Feeds Refresh - Refresh existing metadata
  • Indexer Missing - Search for missing media
  • Indexer Upgrade - Search for quality upgrades
  • Indexer RSS - Check RSS feeds for new releases
  • Database Backup - Create database backup
  • Database Check - Verify database integrity
  • IMDB Update - Update IMDB cache

Options:

  • Select media configuration
  • Specify list names
  • Force execution (bypass intervals)
  • Choose job type (incremental/full)

Queue Management

View and manage the job queue.

Features:

  • View pending jobs
  • View job history
  • Cancel queued jobs
  • Job status monitoring
  • Execution time tracking
  • Job priority management

Statistics Dashboard

Location: /api/admin/statistics

View application statistics and metrics.

Sections:

Media Statistics:

  • Total movies/series count
  • Quality distribution
  • Missing media count
  • Downloaded file sizes

Worker Statistics:

  • Active jobs
  • Completed jobs
  • Failed jobs
  • Worker pool utilization

Storage Statistics:

  • Disk usage by path
  • Free space available
  • Archive size

API Statistics:

  • Request counts
  • Response times
  • Error rates

Metadata Cache:

  • Cache hit rate
  • Cached entries
  • Cache size

Notifications:

  • Sent notifications
  • Failed notifications

Downloader Performance:

  • Download speeds
  • Queue sizes
  • Client status

Log Viewer

Location: /api/admin/logviewer

Real-time log viewing and analysis.

Features:

  • Real-time log streaming
  • Log filtering by level (debug, info, warning, error)
  • Search functionality
  • Export to file
  • Tail mode for live updates
  • Log rotation status
  • File size monitoring

Filter Options:

  • Log level selection
  • Time range filtering
  • Text search
  • Component filtering (parser, downloader, scheduler, etc.)

Database Maintenance

Location: /api/admin/dbmaintenance

Database health and maintenance tools.

Operations:

  • Integrity Check - Verify database consistency
  • Vacuum - Optimize database and reclaim space
  • Cache Clear - Clear internal caches
  • Old History Cleanup - Remove old job history entries
  • Backup Creation - Create manual database backup
  • Validation - Validate foreign keys and constraints

Scheduled Maintenance: Configure automatic maintenance tasks in scheduler:

  • interval_database_check - Regular integrity checks
  • interval_database_backup - Automatic backups

Additional Tools

Regex Tester

Test regex patterns against sample strings.

Features:

  • Test custom regex patterns
  • Validate pattern syntax
  • Real-time match highlighting
  • Capture group display
  • Pattern debugging

Missing Episodes Finder

Location: /api/admin/missing-episodes

Find gaps in series collections.

Features:

  • Search for missing episodes
  • Filter by series/season
  • Date range filtering
  • Quality profile selection
  • Auto-download trigger
  • Results in sortable table

Search & Download

Location: /api/admin/searchdownload

Manual search and download interface.

Features:

  • Manual movie search
  • Manual series search
  • Quality override
  • Indexer selection
  • Download initiation
  • Progress tracking

Media Cleanup

Location: /api/admin/media-cleanup

Find and clean up media issues.

Features:

  • Find orphaned files (in database but not on disk)
  • Find untracked files (on disk but not in database)
  • Broken file detection
  • File validation
  • Cleanup execution with preview
  • Detailed reports

Pushover Test

Location: /api/admin/pushovertest

Test Pushover notification delivery.

Features:

  • Verify Pushover credentials
  • Send test notification
  • Check delivery status
  • Test different message types

Security Features

Authentication

  • Session-based authentication
  • 24-hour session timeout
  • Secure password hashing
  • API key requirement for programmatic access

CSRF Protection

  • CSRF tokens on all state-changing operations
  • Token validation middleware
  • Automatic token generation

Session Management

  • HTTP-only cookies
  • Secure session storage
  • Automatic cleanup of expired sessions
  • Session regeneration on login

API Security

  • API key authentication
  • Rate limiting (configurable)
  • Request validation
  • Error message sanitization

Tips

  1. Regular Backups: Use Database Maintenance to create backups before major changes
  2. Test Templates: Always test naming templates before applying to production
  3. Monitor Logs: Use Log Viewer to troubleshoot issues in real-time
  4. Queue Management: Monitor job queue to ensure tasks are executing properly
  5. Statistics Review: Regularly check statistics dashboard for system health
  6. Regex Testing: Test regex patterns before deploying to avoid false matches
  7. Metadata Validation: Use Test Metadata to verify API connectivity
  8. Cron Validation: Use Cron Generator to validate schedule expressions
  9. Database Integrity: Run integrity checks periodically
  10. Security: Change default API key immediately after installation

Clone this wiki locally