BUG: Favourite videos are not displayed in the Favourites page

Abierto
#1,506 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

@anurag-sinha04 ya está trabajando en esto.

Desde el 25/8/2026.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
react, redux, typescript
Área
frontend

Línea de trabajo

Comienza en frontend/src/pages/Home/MyFav.tsx leyendo cómo se usan fetchAllImages(), favouriteImages y ChronologicalGallery; después, sigue los puntos de entrada existentes de fetchAllVideos(), la galería de vídeos y VideoCard. El trabajo estará terminado cuando las imágenes y los vídeos marcados como favoritos se rendericen ambos en la página Favourites, quitar cada elemento de favoritos lo elimine y el estado vacío siga siendo apropiado cuando ninguna de las dos listas tenga favoritos.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Python
Estrellas
322
Forks
793
Merge medio
6 d 10 h
PR fusionados (30 d)
20

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de AOSSIE-Org/PictoPy

Todos los issues de AOSSIE-Org/PictoPy

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.