Compare commits
5 Commits
4b43e76822
...
v0.4-fix
Author | SHA1 | Date | |
---|---|---|---|
d29dfa4d3e | |||
d688d766da | |||
5cc10367b2
|
|||
a6002a5e60 | |||
917048a333 |
@@ -159,7 +159,7 @@ async def video_move(
|
|||||||
raise AlbumNameNotFoundError(album)
|
raise AlbumNameNotFoundError(album)
|
||||||
|
|
||||||
if Path(
|
if Path(
|
||||||
f"data"/users/{current_user.user}/albums/{album}/{video['filename']}"
|
f"data/users/{current_user.user}/albums/{album}/{video['filename']}"
|
||||||
).exists():
|
).exists():
|
||||||
base_name = video["filename"].split(".")[:-1]
|
base_name = video["filename"].split(".")[:-1]
|
||||||
extension = video["filename"].split(".")[-1]
|
extension = video["filename"].split(".")[-1]
|
||||||
@@ -181,7 +181,9 @@ async def video_move(
|
|||||||
)
|
)
|
||||||
|
|
||||||
move(
|
move(
|
||||||
Path(f"data/users/{current_user.user}/albums/{video['album']}/{video['filename']}"),
|
Path(
|
||||||
|
f"data/users/{current_user.user}/albums/{video['album']}/{video['filename']}"
|
||||||
|
),
|
||||||
Path(f"data/users/{current_user.user}/albums/{album}/{filename}"),
|
Path(f"data/users/{current_user.user}/albums/{album}/{filename}"),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -252,7 +254,9 @@ async def video_delete(
|
|||||||
album = col_albums.find_one({"name": video["album"]})
|
album = col_albums.find_one({"name": video["album"]})
|
||||||
|
|
||||||
remove(
|
remove(
|
||||||
Path(f"data/users/{current_user.user}/albums/{video['album']}/{video['filename']}")
|
Path(
|
||||||
|
f"data/users/{current_user.user}/albums/{video['album']}/{video['filename']}"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
return Response(status_code=HTTP_204_NO_CONTENT)
|
return Response(status_code=HTTP_204_NO_CONTENT)
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
aiofiles==23.1.0
|
aiofiles==23.1.0
|
||||||
apscheduler~=3.10.1
|
apscheduler~=3.10.1
|
||||||
exif==1.6.0
|
exif==1.6.0
|
||||||
fastapi[all]==0.97.0
|
fastapi[all]==0.98.0
|
||||||
opencv-python~=4.7.0.72
|
opencv-python~=4.7.0.72
|
||||||
passlib~=1.7.4
|
passlib~=1.7.4
|
||||||
pymongo==4.4.0
|
pymongo==4.4.0
|
||||||
|
Reference in New Issue
Block a user