diff --git a/go.mod b/go.mod index f51a2bd3..f5239070 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.23.2 require ( github.com/arelate/southern_light v0.1.51 - github.com/arelate/vangogh_local_data v0.4.32 + github.com/arelate/vangogh_local_data v0.4.33 github.com/boggydigital/atomus v0.1.9 github.com/boggydigital/backups v0.1.3 github.com/boggydigital/clo v1.0.4 diff --git a/go.sum b/go.sum index 7247cff6..e055db5b 100644 --- a/go.sum +++ b/go.sum @@ -16,6 +16,8 @@ github.com/arelate/vangogh_local_data v0.4.31 h1:DFvqF85vBHrH7F/WsgJ7bPw9yCR9l8Q github.com/arelate/vangogh_local_data v0.4.31/go.mod h1:hXcjRAhGb6tjpOuSc7kN94kZANnybUVZALXfYstrjfw= github.com/arelate/vangogh_local_data v0.4.32 h1:2hP3oQrFyr+OjfUoBwyKWnF3hv9o2CTQaYeS8oT4XyU= github.com/arelate/vangogh_local_data v0.4.32/go.mod h1:hXcjRAhGb6tjpOuSc7kN94kZANnybUVZALXfYstrjfw= +github.com/arelate/vangogh_local_data v0.4.33 h1:Dgjjhp710QZplTlzqzBautjGVF2CIR2PY6SnI7YgYMs= +github.com/arelate/vangogh_local_data v0.4.33/go.mod h1:hXcjRAhGb6tjpOuSc7kN94kZANnybUVZALXfYstrjfw= github.com/boggydigital/atomus v0.1.9 h1:zAmXtAAXtBzMfz/83nEO4x8/uSLlPOq5wynW1jR/rbk= github.com/boggydigital/atomus v0.1.9/go.mod h1:mvPDNDMrpFZ7RHbyMrt30hVXFU+VoeCvHnT83Zhj91I= github.com/boggydigital/backups v0.1.3 h1:Yq4/2kVxpexc0bAVA5tQPgdcKXPWsqihzgI759VPgVM= diff --git a/rest/get_downloads_metadata.go b/rest/get_downloads_metadata.go index 8d702886..6f80df7e 100644 --- a/rest/get_downloads_metadata.go +++ b/rest/get_downloads_metadata.go @@ -73,17 +73,22 @@ func getDownloadMetadata(id string, dls vangogh_local_data.DownloadsList, rdx ke dm.Slug = slug } - for _, download := range dls { + for _, dl := range dls { link := vangogh_local_data.DownloadLink{ - ManualUrl: download.ManualUrl, - OS: download.OS.String(), - Type: download.Type.String(), - LanguageCode: download.LanguageCode, - Version: download.Version, - EstimatedBytes: download.EstimatedBytes, + ManualUrl: dl.ManualUrl, + Name: dl.Name, + OS: dl.OS.String(), + Type: dl.Type.String(), + LanguageCode: dl.LanguageCode, + Version: dl.Version, + EstimatedBytes: dl.EstimatedBytes, } - if relLocalDownloadPath, ok := rdx.GetLastVal(vangogh_local_data.LocalManualUrlProperty, download.ManualUrl); ok { + if dl.Type == vangogh_local_data.DLC { + link.Name = dl.ProductTitle + } + + if relLocalDownloadPath, ok := rdx.GetLastVal(vangogh_local_data.LocalManualUrlProperty, dl.ManualUrl); ok { _, filename := filepath.Split(relLocalDownloadPath) link.LocalFilename = filename