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
7fc35762
Commit
7fc35762
authored
Nov 24, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now the cycle works correctly and the result are saved
parent
50e9ce02
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
9 deletions
+15
-9
games_thread.py
mbetterclient/core/games_thread.py
+6
-2
match_timer.py
mbetterclient/core/match_timer.py
+3
-1
fixture_details.html
...nt/web_dashboard/templates/dashboard/fixture_details.html
+4
-4
match_details.html
...ient/web_dashboard/templates/dashboard/match_details.html
+2
-2
No files found.
mbetterclient/core/games_thread.py
View file @
7fc35762
...
@@ -2445,9 +2445,11 @@ class GamesThread(ThreadedComponent):
...
@@ -2445,9 +2445,11 @@ class GamesThread(ThreadedComponent):
"""Select random completed matches from the database (including cancelled and failed)"""
"""Select random completed matches from the database (including cancelled and failed)"""
try
:
try
:
# Get all completed matches (status = 'done', 'cancelled', or 'failed')
# Get all completed matches (status = 'done', 'cancelled', or 'failed')
# Exclude matches from fixtures that contain "_recycle_" in the fixture name
completed_matches
=
session
.
query
(
MatchModel
)
.
filter
(
completed_matches
=
session
.
query
(
MatchModel
)
.
filter
(
MatchModel
.
status
.
in_
([
'done'
,
'cancelled'
,
'failed'
]),
MatchModel
.
status
.
in_
([
'done'
,
'cancelled'
,
'failed'
]),
MatchModel
.
active_status
==
True
MatchModel
.
active_status
==
True
,
~
MatchModel
.
fixture_id
.
like
(
'
%
_recycle_
%
'
)
)
.
all
()
)
.
all
()
if
len
(
completed_matches
)
<
count
:
if
len
(
completed_matches
)
<
count
:
...
@@ -2737,9 +2739,11 @@ class GamesThread(ThreadedComponent):
...
@@ -2737,9 +2739,11 @@ class GamesThread(ThreadedComponent):
"""Select random completed matches from the database, excluding matches with same fighters as the last played match"""
"""Select random completed matches from the database, excluding matches with same fighters as the last played match"""
try
:
try
:
# Build query for completed matches
# Build query for completed matches
# Exclude matches from fixtures that contain "_recycle_" in the fixture name
query
=
session
.
query
(
MatchModel
)
.
filter
(
query
=
session
.
query
(
MatchModel
)
.
filter
(
MatchModel
.
status
.
in_
([
'done'
,
'cancelled'
,
'failed'
]),
MatchModel
.
status
.
in_
([
'done'
,
'cancelled'
,
'failed'
]),
MatchModel
.
active_status
==
True
MatchModel
.
active_status
==
True
,
~
MatchModel
.
fixture_id
.
like
(
'
%
_recycle_
%
'
)
)
)
# Exclude matches with same fighters as the last played match
# Exclude matches with same fighters as the last played match
...
...
mbetterclient/core/match_timer.py
View file @
7fc35762
...
@@ -545,9 +545,11 @@ class MatchTimerComponent(ThreadedComponent):
...
@@ -545,9 +545,11 @@ class MatchTimerComponent(ThreadedComponent):
from
..database.models
import
MatchModel
from
..database.models
import
MatchModel
# Build query for completed matches
# Build query for completed matches
# Exclude matches from fixtures that contain "_recycle_" in the fixture name
query
=
session
.
query
(
MatchModel
)
.
filter
(
query
=
session
.
query
(
MatchModel
)
.
filter
(
MatchModel
.
status
.
in_
([
'done'
,
'cancelled'
,
'failed'
]),
MatchModel
.
status
.
in_
([
'done'
,
'cancelled'
,
'failed'
]),
MatchModel
.
active_status
==
True
MatchModel
.
active_status
==
True
,
~
MatchModel
.
fixture_id
.
like
(
'
%
_recycle_
%
'
)
)
)
# Exclude matches with same fighters as the last played match
# Exclude matches with same fighters as the last played match
...
...
mbetterclient/web_dashboard/templates/dashboard/fixture_details.html
View file @
7fc35762
...
@@ -538,8 +538,8 @@ function getFixtureStatusBadge(fixture) {
...
@@ -538,8 +538,8 @@ function getFixtureStatusBadge(fixture) {
return
'<span class="badge bg-primary"><i class="fas fa-money-bill me-1"></i>Bet</span>'
;
return
'<span class="badge bg-primary"><i class="fas fa-money-bill me-1"></i>Bet</span>'
;
case
'ingame'
:
case
'ingame'
:
return
'<span class="badge bg-success"><i class="fas fa-gamepad me-1"></i>In Game</span>'
;
return
'<span class="badge bg-success"><i class="fas fa-gamepad me-1"></i>In Game</span>'
;
case
'
end
'
:
case
'
done
'
:
return
'<span class="badge bg-dark"><i class="fas fa-stop me-1"></i>
End
</span>'
;
return
'<span class="badge bg-dark"><i class="fas fa-stop me-1"></i>
Done
</span>'
;
default
:
default
:
return
'<span class="badge bg-secondary"><i class="fas fa-question me-1"></i>Unknown</span>'
;
return
'<span class="badge bg-secondary"><i class="fas fa-question me-1"></i>Unknown</span>'
;
}
}
...
@@ -557,8 +557,8 @@ function getStatusBadge(match) {
...
@@ -557,8 +557,8 @@ function getStatusBadge(match) {
return
'<span class="badge bg-primary"><i class="fas fa-money-bill me-1"></i>Bet</span>'
;
return
'<span class="badge bg-primary"><i class="fas fa-money-bill me-1"></i>Bet</span>'
;
case
'ingame'
:
case
'ingame'
:
return
'<span class="badge bg-success"><i class="fas fa-gamepad me-1"></i>In Game</span>'
;
return
'<span class="badge bg-success"><i class="fas fa-gamepad me-1"></i>In Game</span>'
;
case
'
end
'
:
case
'
done
'
:
return
'<span class="badge bg-dark"><i class="fas fa-stop me-1"></i>
End
</span>'
;
return
'<span class="badge bg-dark"><i class="fas fa-stop me-1"></i>
Done
</span>'
;
case
'cancelled'
:
case
'cancelled'
:
return
'<span class="badge bg-danger"><i class="fas fa-times me-1"></i>Cancelled</span>'
;
return
'<span class="badge bg-danger"><i class="fas fa-times me-1"></i>Cancelled</span>'
;
case
'failed'
:
case
'failed'
:
...
...
mbetterclient/web_dashboard/templates/dashboard/match_details.html
View file @
7fc35762
...
@@ -451,8 +451,8 @@ function getStatusBadge(match) {
...
@@ -451,8 +451,8 @@ function getStatusBadge(match) {
return
'<span class="badge bg-primary"><i class="fas fa-money-bill me-1"></i>Bet</span>'
;
return
'<span class="badge bg-primary"><i class="fas fa-money-bill me-1"></i>Bet</span>'
;
case
'ingame'
:
case
'ingame'
:
return
'<span class="badge bg-success"><i class="fas fa-gamepad me-1"></i>In Game</span>'
;
return
'<span class="badge bg-success"><i class="fas fa-gamepad me-1"></i>In Game</span>'
;
case
'
end
'
:
case
'
done
'
:
return
'<span class="badge bg-dark"><i class="fas fa-stop me-1"></i>
End
</span>'
;
return
'<span class="badge bg-dark"><i class="fas fa-stop me-1"></i>
Done
</span>'
;
case
'cancelled'
:
case
'cancelled'
:
return
'<span class="badge bg-danger"><i class="fas fa-times me-1"></i>Cancelled</span>'
;
return
'<span class="badge bg-danger"><i class="fas fa-times me-1"></i>Cancelled</span>'
;
case
'failed'
:
case
'failed'
:
...
...
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