diff --git a/frontend/src/pages/Watch.jsx b/frontend/src/pages/Watch.jsx
index 3538c18..057b7de 100644
--- a/frontend/src/pages/Watch.jsx
+++ b/frontend/src/pages/Watch.jsx
@@ -4,7 +4,7 @@ import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
import {
getVideoByYtId, updateProgress, createDownload, getDownload, deleteDownload,
followChannelByUrl, toggleQueue, toggleLike, getChannelVideos, getChannel,
- getSettings, updateSettings, getRelatedVideos, getDownloads,
+ getSettings, updateSettings, getRelatedVideos, getDownloads, rateVideo,
getBookmarks, createBookmark, updateBookmark, deleteBookmark, importChapters, clearChapters,
getCollections, addToCollection, getQueue,
getVideoComments, refreshVideoComments,
@@ -561,6 +561,7 @@ export default function Watch() {
const [currentTime, setCurrentTime] = useState(0);
const [queued, setQueued] = useState(null);
const [liked, setLiked] = useState(null);
+ const [disliked, setDisliked] = useState(null);
const [selectedQuality, setSelectedQuality] = useState(null);
const [speed, setSpeed] = useState(1);
const [autoplay, setAutoplay] = useState(false);
@@ -772,6 +773,11 @@ export default function Watch() {
onSuccess: (res) => { setLiked(res.data.liked); qc.invalidateQueries({ queryKey: ["liked-videos"] }); },
});
+ const dislikeMut = useMutation({
+ mutationFn: () => rateVideo(video.id, isDisliked ? 0 : -1),
+ onSuccess: (res) => setDisliked(res.data.rating === -1),
+ });
+
const handlePiP = useCallback(async () => {
if (!videoRef.current) return;
try {
@@ -787,6 +793,7 @@ export default function Watch() {
const startAt = video?.watch_progress_seconds ?? 0;
const isQueued = queued ?? video?.queued ?? false;
const isLiked = liked ?? video?.liked ?? false;
+ const isDisliked = disliked ?? (video?.rating === -1) ?? false;
const dlComplete = dlStatus?.status === "complete" || video?.is_downloaded;
const isFollowed = followMut.isSuccess || video?.channel_followed;
const subs = formatSubs(channel?.subscriber_count);
@@ -966,12 +973,20 @@ export default function Watch() {
)}
{video?.id && (
- likeMut.mutate()} disabled={likeMut.isPending}>
-
- {isLiked ? "Liked" : "Like"}
-
+ <>
+ likeMut.mutate()} disabled={likeMut.isPending}>
+
+ {isLiked ? "Liked" : "Like"}
+
+ dislikeMut.mutate()} disabled={dislikeMut.isPending} title="Not for me">
+
+
+ >
)}