Opened 11 years ago

Closed 11 years ago

#3072 closed Enhancement (fixed)

[PATCH] Make Transmission look for the web ui folder in the Application Support folder first

Reported by: Waldorf Owned by: livings124
Priority: Normal Milestone: 2.00
Component: Mac Client Version: 1.92
Severity: Normal Keywords: patch
Cc:

Description

I think that being able to easily replace the web interface would be a great addition to Transmission, and doesn't add bloat.

Currently, the only way to change the web ui on the mac is to mod the web folder inside the app bundle, which isn't recommended. Let alone the (potential) permission issues. Or, by setting an environment variable. Which isn't a regular user will easily be able to do.

So, I recommend that T looks for a web ui in ~/Application Support/transmission/web first, and if that's empty, look inside the app bundle.

Attachments (2)

Modifiable_web_dir.patch (1.7 KB) - added by Waldorf 11 years ago.
Modifiable_web_dirv2.patch (2.3 KB) - added by Waldorf 11 years ago.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by Waldorf

Changed 11 years ago by Waldorf

comment:1 Changed 11 years ago by Waldorf

I ran into an issue that the appString was freed before it could be read by tr_buildPath(). Both CFRelease() functions should be moved to the bottom of the mac specific part, wether or not the patch is used. (I think)
Edit: Below the tr_buildPath() at-least.

I added a second version, using an alternative method of getting the c-string from a CFString. I'm not sure wether it's better or different...

Last edited 11 years ago by Waldorf (previous) (diff)

comment:2 Changed 11 years ago by Waldorf

Small note: The folder T should be looking for in the Application Support folder should be Web. (Tittle Case)

comment:3 Changed 11 years ago by livings124

  • Resolution set to fixed
  • Status changed from new to closed

Thanks! r10417

comment:4 Changed 11 years ago by Waldorf

  • Resolution fixed deleted
  • Severity changed from Normal to Minor
  • Status changed from closed to reopened

As I mentioned in the second comment, to be conform to the naming in of the support folders (eg. Torrents, Incomplete, Resume...), the web ui folder should be named Web. With capital "W". (Though blocklists seems to be an exception)

Line 550:

s = tr_buildPath( tr_sessionGetConfigDir( session ), "Web", NULL );

comment:5 Changed 11 years ago by livings124

  • Resolution set to fixed
  • Severity changed from Minor to Normal
  • Status changed from reopened to closed

There is no consistency in that directory, and since internally the folder is lowercase, I think that is the best choice. Now if you can make it case-insensitive I would be interested.

Note: See TracTickets for help on using tickets.