diff --git a/gamescollection/collection.go b/gamescollection/collection.go index 4b357b8..a11341f 100644 --- a/gamescollection/collection.go +++ b/gamescollection/collection.go @@ -275,20 +275,20 @@ func (c *collect) getFriendlyName(file repository.FileDesc) string { name := "" if baseTitle.Name != "" { - name = baseTitle.Name + name = fmt.Sprintf("%s ", baseTitle.Name) } // Append DLC Name and tag when dlc if dlc { extra = "DLC" - name = fmt.Sprintf("%s - %s", name, title.Name) + name = fmt.Sprintf("%s- %s ", name, title.Name) } region := "" if baseTitle.Region != "" { - region = fmt.Sprintf("(%s)", baseTitle.Region) + region = fmt.Sprintf("(%s) ", baseTitle.Region) } // Build the friendly name for Tinfoil - return fmt.Sprintf("%s %s [%s][v%d][%s].%s", name, region, file.GameID, title.Version, extra, file.Extension) + return fmt.Sprintf("%s%s[%s][v%d][%s].%s", name, region, file.GameID, title.Version, extra, file.Extension) } diff --git a/gamescollection/collection_test.go b/gamescollection/collection_test.go index 00ad1cf..8b9fc03 100644 --- a/gamescollection/collection_test.go +++ b/gamescollection/collection_test.go @@ -131,7 +131,7 @@ var _ = Describe("Collection", func() { games := testCollection.Games() Expect(games.Files).To(HaveLen(1)) Expect(games.Titledb).To(HaveLen(1)) - Expect(games.Files[0].URL).To(Equal("http://tinshop.example.com/games/010034500641A000#[010034500641A000] Attack on Titan 2 (US) [BASE].nsp")) + Expect(games.Files[0].URL).To(Equal("http://tinshop.example.com/games/010034500641A000#Attack on Titan 2 (US) [010034500641A000][v0][BASE].nsp")) }) It("Add a base game (without Region)", func() { newGames := make([]repository.FileDesc, 0) @@ -167,7 +167,7 @@ var _ = Describe("Collection", func() { games := testCollection.Games() Expect(games.Files).To(HaveLen(1)) Expect(games.Titledb).To(HaveLen(1)) - Expect(games.Files[0].URL).To(Equal("http://tinshop.example.com/games/010034501225C000#[010034501225C000] [BASE].nsp")) + Expect(games.Files[0].URL).To(Equal("http://tinshop.example.com/games/010034501225C000#[010034501225C000][v0][BASE].nsp")) }) It("Add a DLC game", func() { newGames := make([]repository.FileDesc, 0) @@ -185,7 +185,7 @@ var _ = Describe("Collection", func() { games := testCollection.Games() Expect(games.Files).To(HaveLen(1)) Expect(games.Titledb).To(HaveLen(1)) - Expect(games.Files[0].URL).To(Equal("http://tinshop.example.com/games/010034500641B001#Attack on Titan 2 - Additional Episode, \"A Sudden Rain\" (US) [010034500641B001][v0][DLC].nsp")) + Expect(games.Files[0].URL).To(Equal("http://tinshop.example.com/games/010034500641B001#Attack on Titan 2 - Additional Episode, \"A Sudden Rain\" (US) [010034500641B001][v131072][DLC].nsp")) }) It("Add an UPDATE game", func() { newGames := make([]repository.FileDesc, 0)