mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 22:29:38 +00:00
- 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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user