Fix track search result type detection
The server replaces "_" with "-" in the track result format (at least or Anilist)
This commit is contained in:
@@ -57,7 +57,7 @@ export class Trackers {
|
|||||||
static getPublishingType<TrackSearch extends TrackSearchPublishingTypeInfo>(
|
static getPublishingType<TrackSearch extends TrackSearchPublishingTypeInfo>(
|
||||||
trackSearch: TrackSearch,
|
trackSearch: TrackSearch,
|
||||||
): PublishingType {
|
): PublishingType {
|
||||||
const type = trackSearch.publishingType.toLowerCase().replaceAll(' ', '_');
|
const type = trackSearch.publishingType.toLowerCase().replaceAll(/[ |-]/g, '_');
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case PublishingType.UNKNOWN:
|
case PublishingType.UNKNOWN:
|
||||||
|
|||||||
Reference in New Issue
Block a user