After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608382 - Imported files without title metadata show %20 in name
Imported files without title metadata show %20 in name
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: User Interface
1.5.3
Other Linux
: Normal normal
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
: 608873 614621 621932 623871 628372 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-01-28 21:41 UTC by Alexander Hunziker
Modified: 2010-09-12 16:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot illustrating the problem (38.51 KB, image/png)
2010-01-28 21:41 UTC, Alexander Hunziker
  Details
Potential patch (1.07 KB, patch)
2010-04-14 03:58 UTC, Matthew Howell
needs-work Details | Review
git formatted patch (1.14 KB, patch)
2010-06-22 19:06 UTC, Nicolò Chieffo
none Details | Review
git formatted patch (1.14 KB, patch)
2010-06-22 19:10 UTC, Nicolò Chieffo
committed Details | Review

Description Alexander Hunziker 2010-01-28 21:41:15 UTC
Created attachment 152523 [details]
Screenshot illustrating the problem

Videos imported seem to be assigned whatever they contain as title in their metadata as a "Name" for showing up in the Banshee UI. If such a title tag is not available, the file name is used instead. Problem in the current version is that spaces are shown as %20, and not as spaces.
Comment 1 Michael Stephenson 2010-02-03 10:21:05 UTC
*** Bug 608873 has been marked as a duplicate of this bug. ***
Comment 2 Michael Stephenson 2010-02-03 10:23:15 UTC
I can confirm I experience the same issue.
Comment 3 Gabriel Burt 2010-04-02 17:58:01 UTC
*** Bug 614621 has been marked as a duplicate of this bug. ***
Comment 4 Gabriel Burt 2010-04-02 18:00:19 UTC
This should be a very easy bug to fix, should be just a tweak somewhere around http://git.gnome.org/browse/banshee/tree/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs#n204
Comment 5 Matthew Howell 2010-04-14 03:58:14 UTC
Created attachment 158668 [details] [review]
Potential patch
Comment 6 Matthew Howell 2010-04-14 04:01:42 UTC
My patch just changes the relevant access of track.Uri.AbsoluteUri to track.Uri.LocalPath to force it to format the string properly (i.e., not as a URI, but specifically as a local file name). I haven't tested this, but if the Mono System.Uri acts like .NET's, and hopefully it would, this should fix the bug.
Comment 7 Gabriel Burt 2010-06-11 22:27:24 UTC
Review of attachment 158668 [details] [review]:

This won't work for non-local files (supported via our GIO backend).
Comment 8 Matthew Howell 2010-06-11 22:35:10 UTC
(In reply to comment #7)
> Review of attachment 158668 [details] [review]:
> 
> This won't work for non-local files (supported via our GIO backend).

OK, I wasn't aware that support was there; my mistake. In that case, a decision may need to be made, because it might be desirable to leave the behavior as it is for non-local URIs and only display actual spaces for local files.
Comment 9 Gabriel Burt 2010-06-11 22:40:19 UTC
Does System.Web.HttpUtility.UrlDecode (System.IO.Path.GetFileNameWithoutExtension (track.Uri.AbsoluteUri)) work?
Comment 10 Nicolò Chieffo 2010-06-17 19:10:25 UTC
That should definitely work, from the documentation of the method:

"If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. URL encoding converts characters that are not allowed in a URL into character-entity equivalents; URL decoding reverses the encoding. For example, when embedded in a block of text to be transmitted in a URL, the characters < and > are encoded as %3c and %3e."
Comment 11 Andrés G. Aragoneses (IRC: knocte) 2010-06-17 21:34:53 UTC
*** Bug 621932 has been marked as a duplicate of this bug. ***
Comment 12 Nicolò Chieffo 2010-06-17 22:42:31 UTC
I compiled the code with the changes suggested by Gabriel Burt and it works!
Comment 13 Gabriel Burt 2010-06-22 18:17:05 UTC
Please attach a patch, produced with `git format-patch HEAD~1`
Comment 14 Nicolò Chieffo 2010-06-22 19:06:30 UTC
Created attachment 164334 [details] [review]
git formatted patch
Comment 15 Nicolò Chieffo 2010-06-22 19:10:28 UTC
Created attachment 164335 [details] [review]
git formatted patch
Comment 16 Nicolò Chieffo 2010-07-06 10:53:44 UTC
Gabriel Burt: is the patch ok? can you commit?
Comment 17 Alexander Kojevnikov 2010-07-08 23:55:54 UTC
*** Bug 623871 has been marked as a duplicate of this bug. ***
Comment 18 Gabriel Burt 2010-07-09 19:44:47 UTC
Review of attachment 164335 [details] [review]:

Thanks Nicolo, committed.
Comment 19 Bertrand Lorentz 2010-09-12 16:34:58 UTC
*** Bug 628372 has been marked as a duplicate of this bug. ***