#7520·PeerTube

Filter for shorts / vertical videos

Author: afilinaCreated Mar 24, 2026Updated Sep 3, 2026
LabelsType: Feature Request :sparkles:Component: Search

Describe the problem to be solved

I've been working on a custom plugin and was able to filter vertical videos shorter than 5 minutes with the following hook. It's not ideal as it should be part of the query, which I can't customize with a plugin, AFAIK. It would be tied to a filter in the UI (user preference). Any interest in my working on a PR to the core for this? Is this a desired feature? Some of my users asked for it.

javascript
    registerHook({
        target: 'filter:api.videos.list.result',
        handler: (result, params) => {
            function excludeShorts() {
                result.data = result.data.filter((video) => {
                    return !(video.duration < 300 && video.aspectRatio < 1)
                })
            }

            excludeShorts();

            return result
        }
    })

Describe the solution you would like

No response