- Fixed the Imgur embed path.
Imgur now uses a local wrapper page, [provider_embed.php](/Users/tyemeclifford/Documents/GH/mediaplayer/provider_embed.php), that renders Imgur’s official blockquote + https://s.imgur.com/min/embed.js snippet instead of trying to iframe Imgur directly. That should avoid the “refuses to connect” issue for albums, galleries, images, GIFs, GIFV, and videos. Also updated: [includes/db.php](/Users/tyemeclifford/Documents/GH/mediaplayer/includes/db.php): Imgur embed URLs now point to the wrapper, and Imgur view-count scraping has dedicated fallback patterns. [admin/index.php](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/index.php): Upkeeping → Correct Views now explicitly counts Imgur-backed items in the candidate summary. [README.md](/Users/tyemeclifford/Documents/GH/mediaplayer/README.md): documented the Imgur wrapper behavior.
This commit is contained in:
+3
-1
@@ -95,6 +95,7 @@ $list_stmt->execute();
|
||||
$videos = $list_stmt->fetchAll();
|
||||
$youtube_timestamp_candidates = media_youtube_timestamp_candidate_count();
|
||||
$external_view_candidates = media_external_view_count_candidate_count();
|
||||
$imgur_view_candidates = media_imgur_view_count_candidate_count();
|
||||
$admin_total_views = total_video_views(false);
|
||||
|
||||
$qs = fn($p) => '?' . http_build_query(array_filter(['q' => $search, 'page' => $p]));
|
||||
@@ -241,7 +242,8 @@ render_head('Admin — TyClifford.com', '
|
||||
<h2 class="card-title">Correct external view counts</h2>
|
||||
<p class="hint">
|
||||
Scrapes readable counts from supported providers and adds them to the media-site totals alongside local plays.
|
||||
<?= $external_view_candidates ?> external video<?= $external_view_candidates === 1 ? '' : 's' ?> can be checked.
|
||||
<?= $external_view_candidates ?> external video<?= $external_view_candidates === 1 ? '' : 's' ?> can be checked,
|
||||
including <?= $imgur_view_candidates ?> Imgur-backed item<?= $imgur_view_candidates === 1 ? '' : 's' ?>.
|
||||
Current database total: <?= h(view_count_label((int)$admin_total_views)) ?>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user