This commit adds the functionality to upload both audio and subtitle files simultaneously. It includes changes to the urls.py file to add a new URL pattern for uploading audio and subtitle files. Additionally, a new HTML template upload_audio_subtitle.html is created to display the form for uploading the files. The utils.py file is also modified to include a new function process_subtitle_file that processes the uploaded subtitle file and returns a list of subtitle dictionaries.
The commit also includes database migrations to alter the start_time and end_time fields of the Subtitle model to use DurationField instead of TimeField. This change allows for more accurate representation of subtitle timings.
Lastly, the models.py file is updated to include the Subtitle model with the necessary fields and relationships.
Description
Motivation and Context
How Has This Been Tested?
Dependencies Added:
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
This commit adds the functionality to upload both audio and subtitle files simultaneously. It includes changes to the
urls.py
file to add a new URL pattern for uploading audio and subtitle files. Additionally, a new HTML templateupload_audio_subtitle.html
is created to display the form for uploading the files. Theutils.py
file is also modified to include a new functionprocess_subtitle_file
that processes the uploaded subtitle file and returns a list of subtitle dictionaries.The commit also includes database migrations to alter the
start_time
andend_time
fields of theSubtitle
model to useDurationField
instead ofTimeField
. This change allows for more accurate representation of subtitle timings.Lastly, the
models.py
file is updated to include theSubtitle
model with the necessary fields and relationships.Description
Motivation and Context
How Has This Been Tested?
Dependencies Added:
Types of changes
Checklist: