diff --git a/src/publishing/curseforge-publisher.ts b/src/publishing/curseforge-publisher.ts index 9905415..a061b87 100644 --- a/src/publishing/curseforge-publisher.ts +++ b/src/publishing/curseforge-publisher.ts @@ -16,7 +16,7 @@ export default class CurseForgePublisher extends ModPublisher { const data = { changelog, changelogType: "markdown", - displayName: name, + displayName: (parentFileId || !name) ? file.name : name, parentFileID: parentFileId, releaseType: channel, gameVersions: parentFileId ? undefined : versions diff --git a/src/publishing/mod-publisher.ts b/src/publishing/mod-publisher.ts index 079615c..14dcd0f 100644 --- a/src/publishing/mod-publisher.ts +++ b/src/publishing/mod-publisher.ts @@ -57,7 +57,7 @@ export default abstract class ModPublisher extends PublisherreleaseInfo?.tag_name || parseVersionFromFilename(files[0].name); const versionType = options.versionType?.toLowerCase() || parseVersionTypeFromFilename(files[0].name); - const name = (typeof options.name === "string" && options.name) || releaseInfo?.name || version; + const name = typeof options.name === "string" ? options.name : (releaseInfo?.name || version); const changelog = ((typeof options.changelog === "string" || options.changelog?.file) ? (await readChangelog(options.changelog)) : releaseInfo?.body) || ""; const loaders = processMultilineInput(options.loaders, /\s+/); diff --git a/src/publishing/modrinth-publisher.ts b/src/publishing/modrinth-publisher.ts index 5947258..4bfd52a 100644 --- a/src/publishing/modrinth-publisher.ts +++ b/src/publishing/modrinth-publisher.ts @@ -10,7 +10,7 @@ export default class ModrinthPublisher extends ModPublisher { protected async publishMod(id: string, token: string, name: string, version: string, channel: string, loaders: string[], gameVersions: string[], _java: string[], changelog: string, files: File[]): Promise { const data = { - version_title: name, + version_title: name || version, version_number: version, version_body: changelog, release_channel: channel,