added protection agains deletion
This commit is contained in:
@@ -63,6 +63,9 @@ def show_video_row(
|
||||
(st.rerun if hasattr(st, "rerun") else st.experimental_rerun)()
|
||||
with c3:
|
||||
if st.button("🗑️", key=f"del_{video.file_name}"):
|
||||
if preselected_labels and len(preselected_labels) > 0:
|
||||
st.warning("Vidéo labelisée.")
|
||||
else:
|
||||
st.session_state[play_key] = False
|
||||
if os.path.exists(video.raw_file ):
|
||||
os.remove(video.raw_file)
|
||||
|
||||
Reference in New Issue
Block a user