BUG: Favourite videos are not displayed in the Favourites page

Open
#1,506 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

@anurag-sinha04 is already working on this.

Since Aug 25, 2026.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, redux, typescript
Domain
frontend

Research direction

Start in frontend/src/pages/Home/MyFav.tsx by reading how fetchAllImages(), favouriteImages, and ChronologicalGallery are used, then trace the existing fetchAllVideos(), video gallery, and VideoCard entry points. The work is done when favourited images and videos both render on the Favourites page, unfavouriting removes each item, and the empty state remains appropriate when neither list has favourites.

Written by the indexing model from the issue text.

Description

bug enhancement
Is there an existing issue for this?
  • I have searched the existing issues
What happened?

Videos can be marked as favourites successfully, but favourited videos do not appear in the Favourites page.

Problem Statement

PictoPy supports favouriting both images and videos. The favourite status for videos is correctly persisted in the backend, and the frontend already provides the required API, Redux state, and UI support for toggling a video's favourite status.

However, the Favourites page currently only loads and filters images. Because videos are not fetched or passed to the Favourites gallery, a video that has been successfully marked as a favourite is missing from the Favourites page.

This makes the favourite functionality inconsistent between images and videos.

Current Behavior
  1. Open PictoPy and navigate to a video.
  2. Hover over the video and use the favourite action.
  3. The video is successfully marked as favourite.
  4. Navigate to the Favourites page.
  5. The favourited video does not appear.
  6. Favourited images are displayed normally.
Expected Behavior

The Favourites page should display both favourited images and favourited videos.

A video marked as favourite should appear in the Favourites page until it is unfavourited.

Technical Details

The backend already supports favourite status for videos.

The videos table contains isFavourite BOOLEAN DEFAULT 0.

The backend also provides db_toggle_video_favourite_status(video_id: str), which updates the video's isFavourite value.

The frontend also supports video favourites through updateVideoFavoriteStatus(...).

The existing video API provides fetchAllVideos() and toggleVideoFav(...).

The VideoCard component also contains the existing favourite action and uses video.isFavourite.

Therefore, the issue is not with storing or toggling the video's favourite status.

Root Cause

The issue is in:

frontend/src/pages/Home/MyFav.tsx

The Favourites page currently fetches only images using fetchAllImages().

It then filters only the image list:

const favouriteImages = useMemo(() => images.filter((image) => image.isFavourite === true), [images]);

The resulting list is passed to the image-only ChronologicalGallery.

There is currently no equivalent fetchAllVideos() call or filtering of favourited videos in the Favourites page.

Impact

Users can successfully favourite videos, but cannot find those favourited videos from the Favourites page.

This creates inconsistent behaviour:

  • Favourite image → appears in Favourites ✅
  • Favourite video → does not appear in Favourites ❌

This may also make users think that their video favourite action was not saved, even though the favourite status is persisted correctly.

Proposed Solution

Update the existing Favourites page to fetch and display both favourite images and favourite videos.

A simple UI approach would be to keep the existing Favourites page and add two sections:

Favourite Images

Display the existing favourited images using the current image gallery.

Favourite Videos

Display favourited videos using the existing video gallery/card components.

This keeps the existing image and video gallery implementations separate while making both types of favourited media accessible from the same Favourites page.

The existing backend favourite functionality, video API, VideoCard, and video state management can be reused without changing their existing behaviour.

Acceptance Criteria
  • Favourited images continue to appear in the Favourites page.
  • Favourited videos appear in the Favourites page.
  • Unfavouriting a video removes it from the Favourites page.
  • Unfavouriting an image continues to remove it from the Favourites page.
  • Existing image and video favourite functionality is not broken.
  • If there are no favourited images or videos, an appropriate empty state is displayed.
Screenshot
Image Image
I would like to work on this issue

Please review and assign it to me if appropriate. I’ll wait for maintainer confirmation before opening a PR.

Record
  • I agree to follow this project's Code of Conduct
Dominant language
Python
Stars
322
Forks
793
Avg merge
6d 10h
Merged PRs (30d)
20

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AOSSIE-Org/PictoPy

All issues in AOSSIE-Org/PictoPy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.