Skip to content

Commit

Permalink
Merge branch 'master' into update-premium-info
Browse files Browse the repository at this point in the history
  • Loading branch information
cj123 committed Jan 29, 2021
2 parents 1553128 + d771c51 commit a6b46b1
Show file tree
Hide file tree
Showing 34 changed files with 837 additions and 326 deletions.
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
v1.7.10
-------

Fixed:

* Fixes an issue where duplicating a Championship with Race Weekends inside it would result in the Race Weekends not copying across correctly.
* KissMyRank is now instructed to stop using a command in its console. This should hopefully prevent issues with data files corrupting on stop.
* Fixes an issue where Race Weekend sessions could incorrectly sort splits out of order.

---

v1.7.9
------

Added:

* Improved the Track selection dropdowns in all Race Setup pages. You can now see more readable track names, and filter all tracks and layouts.
* Adds missing Real Penalty 'APP_UDP_PORT' option.

Fixed:

* Fixes an issue where Live Timings lap counts could reset if a driver does not cleanly disconnect from the Assetto Corsa Server.
* Fixes an issue where Real Penalty config values for Jump Start would not be assigned correctly.
* The Spectator Car will only be filtered out from Championship Points calculations if Spectator Car is enabled in the Championship settings.
* Fixes an issue where cars could be duplicated in race setups
* Fixes a crash that could occur when displaying information about a track.
* Fixes an issue where multiservers could omit scanning new cars if they were added in groups, rather than one at once. If your server is missing cars in the car list, please "Rebuild Search Index" on the Server Options page!
* Fixes an issue where track names would not update when a track was reuploaded.
* Fixes an issue where pitboxes could not be loaded for a track with an invalid JSON file.
* Improved process management for plugins and acServer itself. Thanks to @mayfield for this one!
* Duplicating a Championship now clears all registration requests.
* Fixes a crash that could occur when concurrently reading weather configurations.

---

v1.7.8
------

Expand Down
27 changes: 21 additions & 6 deletions championship_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -1680,10 +1680,10 @@ func (cm *ChampionshipManager) HandleChampionshipSignUp(r *http.Request) (respon

signUpResponse := &ChampionshipSignUpResponse{
Created: time.Now(),
Name: r.FormValue("Name"),
Name: strings.TrimSpace(r.FormValue("Name")),
GUID: NormaliseEntrantGUID(r.FormValue("GUID")),
Team: r.FormValue("Team"),
Email: r.FormValue("Email"),
Team: strings.TrimSpace(r.FormValue("Team")),
Email: strings.TrimSpace(r.FormValue("Email")),

Car: r.FormValue("Car"),
Skin: r.FormValue("Skin"),
Expand Down Expand Up @@ -1864,13 +1864,28 @@ func (cm *ChampionshipManager) DuplicateChampionship(championshipID string) (*Ch
duplicateChampionship.Name = championship.Name + " Duplicate"

for _, event := range events {
_, err := duplicateChampionship.ImportEvent(&event)
if event.IsRaceWeekend() {
newEvent, err := duplicateChampionship.ImportEvent(event.RaceWeekend)

if err != nil {
return nil, err
if err != nil {
return nil, err
}

if err := cm.store.UpsertRaceWeekend(newEvent.RaceWeekend); err != nil {
return nil, err
}
} else {
_, err = duplicateChampionship.ImportEvent(&event)

if err != nil {
return nil, err
}
}
}

// clear sign up form responses
duplicateChampionship.SignUpForm.Responses = nil

logrus.Infof("New Championship: %s, %s. Duplicate of %s", duplicateChampionship.Name, duplicateChampionship.ID.String(), championshipID)

return duplicateChampionship, cm.UpsertChampionship(duplicateChampionship)
Expand Down
2 changes: 1 addition & 1 deletion championships.go
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ func (c *Championship) AttachClassIDToResults(results *SessionResults) {

func (c *ChampionshipClass) ResultsForClass(results []*SessionResult, championship *Championship) (filtered []*SessionResult) {
for _, result := range results {
if c.DriverInClass(result) && result.TotalTime > 0 && result.DriverGUID != championship.SpectatorCar.GUID {
if c.DriverInClass(result) && result.TotalTime > 0 && (!championship.SpectatorCarEnabled || result.DriverGUID != championship.SpectatorCar.GUID) {
filtered = append(filtered, result)
}
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/server-manager/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
assetto/
assetto
.env
server_manager.db
config.yml
Expand Down
Loading

0 comments on commit a6b46b1

Please sign in to comment.