Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MBetterc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mbetter
MBetterc
Commits
50e9ce02
Commit
50e9ce02
authored
Nov 24, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
play video result done message working
parent
e806a118
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
866 additions
and
160 deletions
+866
-160
games_thread.py
mbetterclient/core/games_thread.py
+181
-15
match_timer.py
mbetterclient/core/match_timer.py
+208
-3
player.py
mbetterclient/qt_player/player.py
+171
-52
results.html
mbetterclient/qt_player/templates/results.html
+226
-86
api.py
mbetterclient/web_dashboard/api.py
+68
-4
routes.py
mbetterclient/web_dashboard/routes.py
+12
-0
No files found.
mbetterclient/core/games_thread.py
View file @
50e9ce02
This diff is collapsed.
Click to expand it.
mbetterclient/core/match_timer.py
View file @
50e9ce02
This diff is collapsed.
Click to expand it.
mbetterclient/qt_player/player.py
View file @
50e9ce02
This diff is collapsed.
Click to expand it.
mbetterclient/qt_player/templates/results.html
View file @
50e9ce02
This diff is collapsed.
Click to expand it.
mbetterclient/web_dashboard/api.py
View file @
50e9ce02
...
...
@@ -56,6 +56,70 @@ class DashboardAPI:
"timestamp"
:
datetime
.
utcnow
()
.
isoformat
()
}
def
get_debug_match_status
(
self
,
fixture_id
:
str
=
None
)
->
Dict
[
str
,
Any
]:
"""Get debug information about match statuses for troubleshooting"""
try
:
session
=
self
.
db_manager
.
get_session
()
try
:
from
..database.models
import
MatchModel
,
MatchOutcomeModel
,
ExtractionStatsModel
# Get all matches or filter by fixture_id
query
=
session
.
query
(
MatchModel
)
if
fixture_id
:
query
=
query
.
filter
(
MatchModel
.
fixture_id
==
fixture_id
)
matches
=
query
.
order_by
(
MatchModel
.
match_number
.
desc
())
.
limit
(
10
)
.
all
()
debug_data
=
[]
for
match
in
matches
:
match_data
=
{
"id"
:
match
.
id
,
"match_number"
:
match
.
match_number
,
"fixture_id"
:
match
.
fixture_id
,
"fighter1"
:
match
.
fighter1_township
,
"fighter2"
:
match
.
fighter2_township
,
"status"
:
match
.
status
,
"result"
:
match
.
result
,
"start_time"
:
match
.
start_time
.
isoformat
()
if
match
.
start_time
else
None
,
"end_time"
:
match
.
end_time
.
isoformat
()
if
match
.
end_time
else
None
,
"active_status"
:
match
.
active_status
}
# Get outcomes
outcomes
=
session
.
query
(
MatchOutcomeModel
)
.
filter_by
(
match_id
=
match
.
id
)
.
all
()
match_data
[
"outcomes"
]
=
[{
"name"
:
o
.
column_name
,
"value"
:
o
.
float_value
}
for
o
in
outcomes
]
# Get extraction stats
extraction_stats
=
session
.
query
(
ExtractionStatsModel
)
.
filter_by
(
match_id
=
match
.
id
)
.
first
()
if
extraction_stats
:
match_data
[
"extraction_stats"
]
=
{
"actual_result"
:
extraction_stats
.
actual_result
,
"extraction_result"
:
extraction_stats
.
extraction_result
,
"created_at"
:
extraction_stats
.
created_at
.
isoformat
()
}
else
:
match_data
[
"extraction_stats"
]
=
None
debug_data
.
append
(
match_data
)
return
{
"success"
:
True
,
"debug_data"
:
debug_data
,
"fixture_id"
:
fixture_id
,
"timestamp"
:
datetime
.
utcnow
()
.
isoformat
()
}
finally
:
session
.
close
()
except
Exception
as
e
:
logger
.
error
(
f
"Failed to get debug match status: {e}"
)
return
{
"success"
:
False
,
"error"
:
str
(
e
),
"timestamp"
:
datetime
.
utcnow
()
.
isoformat
()
}
def
get_video_status
(
self
)
->
Dict
[
str
,
Any
]:
"""Get video player status"""
try
:
...
...
mbetterclient/web_dashboard/routes.py
View file @
50e9ce02
...
...
@@ -805,6 +805,18 @@ def system_status():
return
jsonify
({
"error"
:
str
(
e
)}),
500
@
api_bp
.
route
(
'/debug/match-status'
)
def
debug_match_status
():
"""Get debug information about match statuses"""
try
:
fixture_id
=
request
.
args
.
get
(
'fixture_id'
)
debug_data
=
api_bp
.
api
.
get_debug_match_status
(
fixture_id
)
return
jsonify
(
debug_data
)
except
Exception
as
e
:
logger
.
error
(
f
"API debug match status error: {e}"
)
return
jsonify
({
"error"
:
str
(
e
)}),
500
@
api_bp
.
route
(
'/video/status'
)
@
api_bp
.
auth_manager
.
require_auth
if
hasattr
(
api_bp
,
'auth_manager'
)
and
api_bp
.
auth_manager
else
login_required
def
video_status
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment