Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhijeetKrishnan committed Mar 24, 2024
2 parents 4f3d60b + 75743a7 commit b7d8356
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/frame_service/wavu/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from framedb.const import CharacterName

WAVU_API_URL = "https://wavu.wiki/w/api.php"
WAVU_VIDEO_LINK = "https://wavu.wiki/t/Special:Redirect/file/"
WAVU_FILE_LINK = "https://wavu.wiki/t/Special:Redirect/file/"

"""Available fields for the Move table in the Wavu DB"""
FIELDS = [
Expand Down Expand Up @@ -128,16 +128,19 @@ def _convert_json_move(move_json: Any) -> WavuMove:
else:
alt = ()

if "image" in move_json:
if "image" in move_json and move_json["image"]:
image = _process_links(move_json["image"])
image_name = image.split(":")[-1]
image_name = image_name.replace(" ", "_")
image = WAVU_FILE_LINK + image_name
else:
image = ""

if "video" in move_json and move_json["video"]:
video = _process_links(move_json["video"])
video_name = video.split(":")[-1]
video_name = video_name.replace(" ", "_")
video = WAVU_VIDEO_LINK + video_name
video = WAVU_FILE_LINK + video_name
else:
video = ""

Expand Down

0 comments on commit b7d8356

Please sign in to comment.