Removed the Imgur-specific provider handling from
[includes/db.php](/Users/tyemeclifford/Documents/GH/mediaplayer/includes/db.php),
removed the admin upkeep Imgur counter/copy from
[admin/index.php](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/index.php),
updated the upload hint in
[admin/add.php](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/add.php),
cleaned the README mentions, and deleted provider_embed.php.
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.
Added external_view_count so provider totals from YouTube/Vimeo/etc are
added to the site’s total without double-counting local plays.
Updated public totals and per-video public view displays to use site
views + external views.
Changed Upkeeping action to Correct external view counts with a Correct
Views button.
Expanded provider scraping beyond YouTube with generic
page/JSON-LD/oEmbed patterns for readable Vimeo, Dailymotion, and
similar pages.
Improved Add Video:Title no longer has to be manually entered first.
External URL rows now have Fetch Info.
Metadata can fill title, description, duration, source label, and
external view count.
Save also retries metadata extraction server-side.
Added authenticated metadata endpoint:
[admin/media_info.php](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/media_info.php).
Updated docs in
[README.md](/Users/tyemeclifford/Documents/GH/mediaplayer/README.md).
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.
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).
What changed:
Added pretty URL helpers/default setting in
[includes/db.php](/Users/tyemeclifford/Documents/GH/mediaplayer/includes/db.php).
Added root rewrite rules in
[.htaccess](/Users/tyemeclifford/Documents/GH/mediaplayer/.htaccess):/v/<slug>
/all
/search/<query>
Added Admin → Settings “Public URL Style” toggle in
[admin/settings.php](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/settings.php),
defaulting to pretty URLs.
Updated public/player/catalogue/embed/admin preview links to use the
configured URL style.
Added redirects from legacy ?v= and ?q= URLs to pretty routes when
rewriting is enabled.
Documented deployment and fallback behavior in
[README.md](/Users/tyemeclifford/Documents/GH/mediaplayer/README.md).
Added [admin/youtube_import.php (line
1)](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/youtube_import.php:1),
which:
Accepts a channel URL, @handle, or UC... channel ID.
Scrapes the channel /videos page.
Extracts videos from ytInitialData.
Shows a preview with checkboxes.
Imports selected videos into videos and video_sources.
Stores each video as a canonical YouTube watch URL with mime_type =
text/html, so the existing YouTube embed playback path handles it
correctly.
Downloads scraped thumbnails into media/thumbs/ when possible.
Skips duplicates by matching existing remote YouTube URLs.
Also wired it into the admin navigation in [admin/index.php (line
172)](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/index.php:172),
[admin/add.php (line
199)](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/add.php:199),
[admin/edit.php (line
267)](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/edit.php:267),
and [admin/settings.php (line
109)](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/settings.php:109).
Updated [README.md (line
81)](/Users/tyemeclifford/Documents/GH/mediaplayer/README.md:81) with
usage notes.
Changed:
[includes/db.php (line
43)](/Users/tyemeclifford/Documents/GH/mediaplayer/includes/db.php:43)
adds source_type and source_url, with an automatic migration for
existing SQLite databases.
[admin/add.php (line
260)](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/add.php:260)
and [admin/edit.php (line
383)](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/edit.php:383)
now let each source be an upload or an external URL.
[index.php (line
226)](/Users/tyemeclifford/Documents/GH/mediaplayer/index.php:226) and
[embed.php (line
193)](/Users/tyemeclifford/Documents/GH/mediaplayer/embed.php:193)
resolve playback URLs based on where the source lives.
[catalogue.php (line
79)](/Users/tyemeclifford/Documents/GH/mediaplayer/catalogue.php:79) now
has public search for published videos only.
[README.md (line
63)](/Users/tyemeclifford/Documents/GH/mediaplayer/README.md:63)
documents local vs remote sources and public search.