Skip to content

Commit

Permalink
Add studio aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
timo95 committed Mar 28, 2024
1 parent 54ecccc commit 3c56208
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const supportedDataFields = new Map<Target, DataField[]>([
[Target.Performer, [DataField.Id, DataField.Name, DataField.Disambiguation, DataField.Favorite, DataField.AliasList, DataField.Birthdate, DataField.HeightCm, DataField.Tags]],
[Target.Gallery, [DataField.Id, DataField.Title, DataField.Date, DataField.Tags, DataField.Files]],
[Target.Movie, [DataField.Id, DataField.Name, DataField.Date]],
[Target.Studio,[DataField.Id, DataField.Name]],
[Target.Studio,[DataField.Id, DataField.Name, DataField.Aliases]],
[Target.Tag, [DataField.Id, DataField.Name]],
]);

Expand Down
27 changes: 14 additions & 13 deletions src/dataTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,27 @@ export interface GraphQlQuery {
* Possible fields and subfields of the returned data
*/
export enum DataField {
Id = "id",
Aliases = "aliases",
AliasList = "alias_list",
Birthdate = "birthdate",
BitRate = "bit_rate",
Code = "code",
Name = "name",
Date = "date",
Disambiguation = "disambiguation",
AliasList = "alias_list",
Title = "title",
Studio = "studio",
Duration = "duration",
Favorite = "favorite",
Date = "date",
Birthdate = "birthdate",
HeightCm = "height_cm",
Tags = "tags",
Files = "files",
Height = "height",
HeightCm = "height_cm",
Id = "id",
Name = "name",
Path = "path",
Duration = "duration",
Size = "size",
Studio = "studio",
Tags = "tags",
Title = "title",
VideoCodec = "video_codec",
Width = "width",
Height = "height",
Size = "size",
BitRate = "bit_rate",
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const propertyStrings: Map<string, (datum: any, queries: StashQuery[], target: T
[DataField.Name, (name: string) => `<br>Name: ${name}`],
[DataField.Favorite, () => "&emsp;&#10084;&#65039;"],
[DataField.Disambiguation, (disambiguation: string) => ` <span style="color: grey">(${disambiguation})</span>`],
[DataField.Aliases, (aliases: any) => aliases.length === 0 ? "" : `<br>Aliases: ${aliases.join(", <wbr>")}`],
[DataField.AliasList, (aliasList: any) => aliasList.length === 0 ? "" : `<br>Aliases: ${aliasList.join(", <wbr>")}`],
[DataField.Studio, (studio: any) => `<br>Studio: ${studio[DataField.Name]}`],
[DataField.Code, (code: string) => `<br>Code: ${code}`],
Expand Down

0 comments on commit 3c56208

Please sign in to comment.