static filter() {

		// All tracks
		let filtered = this.tracks;

		// Filter on (not) artist if filter(s) is/are set
		filtered = this.filters.artists ? filtered.filter(t => t.artists.some(a => a.name.toLowerCase().includes(this.filters.artists))) : filtered;
		filtered = this.filters.notArtists ? filtered.filter(t => t.artists.every(a => !a.name.toLowerCase().includes(this.filters.notArtists))) : filtered;

		// Filter on (not) label if filter(s) is/are set
		filtered = this.filters.labels ? filtered.filter(t => t.labels.some(l => l.name.toLowerCase().includes(this.filters.labels))) : filtered;
		filtered = this.filters.notLabels ? filtered.filter(t => t.labels.every(l => !l.name.toLowerCase().includes(this.filters.notLabels))) : filtered;

		// Filter on at least/most x labels if filter(s) is/are set
		filtered = this.filters.gteXLabels ? filtered.filter(t => t.labels.length >= this.filters.gteXLabels) : filtered;
		filtered = this.filters.lteXLabels ? filtered.filter(t => t.labels.length <= this.filters.lteXLabels) : filtered;

		// Filter on track name if filter is set
		filtered = this.filters.tracks ? filtered.filter(t => t.name.toLowerCase().includes(this.filters.tracks)) : filtered;

		// Filter on added before/after if filter(s) is/are set
		filtered = this.filters.addedBefore ? filtered.filter(t => t.addedAt < this.filters.addedBefore) : filtered;
		filtered = this.filters.addedAfter ? filtered.filter(t => t.addedAt > this.filters.addedAfter) : filtered;

		// Filter on released before/after if filter(s) is/are set
		filtered = this.filters.releasedBefore ? filtered.filter(t => t.releaseDate < this.filters.releasedBefore) : filtered;
		filtered = this.filters.releasedAfter ? filtered.filter(t => t.releaseDate > this.filters.releasedAfter) : filtered;

		// Set current filtered list to the filtered list and return it
		this.filtered = filtered;
		return filtered;

	}
/**
	 * Actually filters the list
	 * 
	 * @returns an array of tracks that are filtered
	 */
Actually filters the list

@returns an array of tracks that are filtered
Actually filters the list @returns an array of tracks that are filtered
static filter() {
		let filtered = this.tracks;
		filtered = this.filters.artists ? filtered.filter(t => t.artists.some(a => a.name.toLowerCase().includes(this.filters.artists))) : filtered;
		filtered = this.filters.notArtists ? filtered.filter(t => t.artists.every(a => !a.name.toLowerCase().includes(this.filters.notArtists))) : filtered;
		filtered = this.filters.labels ? filtered.filter(t => t.labels.some(l => l.name.toLowerCase().includes(this.filters.labels))) : filtered;
		filtered = this.filters.notLabels ? filtered.filter(t => t.labels.every(l => !l.name.toLowerCase().includes(this.filters.notLabels))) : filtered;
		filtered = this.filters.gteXLabels ? filtered.filter(t => t.labels.length >= this.filters.gteXLabels) : filtered;
		filtered = this.filters.lteXLabels ? filtered.filter(t => t.labels.length <= this.filters.lteXLabels) : filtered;
		filtered = this.filters.tracks ? filtered.filter(t => t.name.toLowerCase().includes(this.filters.tracks)) : filtered;
		filtered = this.filters.addedBefore ? filtered.filter(t => t.addedAt < this.filters.addedBefore) : filtered;
		filtered = this.filters.addedAfter ? filtered.filter(t => t.addedAt > this.filters.addedAfter) : filtered;
		filtered = this.filters.releasedBefore ? filtered.filter(t => t.releaseDate < this.filters.releasedBefore) : filtered;
		filtered = this.filters.releasedAfter ? filtered.filter(t => t.releaseDate > this.filters.releasedAfter) : filtered;
		this.filtered = filtered;
		return filtered;
	}
static filter ( ) { let filtered = this . tracks ; filtered = this . filters . artists ? filtered . filter ( t => t . artists . some ( a => a . name . toLowerCase ( ) . includes ( this . filters . artists ) ) ) : filtered ; filtered = this . filters . notArtists ? filtered . filter ( t => t . artists . every ( a => ! a . name . toLowerCase ( ) . includes ( this . filters . notArtists ) ) ) : filtered ; filtered = this . filters . labels ? filtered . filter ( t => t . labels . some ( l => l . name . toLowerCase ( ) . includes ( this . filters . labels ) ) ) : filtered ; filtered = this . filters . notLabels ? filtered . filter ( t => t . labels . every ( l => ! l . name . toLowerCase ( ) . includes ( this . filters . notLabels ) ) ) : filtered ; filtered = this . filters . gteXLabels ? filtered . filter ( t => t . labels . length >= this . filters . gteXLabels ) : filtered ; filtered = this . filters . lteXLabels ? filtered . filter ( t => t . labels . length <= this . filters . lteXLabels ) : filtered ; filtered = this . filters . tracks ? filtered . filter ( t => t . name . toLowerCase ( ) . includes ( this . filters . tracks ) ) : filtered ; filtered = this . filters . addedBefore ? filtered . filter ( t => t . addedAt < this . filters . addedBefore ) : filtered ; filtered = this . filters . addedAfter ? filtered . filter ( t => t . addedAt > this . filters . addedAfter ) : filtered ; filtered = this . filters . releasedBefore ? filtered . filter ( t => t . releaseDate < this . filters . releasedBefore ) : filtered ; filtered = this . filters . releasedAfter ? filtered . filter ( t => t . releaseDate > this . filters . releasedAfter ) : filtered ; this . filtered = filtered ; return filtered ; }
Actually filters the list
Actually filters the list
// All tracks // Filter on (not) artist if filter(s) is/are set // Filter on (not) label if filter(s) is/are set // Filter on at least/most x labels if filter(s) is/are set // Filter on track name if filter is set // Filter on added before/after if filter(s) is/are set // Filter on released before/after if filter(s) is/are set // Set current filtered list to the filtered list and return it