m3u playlists: going up one level

Home Forums Help and Support m3u playlists: going up one level

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #23308
    nemo76
    Participant

    First of all thanks so much for v1.1.1, it’s a huge release. Loving the m3u playlist support. One small issue, it doesn’t seem to support .. to go up a directory. No probs if this isn’t supported or can’t be done, just thought you may want to know.

    The following m3u works:
    #EXTM3U
    #EXTINF:266,Johnny Cash – The Man Comes Around
    iTunes MediaMusicJohnny CashThe Man Comes Around1 The Man Comes Around.mp3

    This one doesn’t (playlist loads, but when you go to play a song it says “Error loading file!”)
    #EXTM3U
    #EXTINF:266,Johnny Cash – The Man Comes Around
    ..iTunes MediaMusicJohnny CashThe Man Comes Around1 The Man Comes Around.mp3

    #28065
    cadbusca
    Participant

    Yes, I believe that is so. The .m3u playlist entries must all refer to directories that are subdirectories of the directory containing the .m3u playlist file. ie: smb1:musicplaylist.m3u can only contain entries such as jazzsong1.mp3 and jazzhancocksong2.mp3 where jazz is a subdirectory of music. WIIMC builds the file reference for playing the file or adding it to the WIIMC playlist by prepending the directory of the currently displayed file listing to the playlist entries. Hence smb1:musicjazzhancocksong2.mp3 These playlists are easy to create in Winamp by loading the current playlist and saving it in the directory that contains all directories referred to by the playlist entries, and then setting that directory as an smb, where WIIMC can access the playlist and play all the songs.

    #28066
    rodries
    Keymaster

    Actually I think this is supposed to work, and I tested this.

    A playlist contained at:

    sd:/Music/Playlists/test.m3u

    and containing an entry of ..song.mp3

    Should correctly assemble a path of: sd:/Music/song.mp3 and let you then play this file.

    If it is not working this way, I will need a ZIP containing a sample folder, m3u and mp3 that has an example that fails.

    #28067
    cadbusca
    Participant

    I suspect the problem lies in where his playlist is located. In your example

    A playlist contained at:
    sd:/Music/Playlists/test.m3u and containing an entry of ..song.mp3 Should correctly assemble a path of: sd:/Music/song.mp3 and let you then play this file.

    But if the playlist is located in sd:/Music/test.m3u ..song.mp3 WIIMC will assemble a path of sd:/song.mp3 which does not exist and will not play.

    If his “iTunes MediaMusicJohnny CashThe Man Comes Around1 The Man Comes Around.mp3” is in a playlist at sd:/Folder/playlist.m3u which also contains the “iTunes Media” subdirectory it will resolve as sd:/Folder/iTunes Media/Music/Johnny Cash/The Man Comes Around/01 The Man Comes Around.mp3 and play but “../ITunes MediaMusicJohnny CashThe Man Comes Around1 The Man Comes Around.mp3” in that playlist would resolve as sd:/iTunes MediaMusicJohnny CashThe Man Comes Around1 The Man Comes Around.mp3 which does not exist and will not play.

    For ..iTunes MediaMusicJohnny CashThe Man Comes Around1 The Man Comes Around.mp3 to be played it must be in a playlist at sd:/Folder/Itunes Media/playlist.m3u which will resolve as sd:/Folder/iTunes Media/Music/Johnny Cash/The Man Comes Around/01 The Man Comes Around.mp3 and play.

    Given that the new playlist code does handle .. this way, the good news is that it is possible to have a playlist containing “..” or just “” prepended entries which then allows the playlists to be created in a “playlist only ” subdirectory of the directory containing the music files, which then allows WIIMC to access a playlist only menu list.

    I am unable to verify this however since I currently have no Wii access, and my poor readind of the “Cleanup Path” code seems to show that .. entries are simply removed.

    Winamp when saving playlists to such a subdirectory ie: smb1:My MusicPlaylistsplaylist.m3u will create “MyMusic” playlist entries with the “” denoting up one level rather than “..” whereas it will create “MyMusic” play list entries without the prepended “” if the playlist is saved in the same or super directory containing the the music files. This means that WIIMC also need to treat “” prepended playlist entries in the same way that it treats “..” playlist entries.

    Bottom line playlists must be located in the same subdirectory in which they were created so that their entries properly reflect the relation of the files to that directory location, and that subdirectory must be accessable by name to WIIMC as a subdirectory of a device or smb: so it can build the correct reference to the files using the playlist subdirectory path and the playlist entries.

    I’m unable to test this until after the New Year, but I hope that WIIMC also treats a “music” playlist entry as an up-one-level entry the same as “..music” and remove the last subdirectory in the playlist path before appending the playlist entry, whereas a “music” playlist entry will simply be appended to the playlist path. This will allow Winamp to be used to create/convert playlists in/to the correct format for the playlist locations you use with WIIMC.

    One other note about WINAMP..the #EXTINF: entries with the artist and song name for each entry need to be generated by WINAMP from the song files when saving the playlist. This takes time and if you exit WINAMP before the process is completed the #EXTINF entries will be missing from final playlist entries. The options for controlling the reading of this metadata and the format of the #EXTINF are in Winamp/preferences/Titles/Metadata Reading.

    It would be helpful if others would document the method for generating compliant playlists with other applications.

    #28068
    rodries
    Keymaster

    I hope that WIIMC also treats a “music” playlist entry as an up-one-level entry the same as “..music

    This is wrong. “” denotes the root, which means it’s an absolute path. This is not supported, and would only work anyway if the whole drive was shared, as WiiMC would only be able to determine the path relative to the share root, not the drive root.

    In the example of a folder C:DocumentsMusic being shared, presuming you have the following two files:

    C:DocumentsMusicExtraPlayliststest.m3u
    C:DocumentsMusicsong.mp3

    Then an entry in test.m3u of “….song.mp3” will work. An entry of “DocumentsMusicsong.mp3” will NOT work, because WiiMC knows nothing above the Music folder level. If I added support for a root indicator, it would then consider this path in the sense of C:DocumentsMusicDocumentsMusicsong.mp3 – not what you intended. Really this would need to be “song.mp3” to point to the right spot, but that truly doesn’t make sense either.

    In short, the code is already working as intended. What my code logic is doing is counting the number of “..” entries in the assembled path, and subtracting that number of folders from the path.

    eg: assembled path is – smb1:/Extra/Playlists/../../song.mp3

    it takes away two levels, and produces the correct path of smb1:/song.mp3 🙂

    #28069
    cadbusca
    Participant

    Agree.. I now see that WINAMP is using the to denote the root directory because its in front of the first level sub and that it always designates the root directory when the playlist is saved in a subdirectory other than the one containing the files in its tree. That means that WINAMP cannot be used to generate playlists that can be saved in a Playlist only subdirectory which is beside the subs containing the music. Can any one advise on how to generate playlists that will correctly contain “..” entries that will allow a playlist only sub to be used?

    #28070
    nemo76
    Participant

    To create relative playlists I use a small java app from http://www.ericdaugherty.com/dev/itunesexport/ (the app creates m3u playlists from iTunes playlists). I use the -musicpath parameter to override absolute paths and define a relative location

    -musicPath="..iTunes MediaMusic"

    My itunes library sits on a NAS drive and I access that via smb. Up to now I had playlists sitting in iTunesplaylists (songs are in iTunesiTunes MediaMusic). Due to this (bug?) I now have playlists up a level in the iTunes parent folder (with no ..) and they work fine.

    One of the reasons I raised this was every other media app (including mplayer_ce) plays those playlists with ..

    When I get time I’ll zip up a playlist with folder structure and mp3 file for Tantric.

    Cheers
    Greg

    #28071
    cadbusca
    Participant

    Hi Greg: Based on what you have just posted your playlist was at:
    smb:iTunesplaylistsplaylist.m3u
    and in your original note the entry that did not work was:
    “..iTunes MediaMusicJohnny CashThe Man Comes Around1 The Man Comes Around.mp3”

    Because of the .., WIIMC should drop “playlists” from the playlist.m3u path and then add the entry resulting in:
    smb:iTunesiTunes MediaMusicJohnny CashThe Man Comes Around1 The Man Comes Around.mp3 which is where you say the music is, so it should play.

    I know you have the enhancement pack so I would suggest the following:
    1. put your playlist back in smb:iTunesplaylistsplaylist.m3u with the ..
    2. add the playlist to the WIIMC playlist using the enhanced version.
    3. save the playlist using the enhanced version feature.
    4. use wordpad to edit the saved playlist file and see what the constructed path is. It should look like the above path but perhaps there is an extra / or something. Anyway that will show what is broken.

    #28072
    cadbusca
    Participant

    Here is a free up-to-date utility that will generate either .m3u or .pls playlists with Extended information in your format, and with relative references (..) compatible with WIIMC playlist processing. It can be used to generate playlists within a folder containing the music, within a folder that contains music and music folders and within a folder (typically a playlist only folder) that is within a folder containing music and music folders. http://www.oddgravity.de/app-opc.php

    #28073
    cadbusca
    Participant

    I have found and reported a bug in the processing of ../ type playlists that addresses this issue. http://www.wiimc.org/tracker/index.php?do=details&task_id=308

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Help and Support’ is closed to new topics and replies.

Login

Lost Password