feat: removing a channel opens it on YouTube to unsubscribe

Removing a subscription here only ever taught this app to forget it,
which leaves the job half done. It now opens the channel on YouTube
straight afterwards.

YouTube has no address that unsubscribes on its own — sub_confirmation
only goes the other way — so this opens the channel page, where
Subscribed is one click from Unsubscribe. The confirmation says so
before anything happens, and says that nothing changes on YouTube until
that click.
This commit is contained in:
vincent
2026-09-03 23:53:30 +02:00
parent 14dab91334
commit c2206c8811
+12 -2
View File
@@ -2,7 +2,8 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { listen } from "@tauri-apps/api/event";
import {
cancelAllDownloads, cancelDownload, deleteAllDownloads, deleteChannel,
deleteDownload, downloadVideo, interruptedDownloads, listFeed, previewDeleteChannel,
deleteDownload, downloadVideo, interruptedDownloads, listFeed, openExternal,
previewDeleteChannel,
setDownloadDefaults, type RemovalPreview,
fetchDurations, onRefreshProgress, refreshFeeds, setCookieSource,
} from "./api";
@@ -411,6 +412,10 @@ export default function App() {
if (channelId === id) setChannelId(null);
reload();
say(`Removed ${title}`);
// And then the other half of the job. YouTube has no address that
// unsubscribes on its own, so this opens the channel, where Subscribed
// is one click from Unsubscribe.
openExternal(`https://www.youtube.com/channel/${id}`);
})
.catch((e) => setFailure(String(e)));
}, [removing, channelId, reload, say]);
@@ -874,7 +879,12 @@ export default function App() {
from disk
</>
)}
. Your YouTube subscription is not touched; only this app forgets the channel.
.
</p>
<p className="mt-2">
The channel then opens on YouTube so you can unsubscribe there too
YouTube has no link that does it on its own, so it is one click on{" "}
<b>Subscribed</b>. Nothing changes there until you do.
</p>
</Dialog>
)}