GNOME Bugzilla – Bug 340289
Relative path in playlists are not resolved relative to the playlist
Last modified: 2008-06-03 17:39:32 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:
What's the content of that playlist file created? Which version of Totem are you using?
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.
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
Mass-move from totem to totem-pl-parser. You can remove all messages by searching for this comment.