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

Videos not in Order #1005

Open
ardalis opened this issue Jan 27, 2023 · 11 comments
Open

Videos not in Order #1005

ardalis opened this issue Jan 27, 2023 · 11 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ardalis
Copy link
Collaborator

ardalis commented Jan 27, 2023

Just uploaded videos from 26th and 27th and they're appearing in this order:
image

Should be most recent first.

@ardalis ardalis added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Jan 27, 2023
@samuelwine
Copy link
Contributor

Could this be to do with the video DateCreated somehow set incorrectly?
I tried to follow it back to see where DateCreated is set originally, but I couldn't quite find it.

@ardalis
Copy link
Collaborator Author

ardalis commented Jan 29, 2023

Very likely. I'm not sure where it is set, either, or if it's set by Vimeo and we just import their value. Something to track down for sure.

@totalitydevelopment
Copy link

The code grabs the full video list from the db, then grabs a cached list also.

Any videos that aren't in the cache get added at position 0. Guessing maybe given the close nature of those 2 videos recording time wise you uploaded the 27th before the 26th which left the 26th first in the list.

There is no ordering on the cached list being returned.

That would be the cheap and easy way to resolve...

@samuelwine
Copy link
Contributor

@totalitydevelopment any chance you could add a link to the code you are referencing?

Thanks!

@samuelwine
Copy link
Contributor

thanks @totalitydevelopment.
I'm a bit unsure where that gets called - when i looked through the code, it looked like it was calling this

@totalitydevelopment
Copy link

totalitydevelopment commented Jan 30, 2023

Yeah you're right. Dived in at that code without running as only had a few minutes.

image

Is this more accurate?
image

DevBetterWeb.Web.Endpoints.UploadVideo.AddVimeoVideoInfoAsync

@totalitydevelopment
Copy link

That'll need a manual db tweak for the outstanding issue... or you can could change the spec to order by dateUploaded but there will always be scope for them being uploaded in the wrong order that way...

@samuelwine
Copy link
Contributor

@ardalis what is the process for creating a new video? I'm assuming it gets created locally, then gets uploaded to Vimeo, as well as an "overview" to the DB. Is that correct?
And does the Vimeo upload also get done through the DevBetter site?
Thanks

@ardalis
Copy link
Collaborator Author

ardalis commented Jan 31, 2023

There's a separate Uploaders github repo with a WPF app that does the upload to Vimeo. @ShadyNagy wrote it. It's interested the DateCreated is only Date, not time, which seems to be the issue.

@samuelwine
Copy link
Contributor

Makes sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants