-Implemented YouTube timestamp correction and added the admin Upkeeping section.
What changed: Added shared YouTube publish-date scraping helpers in [includes/db.php](/Users/tyemeclifford/Documents/GH/mediaplayer/includes/db.php). New YouTube imports now set videos.created_at to the original YouTube publish date when available. Manual Add/Edit saves now also try to correct timestamps for YouTube-backed videos. Added Admin Dashboard → Upkeeping → Correct YouTube timestamps in [admin/index.php](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/index.php), with batch size control for backfilling existing records. Renamed the admin table column from Added to Date, since it may now reflect original publish date. Documented the behavior in [README.md](/Users/tyemeclifford/Documents/GH/mediaplayer/README.md).
This commit is contained in:
@@ -119,6 +119,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$db->prepare("UPDATE videos SET thumbnail=? WHERE id=?")->execute([$thumbnail, $video_id]);
|
||||
}
|
||||
}
|
||||
media_apply_youtube_timestamp($video_id);
|
||||
|
||||
header('Location: edit.php?id=' . $video_id . '&saved=1');
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user