Merge lp:~niclasl/audience/fix-1281445 into lp:~audience-members/audience/trunk

Proposed by Niclas Lockner
Status: Merged
Approved by: Cody Garver
Approved revision: 330
Merged at revision: 330
Proposed branch: lp:~niclasl/audience/fix-1281445
Merge into: lp:~audience-members/audience/trunk
Diff against target: 17 lines (+3/-5)
1 file modified
Audience/Utils.vala (+3/-5)
To merge this branch: bzr merge lp:~niclasl/audience/fix-1281445
Reviewer Review Type Date Requested Status
Cody Garver Needs Fixing
Review via email: mp+215321@code.launchpad.net

Commit message

Unescape the file name before displaying in title

Description of the change

Unescape the file name

To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) wrote :

Normally this fix would be fine, but Audience does something a little different. Observe in the diff that there is code to replace certain characters with a space. So if Your.Filename.Looks.Like.This.m4v it will become so Your Filename Looks Like This.m4v, etc.

review: Needs Fixing
lp:~niclasl/audience/fix-1281445 updated
330. By Niclas Lockner

Replace spec. chars with space

Revision history for this message
Niclas Lockner (niclasl) wrote :

Ready for a new review

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Audience/Utils.vala'
2--- Audience/Utils.vala 2013-04-25 18:24:18 +0000
3+++ Audience/Utils.vala 2014-04-11 00:10:26 +0000
4@@ -33,11 +33,9 @@
5 }
6 public static string get_title (string filename) {
7 var title = get_basename (filename);
8- title = title.replace ("%20", " ").
9- replace ("%3B", ";").
10- replace ("%5B", "[").replace ("%5D", "]").replace ("%7B", "{").
11- replace ("%7D", "}").replace ("_", " ").replace (".", " ").
12- replace (" ", " ").replace ("%60", "\'");
13+ title = Uri.unescape_string (title);
14+ title = title.replace ("_", " ").replace (".", " ").replace (" ", " ");
15+
16 return title;
17 }
18

Subscribers

People subscribed via source and target branches