Collect discovered video metadata and recommend videos from listening history
This commit is contained in:
@@ -60,6 +60,7 @@ const SHELL = [
|
||||
'/refresh.css',
|
||||
'/theme-glass.css',
|
||||
'/theme-classic.css',
|
||||
'/recommendations.css',
|
||||
'/flag-ui.js',
|
||||
'/export.js',
|
||||
'/async-guard.js',
|
||||
@@ -203,6 +204,12 @@ self.addEventListener('fetch', (e) => {
|
||||
// The admin page is online-only and must never be served from a cache.
|
||||
if (url.pathname === '/admin' || url.pathname.startsWith('/admin.')) return;
|
||||
|
||||
// Catalog artwork uses the same offline image cache as YouTube artwork.
|
||||
if (url.origin === self.location.origin && /^\/api\/catalog\/[\w-]{11}\/thumbnail$/.test(url.pathname)) {
|
||||
e.respondWith(thumbnail(request));
|
||||
return;
|
||||
}
|
||||
|
||||
// API calls and binary downloads → network only, no caching
|
||||
if (url.pathname.startsWith('/api/')) {
|
||||
e.respondWith(fetch(request));
|
||||
|
||||
Reference in New Issue
Block a user