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 340289 - Relative path in playlists are not resolved relative to the playlist
Relative path in playlists are not resolved relative to the playlist
Status: RESOLVED FIXED
Product: totem-pl-parser
Classification: Core
Component: General
Old
Other All
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-05-01 13:44 UTC by Gary Coady
Modified: 2008-06-03 17:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description Gary Coady 2006-05-01 13:44:21 UTC
Please describe the problem:
This bug was reported in Ubuntu at
https://launchpad.net/distros/ubuntu/+source/totem/+bug/42333/

-------------------------------------
I have some videos on my desktop in ogg format.
I created a playlist of them in totem and saved this playlist to the desktop.
When I close totem and click on the playlist on my desktop I'm unable to play
the videos. I'm getting this error:
Totem could not play 'file:///home/pascal/transparancy.ogg'.
The specified movie could not be found.
This error indicates that totem looks in /home/pascal while it should look in
/home/pascal/Desktop.
I'm using totem-xine but I have the same error with totem-gstreamer too.

Steps to reproduce:
1. Download a few videos (e.g. mpg or ogg from
http://www.novell.com/linux/xglrelease/) and save them on the desktop (in my
case /home/pascal/Desktop).
2. Open these videos with totem and create a playlist of them.
3. Save the playlist on the desktop.
4. Close totem.
5. Click the playlist on the desktop.

----------------------------------------


I was able to reproduce this, and the problem I found was that there's a check
for a relative path in totem_pl_parser_add_pls_with_contents(), and if it is,
then the resolved location is passed to totem_pl_parser_parse_internal.

This returns TOTEM_PL_PARSER_RESULT_UNHANDLED (the mimetype of the file in my
test was "video/x-msvideo"). As a result, totem_pl_parser_add_one_url_ext is
called with the original file, and uses the incorrect location.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Bastien Nocera 2006-05-25 22:07:16 UTC
What's the content of that playlist file created?
Which version of Totem are you using?
Comment 2 Gary Coady 2006-05-25 22:32:10 UTC
I tried it again there - move some AVIs to the desktop:
~/Desktop$ file *.avi
[a.f.k.] The Melancholy of Haruhi Suzumiya - 04.avi: RIFF (little-endian) data, AVI, 640 x 360, ~30 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)
[a.f.k.] The Melancholy of Haruhi Suzumiya - 05.avi: RIFF (little-endian) data, AVI, 640 x 360, ~30 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)

Opened the sidebar, added the two videos. Clicked on the save button, selected the Desktop, then saved. The playlist had the following contents:

[playlist]
NumberOfEntries=2
File1=[a.f.k.] The Melancholy of Haruhi Suzumiya - 04.avi
File2=[a.f.k.] The Melancholy of Haruhi Suzumiya - 05.avi

Now, if the playlist is right-clicked on (from the Desktop), the error message is:
Totem could not play 'file:///home/gary/anime/[a.f.k.] The Melancholy of Haruhi Suzumiya - 04.avi'.

When selecting totem from the menus, the error message is:
Totem could not play 'file:///home/gary/[a.f.k.] The Melancholy of Haruhi Suzumiya - 04.avi'.

(the sub-error in each case is "The specified movie could not be found.")

Note the apparent wish to use whatever current working directory that happens to be available.

The version of totem is 1.4.1, using xine-lib 1.1.1.
Specific Ubuntu package version: 1.4.1-0ubuntu4

None of the package-specific patches appear to touch this area of the code.
Comment 3 Bastien Nocera 2006-05-26 08:26:22 UTC
Already fixed in gnome-2-14 and HEAD. Will be in Totem 1.4.2

2006-05-16  Bastien Nocera  <hadess@hadess.net>

        * src/plparse/totem-pl-parser.c: (totem_pl_parser_write_m3u),
        (totem_pl_parser_add_pls_with_contents): Fix use of the wrong
        buffer when writing m3u playlists, and the wrong URI being added
        when parsing a PLS file with relative paths
Comment 4 Philip Withnall 2008-06-03 17:39:32 UTC
Mass-move from totem to totem-pl-parser. You can remove all messages by searching for this comment.