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

Admin commands for gloss videos #1398

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
591d97a
#1397: Command to delete excess backup videos and reorder versions
Nov 26, 2024
c9608be
#1397, #1398: Added renaming of backup files to those that remain
susanodd Nov 27, 2024
aa2ec41
#1397, #1398: Split into two commands, refined code as per review
Nov 28, 2024
a87dd85
Merge branch 'master' into video_storage_commands
Nov 29, 2024
cae023a
#1397, #1398: Added filter on video file type mp4 true false
Nov 29, 2024
f59a97f
#1390: Import get two char dir from tools instead of defining.
susanodd Dec 2, 2024
19f2bbd
Merge branch 'master' into video_storage_commands
susanodd Dec 10, 2024
87e3ec8
Merge branch 'master' into video_storage_commands
Dec 19, 2024
260852d
Merge branch 'master' into video_storage_commands
Jan 7, 2025
c080da7
#1398: Added video admin filters for NME, Perspective videos
Jan 7, 2025
ae58875
#1398: Expanded filters for video admin. Renaming files implemented.
Jan 8, 2025
e8e1569
#1398: Video admin filter for backups, commands renumber, remove
Jan 8, 2025
08e620f
#1398: Admin videos moved functions out of method to allow reuse
Jan 13, 2025
9dea07c
Merge branch 'master' into video_storage_commands
Jan 22, 2025
480c819
Merge branch 'master' into video_storage_commands
susanodd Jan 24, 2025
3624bd7
#1398: Added checks for empty videofile path to package
susanodd Jan 27, 2025
7aaf39a
Merge branch 'master' into video_storage_commands
Feb 3, 2025
eabba1f
Merge branch 'master' into video_storage_commands
Feb 3, 2025
1fba673
Merge branch 'master' into video_storage_commands
Feb 6, 2025
aca9782
Merge branch 'master' into video_storage_commands
Feb 6, 2025
8241c53
Merge branch 'master' into video_storage_commands
Feb 10, 2025
fe7c47a
Merge branch 'master' into video_storage_commands
Feb 12, 2025
19be23f
Merge branch 'master' into video_storage_commands
Feb 13, 2025
722cbc8
1398: Per review, moved all imports to top.
susanodd Feb 17, 2025
b8bffb1
#1398: Per review simplied function code.
susanodd Feb 17, 2025
0f2a0e4
#1398: Per review: Added docstring documentation to Filters of GlossV…
susanodd Feb 17, 2025
2b983e9
#1398: Per review: filename strings are f-strings. Doc-strings for co…
susanodd Feb 18, 2025
e1aea91
#1398: Per review, added exceptions caught (not this issue)
susanodd Feb 18, 2025
5174027
#1398: Per review, guarded clauses (also fixed other places in file)
susanodd Feb 18, 2025
618d9cd
#1398: Per review: More code made guarded to remove indentation
susanodd Feb 19, 2025
3492a1f
#1398: Per review - made other delete_files also return Boolean
susanodd Feb 20, 2025
89a4571
Merge branch 'master' into video_storage_commands
susanodd Feb 20, 2025
350a333
Merge branch 'master' into video_storage_commands
susanodd Feb 20, 2025
97d4861
#1398: Per review: Rewrote video file extension helper function.
susanodd Feb 21, 2025
e1cc632
Merge branch 'master' into video_storage_commands
susanodd Feb 24, 2025
3c68049
#1398: Per review, added doc-strings to column methods of GlossVideoA…
susanodd Feb 24, 2025
cac7166
#1398: Per review: Move admin-command selected backup video files to …
susanodd Feb 25, 2025
7bbf95b
#1398: Per review: Added docstring and fstring to new flattened_video…
susanodd Feb 26, 2025
c9e2a82
#1398: Per review: Gloss Video Admin Wiki Text File
susanodd Feb 26, 2025
677a610
#1398: Per review: Enhanced documentation in text file for video admi…
susanodd Feb 27, 2025
880cbfb
Merge branch 'master' into video_storage_commands
susanodd Mar 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions signbank/dictionary/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2222,13 +2222,13 @@ def package(request):
video_urls = {os.path.splitext(os.path.basename(gv.videofile.name))[0]:
reverse('dictionary:protected_media', args=[gv.small_video(use_name=True) or gv.videofile.name])
for gv in GlossVideo.objects.filter(gloss__in=available_glosses, glossvideonme=None, glossvideoperspective=None, version=0)
if os.path.exists(str(gv.videofile.path))
if gv.videofile and gv.videofile.name and os.path.exists(str(gv.videofile.path))
and os.path.getmtime(str(gv.videofile.path)) > since_timestamp}
image_urls = {os.path.splitext(os.path.basename(gv.videofile.name))[0]:
reverse('dictionary:protected_media', args=[gv.poster_file()])
for gv in GlossVideo.objects.filter(gloss__in=available_glosses, glossvideonme=None, glossvideoperspective=None, version=0)
if os.path.exists(str(gv.videofile.path))
and os.path.getmtime(str(gv.videofile.path)) > since_timestamp}
if gv.videofile and gv.videofile.name and os.path.exists(str(gv.videofile.path))
and os.path.getmtime(str(gv.videofile.path)) > since_timestamp}

interface_language_code = get_interface_language_api(request, request.user)

Expand Down
1 change: 1 addition & 0 deletions signbank/settings/server_specific/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
DATASET_METADATA_DIRECTORY = 'metadata_eafs'
TEST_DATA_DIRECTORY = 'test_data'
BACKUP_VIDEOS_FOLDER = 'video_backups'
DELETED_FILES_FOLDER = 'prullenmand'

#Tmp folder to use
TMP_DIR = '/tmp'
Expand Down
Loading