mirror of
https://github.com/mmjee/Piped-Material.git
synced 2024-12-06 19:26:36 +01:00
Return the most watched item in the database
This fixes a issue where a more recent watch event that was shorter than a existing watch confused users into thinking that the video wasn't completely watched already.
This commit is contained in:
@@ -23,8 +23,9 @@ export function updateWatchedVideoProgress (videoID, prog, dur) {
|
||||
})
|
||||
}
|
||||
|
||||
export function findLastWatch (videoId) {
|
||||
return PMDB.watchedVideos.where('videoId').equals(videoId).last()
|
||||
export async function findLastWatch (videoId) {
|
||||
const v = await PMDB.watchedVideos.where('videoId').equals(videoId).reverse().sortBy('progressPcnt')
|
||||
return v[0]
|
||||
}
|
||||
|
||||
export function getWatchedVideos () {
|
||||
|
||||
Reference in New Issue
Block a user