Skip to content

Commit

Permalink
Bumping vangogh_local_data to serve download link names
Browse files Browse the repository at this point in the history
  • Loading branch information
boggydigital committed Nov 13, 2024
1 parent 22ccc7c commit db4eac6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
21 changes: 13 additions & 8 deletions rest/get_downloads_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit db4eac6

Please sign in to comment.