mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-20 01:30:17 +00:00
Compare commits
3 Commits
3d6e5f997e
...
1ec302d98c
Author | SHA1 | Date | |
---|---|---|---|
1ec302d98c | |||
495f6dc424 | |||
0b599e3d9c |
2
index.py
2
index.py
@ -68,7 +68,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
databaseChecker = DatabaseChecker()
|
databaseChecker = DatabaseChecker()
|
||||||
databaseChecker.setWindowIcon(QIcon(":/images/icon.png"))
|
databaseChecker.setWindowIcon(QIcon(":/images/icon.png"))
|
||||||
databaseCheckResult = databaseChecker.confirmDb()
|
databaseCheckResult = databaseChecker.confirmDb() if Settings().databaseUrl() else 0
|
||||||
|
|
||||||
if not databaseCheckResult & DatabaseCheckerResult.Initted:
|
if not databaseCheckResult & DatabaseCheckerResult.Initted:
|
||||||
result = databaseChecker.exec()
|
result = databaseChecker.exec()
|
||||||
|
@ -28,17 +28,21 @@ class RemoveDuplicateScoresModel(QStandardItemModel):
|
|||||||
chart = (
|
chart = (
|
||||||
session.query(Chart)
|
session.query(Chart)
|
||||||
.where((Chart.song_id == songId) & (Chart.rating_class == ratingClass))
|
.where((Chart.song_id == songId) & (Chart.rating_class == ratingClass))
|
||||||
.one()
|
.first()
|
||||||
)
|
)
|
||||||
song = session.query(Song).where(Song.id == songId).one()
|
song = session.query(Song).where(Song.id == songId).first()
|
||||||
difficulty = (
|
difficulty = (
|
||||||
session.query(Difficulty)
|
session.query(Difficulty)
|
||||||
.where(
|
.where(
|
||||||
(Difficulty.song_id == songId)
|
(Difficulty.song_id == songId)
|
||||||
& (Difficulty.rating_class == ratingClass)
|
& (Difficulty.rating_class == ratingClass)
|
||||||
)
|
)
|
||||||
.one()
|
.first()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if chart is None and song is None and difficulty is None:
|
||||||
|
chart = Chart(song_id=songId, rating_class=ratingClass, set="unknown")
|
||||||
|
|
||||||
item.setData(chart, self.ChartRole)
|
item.setData(chart, self.ChartRole)
|
||||||
item.setData(song, self.SongRole)
|
item.setData(song, self.SongRole)
|
||||||
item.setData(difficulty, self.DifficultyRole)
|
item.setData(difficulty, self.DifficultyRole)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user