unchained / src /utils /sortPendingVideosByLeastCompletedFirst.mts
barton
Duplicate from jbilcke-hf/VideoChain-API
53aa97a
raw
history blame contribute delete
215 Bytes
import { Video } from "../types.mts"
export function sortPendingVideosByLeastCompletedFirst(videos: Video[]): Video[] {
videos.sort((a: Video, b: Video) => a.progressPercent - b.progressPercent)
return videos
}