Bug 177403 - JJ: amarok does not remove leading blanks in podcast titles
Summary: JJ: amarok does not remove leading blanks in podcast titles
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Unclassified
Component: Podcast (show other bugs)
Version: 2.0
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2008-12-10 18:13 UTC by andreaswuest
Modified: 2009-04-15 13:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot showing the leading blanks (73.57 KB, image/png)
2008-12-10 18:13 UTC, andreaswuest
Details
remove redundant whitespace (845 bytes, patch)
2009-04-14 23:59 UTC, Joerg Schumann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andreaswuest 2008-12-10 18:13:01 UTC
Version:           2.0 (using 4.1.3 (KDE 4.1.3), Kubuntu packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.27-9-generic

hello,

for some reason the swr3 podcast does sometimes contain a leading blank in the podcast title, which does not really look nice in amarok (see attached) screenshot. it would be nice if amarok could remove leading blanks in the podcast title:

    <item>
            <title> Thailands Regierungspartei verboten - Flughafen Bangkok nimmt den Betrieb wieder auf</title><itunes:author>SWR3.online</itunes:author>
            <itunes:keywords>Topthema Bangkok 2.12.08</itunes:keywords>
     ......

cheers,
andy
Comment 1 andreaswuest 2008-12-10 18:13:25 UTC
Created attachment 29215 [details]
screenshot showing the leading blanks
Comment 2 Bart Cerneels 2008-12-11 09:14:47 UTC
Noted. I need to take measures to limit the width of the episodes titles anyway.
In 1.4 I did this by removing the common part in episode and channel titles, i.e. using Amarok::decapitateString() again. It won't work for this specific channel, it just needs some white-space pruning.

This is a good Junior Job, or a weekend project for me. There are other more urgent things on the TODO though.
Comment 3 Nicholas Sinlock 2009-01-06 03:06:02 UTC
I'm looking into this bug.  I've been able to confirm the problem.   

I'm just not certain what exactly is desired.  Should I be attempting to strip out extraneous white space from the podcast episode titles, limiting their length to a certain length, or both?
Comment 4 Mark Kretschmann 2009-01-06 07:06:08 UTC
As for limiting the length of titles, it can be done with QFontMetrics::elidedText():

http://doc.trolltech.com/4.4/qfontmetrics.html#elidedText


Comment 5 Joerg Schumann 2009-04-14 23:59:20 UTC
Created attachment 32836 [details]
remove redundant whitespace

Hi,

I've put together something. What do you think of it? Any side effects?
It doesn't limit the text length, though. I have no idea what a reasonable max. length would be...
50 characters, 100, 200?
Comment 6 Seb Ruiz 2009-04-15 13:29:45 UTC
SVN commit 954182 by seb:

Strip unnecessary whitespace from podcast titles.
BUG: 177403
CCMAIL: joerg-schumann@gmx.net

 M  +1 -0      ChangeLog  
 M  +4 -1      src/podcasts/PodcastReader.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=954182