mirror of
https://github.com/thegeneralist01/archivr
synced 2026-07-22 03:05:32 +02:00
fix(frontend): drop m.youtube.com from isPlaylistSource
Backend determine_source playlist/channel regex only matches (?:www\.)?youtube\.com — mobile URLs hitting m.youtube.com would be probed as playlist in the UI but captured as Source::Url server-side. Remove m.youtube.com from the detector to keep frontend and backend in exact agreement. Add backend support when needed.
This commit is contained in:
parent
f096b052ab
commit
34ec0b44e2
3 changed files with 3 additions and 3 deletions
File diff suppressed because one or more lines are too long
|
|
@ -4,7 +4,7 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>Archivr</title>
|
<title>Archivr</title>
|
||||||
<script type="module" crossorigin src="/assets/index-CChk7xCp.js"></script>
|
<script type="module" crossorigin src="/assets/index-Biv9sexV.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-vCRGeW0A.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-vCRGeW0A.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ function isPlaylistSource(locator) {
|
||||||
try {
|
try {
|
||||||
const url = new URL(l)
|
const url = new URL(l)
|
||||||
const host = url.hostname
|
const host = url.hostname
|
||||||
if (host === 'youtube.com' || host === 'www.youtube.com' || host === 'm.youtube.com') {
|
if (host === 'youtube.com' || host === 'www.youtube.com') {
|
||||||
// Mirror determine_source exactly:
|
// Mirror determine_source exactly:
|
||||||
// - /playlist?list=... → YouTubePlaylist
|
// - /playlist?list=... → YouTubePlaylist
|
||||||
// - /@handle, /channel/, /c/, /user/ → YouTubeChannel
|
// - /@handle, /channel/, /c/, /user/ → YouTubeChannel
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue