- Update API

- Add Chart Preview
- Add Drum Type dropdown when the "drums" instrument is selected
- Add Min/Max Year to advanced search
- Add Track Hash to advanced search
- Add "Download Video Backgrounds" setting
- Updated and improved detected chart issues
This commit is contained in:
Geomitron
2024-07-16 15:20:58 -05:00
parent 627896a8c8
commit 353994b8e1
43 changed files with 1808 additions and 510 deletions

View File

@@ -85,7 +85,7 @@ export class DownloadService {
type: 'good',
isPath: false,
})
window.electron.emit.download({ action: 'add', md5: chart.md5, chart: newChart })
window.electron.emit.download({ action: 'add', md5: chart.md5, hasVideoBackground: chart.hasVideoBackground, chart: newChart })
}
this.downloadCountChanges.emit(this.downloadCount)
}

View File

@@ -7,6 +7,7 @@ import { catchError, mergeMap, tap, throwError, timer } from 'rxjs'
import { Difficulty, Instrument } from 'scan-chart'
import { environment } from 'src-angular/environments/environment'
import { AdvancedSearch, ChartData, SearchResult } from 'src-shared/interfaces/search.interface'
import { DrumTypeName } from 'src-shared/UtilFunctions'
const resultsPerPage = 25
@@ -29,6 +30,7 @@ export class SearchService {
public searchControl = new FormControl('', { nonNullable: true })
public instrument: FormControl<Instrument | null>
public difficulty: FormControl<Difficulty | null>
public drumType: FormControl<DrumTypeName | null>
constructor(
private http: HttpClient,
@@ -53,6 +55,16 @@ export class SearchService {
}
})
this.drumType = new FormControl<DrumTypeName>(
(localStorage.getItem('drumType') === 'null' ? null : localStorage.getItem('drumType')) as DrumTypeName
)
this.drumType.valueChanges.subscribe(drumType => {
localStorage.setItem('drumType', `${drumType}`)
if (this.songsResponse.page) {
this.search(this.searchControl.value || '*').subscribe()
}
})
this.http.get<{ "name": string; "sha1": string }[]>('https://clonehero.gitlab.io/sources/icons.json').subscribe(result => {
this.availableIcons = result.map(r => r.name)
})
@@ -86,6 +98,7 @@ export class SearchService {
page: this.currentPage,
instrument: this.instrument.value,
difficulty: this.difficulty.value,
drumType: this.drumType.value,
source: 'bridge',
}).pipe(
catchError((err, caught) => {

View File

@@ -153,6 +153,14 @@ export class SettingsService {
this.zoomFactor = _.round(this.zoomFactor - 0.1, 3)
}
}
get volume() {
return this.settings.volume
}
set volume(value: number) {
this.settings.volume = value
this.saveSettings()
}
}
function setThemeColors(themeColors: ThemeColors) {