- Implemented:
Added view_count database migration/defaults and shared helpers in [includes/db.php](/Users/tyemeclifford/Documents/GH/mediaplayer/includes/db.php). Public player and embed.php now increment views. Homepage and catalogue can display per-video views, total views, and public stats based on admin settings. Added Admin → Settings toggles for public view/stat display. Added Admin → Upkeeping action to restore external view counts from readable provider pages, with YouTube scraping support first. Added manual per-video view-count editing in [admin/edit.php](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/edit.php) for older local uploads or corrections. Updated [README.md](/Users/tyemeclifford/Documents/GH/mediaplayer/README.md) with the new behavior.
This commit is contained in:
@@ -9,6 +9,9 @@ require_once __DIR__ . '/includes/db.php';
|
||||
|
||||
$slug = trim($_GET['v'] ?? '');
|
||||
$video = $slug ? get_video_by_slug($slug) : null;
|
||||
if ($video) {
|
||||
$video['view_count'] = increment_video_view_count((int)$video['id']);
|
||||
}
|
||||
|
||||
// Determine absolute base URL for media files.
|
||||
// We need absolute URLs here because the embed lives on a foreign domain.
|
||||
|
||||
Reference in New Issue
Block a user