Skip to content

Commit

Permalink
Merge pull request OpenShot#3007 from ferdnyc/json-indent
Browse files Browse the repository at this point in the history
JSON: Lower indent level on formatted data
  • Loading branch information
jonoomph authored Nov 17, 2019
2 parents 2804309 + 75fb7bf commit 226c98a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/classes/json_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def read_from_file(self, file_path, path_mode="ignore"):
def write_to_file(self, file_path, data, path_mode="ignore", previous_path=None):
""" Save JSON settings to a file """
try:
contents = json.dumps(data, indent=4)
contents = json.dumps(data, indent=1)
if path_mode == "relative":
# Convert any paths to relative
contents = self.convert_paths_to_relative(file_path, previous_path, contents)
Expand Down
2 changes: 1 addition & 1 deletion src/windows/file_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __init__(self, file):
self.txtAudioBitRate.setValue(int(self.file.data["audio_bit_rate"]))

# Populate output field
self.txtOutput.setText(json.dumps(file.data, sort_keys=True, indent=4, separators=(',', ': ')))
self.txtOutput.setText(json.dumps(file.data, sort_keys=True, indent=2))

# Add channel layouts
channel_layout_index = 0
Expand Down

0 comments on commit 226c98a

Please sign in to comment.