[Feature] Allow auto decrypt cia files when compressing

Open
#5,716 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

The failure comes from the rom-converto ctr compress call, which refuses encrypted 3DS/CCI input and suggests rom-converto ctr decrypt or --allow-encrypted. The issue does not settle whether decryption should be automatic or opt-in, so a maintainer decision is needed before coding. Read the compression step in the Python backend that shells out to rom-converto. Done means the chosen behaviour is agreed and covered by a test for an encrypted CIA.

Written by the indexing model from the issue text.

Description

Is your feature request related to a problem? Please describe.
I was looking into compressing my game library and eventually stumbled across the buildin feature with rom-converto! I did notice after configuring the maximum compression, that the logging threw these:

Could not convert MyOwnGame1.cia: rom-converto ctr compress failed with code 1: Error: input ROM appears to be encrypted. Compressing an encrypted 3DS ROM gives almost no size reduction. Decrypt it first with: rom-converto ctr decrypt <INPUT>, or pass --allow-encrypted to compress it anyway

Describe the solution you'd like
I believe it's ok/doesn't use anything that would upset anyone.. To use the rom-converto ctr decrypt feature automatically when a file is found to be encrypted in .3ds/.cci format.
I don't think it's handy to just assume if someone wishes to compress their .3ds/.cci games to just assume they are ok with decrypting it, so might need something that needs to be explicity set by the user?

The benefit of this, is to avoid extra warnings and yield more storage space, even when uploading new encrypted cci/3ds files.

Or if i was wrong to assume this action uses something that wouldn't upset others, i tottaly understand the feature being removed and having to do this outside of romm.

Describe alternatives you've considered
Simply running com-converto ctr decrypt on the .cci files it found within the container, then renaming it from it's appended _decrypted to the original name.

Dominant language
Python
Stars
13.3k
Forks
747
Avg merge
20h 58m
Merged PRs (30d)
207

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rommapp/romm

All issues in rommapp/romm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.