Skip to content

MediaGroup media count should only reflect present media

Otherwise nbVideo/nbAudio/nbUnknown will return values that differ from the media listing query.

This also implies that we need a media count that doesn't take into account the presence of the media, which will be used for automatically delete empty groups.

  • Add a new field to count media regardless of their type and presence
  • Update the nb_video/audio/unknown trigger to ignore updates on missing media
  • Add a new trigger to increment/decrement the nb_video/audio/unknown when media presence changes
Edited by Hugo Beauzée-Luyssen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information