Use the new per release titles for Hub

This commit is contained in:
jliddev
2021-02-22 08:49:02 -06:00
parent a968a82682
commit d34f4e3a09
2 changed files with 6 additions and 2 deletions

View File

@@ -264,11 +264,13 @@ export class WowUpAddonProvider extends AddonProvider {
this.getSearchResultFile(release)
);
const name = _.first(representation.releases)?.toc_title ?? representation.repository_name;
return {
author: representation.owner_name,
externalId: representation.id.toString(),
externalUrl: representation.repository,
name: representation.repository_name,
name,
providerName: this.name,
thumbnailUrl: representation.image_url || representation.owner_image_url,
downloadCount: representation.total_download_count,
@@ -290,11 +292,12 @@ export class WowUpAddonProvider extends AddonProvider {
const folders = scanResult.exactMatch.matched_release.addonFolders.map((af) => af.folder_name);
const folderList = folders.join(", ");
const channelType = addonChannelType;
const name = scanResult.exactMatch.matched_release?.toc_title ?? scanResult.exactMatch.repository_name;
return {
id: uuidv4(),
author: authors,
name: scanResult.exactMatch.repository_name,
name,
channelType,
autoUpdateEnabled: false,
clientType,

View File

@@ -29,6 +29,7 @@ export interface WowUpAddonReleaseRepresentation {
published_at: Date;
addonFolders?: WowUpAddonReleaseFolderRepresentation[];
game_type: WowGameType;
toc_title?: string;
}
export interface WowUpAddonRepresentation {