AthletiFi / athletifi-website

Official website for AthletiFi
https://www.athleti.fi
1 stars 5 forks source link

Investigate whether highlight timestamps are properly being pulled from the highlights table in the database for the right match and populate the video player #302

Closed qisforq closed 1 month ago

qisforq commented 1 month ago

Continuing #265

chef-louis commented 1 month ago

@pm-moyanor I've sanity checked the highlights for Stebi URL: http://localhost:3000/dashboard/vsa-23/179. The highlights for each match summary matches the outputs from the API:

Image Image

[
  {
    "datetime": "Wednesday 24 Apr 2024 . 12:00",
    "location": "Philadelphia, PA",
    "weather": {
      "date": "2024-04-24",
      "location": "Philadelphia, PA",
      "precipIn": 0,
      "precipMm": 0.1,
      "tempCelc": 17.8,
      "tempFahr": 63.9,
      "weatherDesc": "Cloudy skies",
      "weatherIcon": "Cloudy.gif",
      "windSpeedKmh": 20,
      "windSpeedMph": 12
    },
    "home_score": 2,
    "away_score": 2,
    "home_club": "Villanova Soccer Academy",
    "away_club": "Stellar FC",
    "home_club_logo": "https://athletifi-s3.s3.us-east-2.amazonaws.com/logos/vsa-logo.svg",
    "away_club_logo": "https://athletifi-s3.s3.us-east-2.amazonaws.com/logos/stellar-fc-logo.svg",
    "home_team": "VSA 2009s",
    "away_team": "Stellar FC U14",
    "video_key": "match_videos/pixellot_video_2.mp4",
    "playback_id": "qVe4r2Bp2BIB7H23i1ZajlCxP47kjRuCusmfUdqc4lc",
    "duration": 4850.7744,
    "highlights": [
      {
        "clip_description": "Stebi Vidal makes a crucial tackle to stop a counterattack",
        "duration": "00:00:18",
        "start_timestamp": "00:12:30"
      },
      {
        "clip_description": "Stebi Vidal delivers a pinpoint cross into the box",
        "duration": "00:00:09",
        "start_timestamp": "00:37:45"
      },
      {
        "clip_description": "Stebi Vidal scores a stunning goal from outside the box",
        "duration": "00:00:14",
        "start_timestamp": "01:15:20"
      }
    ]
  },
  {
    "datetime": "Tuesday   23 Apr 2024 . 12:00",
    "location": "Glenside, PA",
    "weather": {
      "date": "2024-04-23",
      "location": "Glenside, PA",
      "precipIn": 0,
      "precipMm": 0,
      "tempCelc": 19.4,
      "tempFahr": 66.9,
      "weatherDesc": "Sunny skies",
      "weatherIcon": "Sunny.gif",
      "windSpeedKmh": 12,
      "windSpeedMph": 8
    },
    "home_score": 1,
    "away_score": 2,
    "home_club": "Stellar FC",
    "away_club": "Villanova Soccer Academy",
    "home_club_logo": "https://athletifi-s3.s3.us-east-2.amazonaws.com/logos/stellar-fc-logo.svg",
    "away_club_logo": "https://athletifi-s3.s3.us-east-2.amazonaws.com/logos/vsa-logo.svg",
    "home_team": "Stellar FC U12",
    "away_team": "VSA 2009s",
    "video_key": "match_videos/pixellot_video_2.mp4",
    "playback_id": "qVe4r2Bp2BIB7H23i1ZajlCxP47kjRuCusmfUdqc4lc",
    "duration": 4850.7744,
    "highlights": [
      {
        "clip_description": "Stebi Vidal plays a perfectly weighted through ball",
        "duration": "00:00:10",
        "start_timestamp": "00:59:52"
      },
      {
        "clip_description": "Stebi Vidal makes a vital clearance off the goal line",
        "duration": "00:00:20",
        "start_timestamp": "00:19:03"
      },
      {
        "clip_description": "Stebi Vidal wins a header to set up a counterattack",
        "duration": "00:00:13",
        "start_timestamp": "00:33:14"
      }
    ]
  },
  {
    "datetime": "Monday    22 Apr 2024 . 12:00",
    "location": "Conshohocken, PA",
    "weather": {
      "date": "2024-04-22",
      "location": "Conshohocken, PA",
      "precipIn": 0,
      "precipMm": 0,
      "tempCelc": 15.5,
      "tempFahr": 59.8,
      "weatherDesc": "Sunny skies",
      "weatherIcon": "Sunny.gif",
      "windSpeedKmh": 13,
      "windSpeedMph": 8
    },
    "home_score": 0,
    "away_score": 2,
    "home_club": "Villanova Soccer Academy",
    "away_club": "Stellar FC",
    "home_club_logo": "https://athletifi-s3.s3.us-east-2.amazonaws.com/logos/vsa-logo.svg",
    "away_club_logo": "https://athletifi-s3.s3.us-east-2.amazonaws.com/logos/stellar-fc-logo.svg",
    "home_team": "VSA 2009s",
    "away_team": "Stellar FC U12",
    "video_key": "match_videos/pixellot_video_1.mp4",
    "playback_id": "gztxhJtnd7o5lL02zkX3VF01UqoH7EcWwnU5wNqVuFHKg",
    "duration": 4718.347,
    "highlights": [
      {
        "clip_description": "Stebi Vidal makes a perfectly timed tackle to win back possession",
        "duration": "00:00:08",
        "start_timestamp": "00:23:56"
      },
      {
        "clip_description": "Stebi Vidal plays a defense-splitting through ball for an assist",
        "duration": "00:00:15",
        "start_timestamp": "00:41:28"
      },
      {
        "clip_description": "Stebi Vidal scores from a free-kick just outside the penalty box",
        "duration": "00:00:12",
        "start_timestamp": "01:07:41"
      }
    ]
  }
]
chef-louis commented 1 month ago

