Page 1 of 1

"Custom Presets" in 'presets.json'

Posted: Mon Sep 16, 2019 3:09 am
by markfilipak
The structure of "Custom Presets" in 'presets.json' is at the end. I want to alpha-sort the "Custom Presets", "ChildrenArray"[] member objects, {}, based on "PresetName" value. 'presets.json' appears to be ANSI with CR+LF endings. I assume that if HB is not running, I'm free edit 'presets.json' at will (...with back-up of course).

I just thought I'd check in with you folks before I start mucking with 'presets.json'. Any advice is welcome. You needn't be very 'explanatory'.

Thanks!

Code: Select all

{
  "PresetList": [
    {
      "ChildrenArray": [
        {
          bla-bla-bla
          "PresetDescription": null,
          "PresetName": "p30 O.O.O.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": null,
          "PresetName": "p30-to-p24 D.D.DD.O 23.B",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": null,
          "PresetName": "i30-to-p24 D.D.YD.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": "for hard telecined sources from film",
          "PresetName": "i30-to-p24 D.L.DD.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": null,
          "PresetName": "i30-to-p24 D.O.O.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": "when all else fails -- very slow",
          "PresetName": "i30 O.D.DE.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": "basic detelecine",
          "PresetName": "i30-to-p24 D.D.O.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": "basic detelecine & decomb",
          "PresetName": "i30-to-p24 D.D.DD.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": "BD movie",
          "PresetName": "p24 O.O.O.O.O 23.B",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": "TV show",
          "PresetName": "i30-to-p30 O.D.O.O.O 18.Q",
          bla-bla-bla
        }
      ],
      "Folder": true,
      "PresetName": "Custom Presets",
      "PresetDescription": null,
      "Type": 1
    }
  ],
  "VersionMajor": "34",
  "VersionMicro": "0",
  "VersionMinor": "0"
}

Re: "Custom Presets" in 'presets.json'

Posted: Mon Sep 16, 2019 3:37 am
by markfilipak
Oh... PS:
You guys have done an awsome job on the standard presets... but I'd like to delete those "ChildrenArray" object, "PresetList' array members (after backing them up, of course). The code apparently automatically expands the 'General' presets, so removing them may cause code problems ...I don't know. Any problems removing "PresetList" array members?

And in the topic starter, "I'm free edit..." should have been "I'm free to edit...". Sorry.

Re: "Custom Presets" in 'presets.json'

Posted: Mon Sep 16, 2019 7:09 am
by s55
User editing of the file is not supported. You can perform the necessary management of presets in the UI.

If you choose to proceed, don’t be surprised if HandBrake overwrites any changes you make or has issues as a result of.

Re: "Custom Presets" in 'presets.json'

Posted: Mon Sep 16, 2019 8:15 am
by markfilipak
s55 wrote: Mon Sep 16, 2019 7:09 am User editing of the file is not supported. You can perform the necessary management of presets in the UI.

If you choose to proceed, don’t be surprised if HandBrake overwrites any changes you make or has issues as a result of.
I understand. Can you relay an enhancement request? Or should I make it a separate topic?

Enhancement Request, Main application, 'Presets' section, 'Custom Presets' list: Good: Automatically alpha-sort the list, Better: Implement drag-&-drop so users can sort the list.

Re: "Custom Presets" in 'presets.json'

Posted: Mon Sep 16, 2019 3:54 pm
by mduell
Enhancement requests go in github as issues.