Signbank / signbank-video

Video handling for the Signbank sign language dictionary
Other
2 stars 2 forks source link

Multiple videos for one Gloss #3

Open stevecassidy opened 7 years ago

stevecassidy commented 7 years ago

@henrinie said: We need to be able to upload multiple videos for one Gloss. We use GlossVideo.version to store the defined order of videos to show on gloss page. Users can arrange the videos to a desired order on the gloss page. It seems that TaggedVideoManager would "mess" the version numbers for us if a new video is uploaded. On the other hand, it might not, the uploaded video would just show first and then it could be moved to where the user wants. Does TaggedVideoManager only update the version when a new video is added (it seems so)?

stevecassidy commented 7 years ago

Currently the design is for a single video associated with one category/tag pair with versioning to allow 'undo' to recover the previously uploaded video.

What you describe is a different use case where you want multiple videos per Gloss. If you are currently subverting the version number to store your versions then I guess you could do this again here. However it would be better to have something that addressed your use more directly.

One option would be to append an index counter to the end of the 'tag' so store a video under 'Gloss'/'123_1' 'Gloss/'123_2' etc. You could then find these with a startswith filter.

Another option would be to add a third field into the model for an index number that would default to 0.

If we did this then you'd be able to push new versions of the Nth video for your gloss if you wanted to - not sure if that is a requirement for you.

henrinie commented 7 years ago

I don't think that we need to have this versioning to be able to be able to 'undo' video uploads. I will have to think about this.