Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show audio/video file lengths #741

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

SkeleyM
Copy link
Contributor

@SkeleyM SkeleyM commented Jan 28, 2025

this pr gets and sets the file lengths for video and audio

image
image

this doesnt block the main thread and i havent noticed any performance hit (my audio libraries arent huge, 30 at best).

@CyanVoxel CyanVoxel added Type: Enhancement New feature or request Type: UI/UX User interface and/or user experience Priority: Medium An issue that shouldn't be be saved for last Status: Review Needed A review of this is needed labels Jan 28, 2025
@CyanVoxel
Copy link
Member

Could you update this from main? This will be easier to review and benchmark with the thumbnail caching system and newest internal library version (DB_VERSION 5)

@CyanVoxel
Copy link
Member

While this does provide duration labels for video and audio files, unfortunately in my testing it indeed appears to lock up the program for several seconds during each operation. Loading pages with video and audio files that would otherwise be instant now takes up to 40 seconds to become responsive.

@SkeleyM
Copy link
Contributor Author

SkeleyM commented Jan 28, 2025

i think the slowdowns are due to my approach. of course reading every single file for each page is extremely slow.

maybe only doing that process once could be beneficial i.e. caching the timestamps in an external file (of course then changes wont be reflected) or having a background thread update the timestamps as it goes to avoid unresponsiveness. or maybe some combination of the two.
i'm going to change this to a draft since this wont be done overnight

@SkeleyM SkeleyM marked this pull request as draft January 28, 2025 20:35
@Nginearing
Copy link
Contributor

Nginearing commented Feb 2, 2025

i think the slowdowns are due to my approach. of course reading every single file for each page is extremely slow.

maybe only doing that process once could be beneficial i.e. caching the timestamps in an external file (of course then changes wont be reflected) or having a background thread update the timestamps as it goes to avoid unresponsiveness. or maybe some combination of the two. i'm going to change this to a draft since this wont be done overnight

Perhaps, you could only show the length on hover, or if it is being used to find a video or audio file of a certain length, maybe it is better suited to be in the form of a search query. This has also been suggested to be part of a file sorting feature #207

@SkeleyM
Copy link
Contributor Author

SkeleyM commented Feb 2, 2025

showing length on hover could work as a temporary way of having the lengths be previewed, so long as it doesnt increase time to interact. might try it and see if it could be suitable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium An issue that shouldn't be be saved for last Status: Review Needed A review of this is needed Type: Enhancement New feature or request Type: UI/UX User interface and/or user experience
Projects
Status: 🏓 Ready for Review
Development

Successfully merging this pull request may close these issues.

3 participants