@pm-moyanor To add to the point above, there are no highlights for http://localhost:3000/dashboard/vsa-23/276 as expected (we only have highlight data for Stebi for now).

Image

[
  {
    "datetime": "Wednesday 24 Apr 2024 . 12:00",
    "location": "Philadelphia, PA",
    "weather": {
      "date": "2024-04-24",
      "location": "Philadelphia, PA",
      "precipIn": 0,
      "precipMm": 0.1,
      "tempCelc": 17.8,
      "tempFahr": 63.9,
      "weatherDesc": "Cloudy skies",
      "weatherIcon": "Cloudy.gif",
      "windSpeedKmh": 20,
      "windSpeedMph": 12
    },
    "home_score": 2,
    "away_score": 2,
    "home_club": "Villanova Soccer Academy",
    "away_club": "Stellar FC",
    "home_club_logo": "https://athletifi-s3.s3.us-east-2.amazonaws.com/logos/vsa-logo.svg",
    "away_club_logo": "https://athletifi-s3.s3.us-east-2.amazonaws.com/logos/stellar-fc-logo.svg",
    "home_team": "VSA 2009s",
    "away_team": "Stellar FC U14",
    "video_key": "match_videos/pixellot_video_2.mp4",
    "playback_id": "qVe4r2Bp2BIB7H23i1ZajlCxP47kjRuCusmfUdqc4lc",
    "duration": 4850.7744,
    "highlights": [
      { "clip_description": null, "duration": null, "start_timestamp": null }
    ]
  },
  {
    "datetime": "Tuesday   23 Apr 2024 . 12:00",
    "location": "Glenside, PA",
    "weather": {
      "date": "2024-04-23",
      "location": "Glenside, PA",
      "precipIn": 0,
      "precipMm": 0,
      "tempCelc": 19.4,
      "tempFahr": 66.9,
      "weatherDesc": "Sunny skies",
      "weatherIcon": "Sunny.gif",
      "windSpeedKmh": 12,
      "windSpeedMph": 8
    },
    "home_score": 1,
    "away_score": 2,
    "home_club": "Stellar FC",
    "away_club": "Villanova Soccer Academy",
    "home_club_logo": "https://athletifi-s3.s3.us-east-2.amazonaws.com/logos/stellar-fc-logo.svg",
    "away_club_logo": "https://athletifi-s3.s3.us-east-2.amazonaws.com/logos/vsa-logo.svg",
    "home_team": "Stellar FC U12",
    "away_team": "VSA 2009s",
    "video_key": "match_videos/pixellot_video_2.mp4",
    "playback_id": "qVe4r2Bp2BIB7H23i1ZajlCxP47kjRuCusmfUdqc4lc",
    "duration": 4850.7744,
    "highlights": [
      { "clip_description": null, "duration": null, "start_timestamp": null }
    ]
  },
  {
    "datetime": "Monday    22 Apr 2024 . 12:00",
    "location": "Conshohocken, PA",
    "weather": {
      "date": "2024-04-22",
      "location": "Conshohocken, PA",
      "precipIn": 0,
      "precipMm": 0,
      "tempCelc": 15.5,
      "tempFahr": 59.8,
      "weatherDesc": "Sunny skies",
      "weatherIcon": "Sunny.gif",
      "windSpeedKmh": 13,
      "windSpeedMph": 8
    },
    "home_score": 0,
    "away_score": 2,
    "home_club": "Villanova Soccer Academy",
    "away_club": "Stellar FC",
    "home_club_logo": "https://athletifi-s3.s3.us-east-2.amazonaws.com/logos/vsa-logo.svg",
    "away_club_logo": "https://athletifi-s3.s3.us-east-2.amazonaws.com/logos/stellar-fc-logo.svg",
    "home_team": "VSA 2009s",
    "away_team": "Stellar FC U12",
    "video_key": "match_videos/pixellot_video_1.mp4",
    "playback_id": "gztxhJtnd7o5lL02zkX3VF01UqoH7EcWwnU5wNqVuFHKg",
    "duration": 4718.347,
    "highlights": [
      { "clip_description": null, "duration": null, "start_timestamp": null }
    ]
  }
]
chef-louis commented 1 month ago

Moving this task into review. Let me know if there is anything else that needs investigating.

pm-moyanor commented 1 month ago

Ok thanks for checking

qisforq commented 1 month ago

Ok, this sounds good thanks @pm-moyanor @chef-louis.

Should I add some more dummy data for 276?

chef-louis commented 1 month ago

Sure sounds good. @qisforq more dummy data never hurts