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 504423 - Strip known playlist suffixes
Strip known playlist suffixes
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: Removable Media
unspecified
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-19 11:18 UTC by Bastien Nocera
Modified: 2018-05-24 13:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Strips .m3u and .pls off names if one is not provided (910 bytes, patch)
2008-09-15 20:26 UTC, Lasse Bigum
none Details | Review
Had to fix that, here's a take two. (5.06 KB, patch)
2008-09-15 21:23 UTC, Lasse Bigum
reviewed Details | Review

Description Bastien Nocera 2007-12-19 11:18:27 UTC
From bug #427975:
> * The playlist is shown with the .m3u extension in the rb side pane;

Ok. We should strip the extension if there is one.
Comment 1 Lasse Bigum 2008-09-15 20:26:26 UTC
Created attachment 118786 [details] [review]
Strips .m3u and .pls off names if one is not provided

This is a first attempt at stripping the extension of .m3u and .pls playlists.

Ideally it would iterate over the known playlist extensions, but this works for now. I do not know if there are any better ways to strip off the extension than the g_strsplit I used.
Comment 2 Lasse Bigum 2008-09-15 21:23:41 UTC
Created attachment 118794 [details] [review]
Had to fix that, here's a take two.

This strips any recognized playlist extension off the name if a name is not provided for the playlist.

One minor artifact I have just noticed: When importing a .pls playlist, it instantly highlights the name, as if it wants me to rename the playlist, and the name is shown in a strange "overlayed" way: http://img137.imageshack.us/my.php?image=rbplaylistoverlayrh1.png
Comment 3 Jonathan Matthew 2008-09-15 22:23:19 UTC
Is there a reason you moved the entire function like that?  It makes it hard to see what you've actually changed.

"name[strlen (name) - strlen (suffix)] = '\0'" is a much simpler way of removing the suffix.
Comment 4 Lasse Bigum 2008-09-16 15:48:02 UTC
I had to move the function, or the static variable that has all of the mimetypes, as it is only defined after that function. So I opted to move the function, as all other uses of that static var occured later on, so I grouped them by moving this function down as well.

@suffix:
Oh, I thought about that, but was afraid I might leak something.

If you want me to move either the static define or change the way of handling the suffix, I'll cook up another patch for you.
Comment 5 GNOME Infrastructure Team 2018-05-24 13:03:47 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/485.