davidteren / lpx_links

Gets the additional content download links for Logic Pro X
http://davidteren.github.io/lpx_links
107 stars 27 forks source link

Adding logic to resolve relative parents in download URLs and updating README #19

Closed thekungfuspider closed 1 year ago

thekungfuspider commented 1 year ago

@davidteren - I encountered an error when running this utility, and I'm fixing it here. Please review when you get the chance.

To summarize, I encountered JSON array elements from the parsed plist that look like this:

  "Logic9LegacyContentPackage": {
    "InstalledSize": 3304631310,
    "IsMandatory": false,
    "DownloadName": "../lp10_ms3_content_2013/MAContent10_Logic9Legacy.pkg",
    "DownloadSize": 2548058487,
    "FileCheck": "/Library/Application Support/Logic/Channel Strip Settings/Instrument/01 Logic Instruments/ES 1 Subtractive Synth.cst",
    "PackageID": "com.apple.pkg.MAContent10_Logic9Legacy"
  },

Note the leading "../" in the "DownloadName" value, denoting that the path should be resolving a relative parent that is not visible here. Downloads for these entries (a total of 16 for me) obviously failed, because "http://www.sample.com/this/../path/is/invalid" will bomb most download utilities like aria2 and cURL.

I've made the changes here to resolve relative parents, along with some README improvements.

davidteren commented 1 year ago

Thanks @thekungfuspider. I'll make note to review this asap.

davidteren commented 1 year ago

Merging. Thanks so much for this @thekungfuspider