elementary / music

Music player and library designed for elementary OS
https://elementary.io
GNU General Public License v3.0
145 stars 49 forks source link

Open and manage .m3u8 files (playlists) #745

Closed ghost closed 11 months ago

ghost commented 1 year ago

It would be useful to be able to open m3u8 files. Not like in eOS6 player where you could have them organized, but just add all of the songs to the queue would be enough.

jeremypw commented 1 year ago

The solution to this could be similar to the one I suggested for opening music files except the FileChooser would have to filter on playlist files and after selecting one you would have to provide code to interpret the contents and convert it to an array of GLib.File objects before passing to the playback manager.

jeremypw commented 1 year ago

Yes, you would probably need to clear the previous playlist when loading a new one (or allow the user to choose whether to or not). I am not sure how the UX team would feel about adding too many features to this app though as the intention was to slim it down compared with the previous version.

BAProductions commented 1 year ago

Go back to using the eOS6 player instead

ghost commented 1 year ago

Possible duplicate from 4 years ago #515

ghost commented 1 year ago

Something along the lines of:

// music will run this kind of handlers over and over until all of the files listed are readable by the program
// (e.g. no directories or m3u8)
// files not supported will be ignored and not added to queue
abstract class FileHandler {
  abstract string[] mimeType;
  string[] files();
}

class MP3Handler extends FileHandler { ... }

class M3U8Handler extends FileHandler {
  string[] mimeType = ["audio/x-mpeg-url"]
  // Returns absolute path to all songs
  string[] files() {
    // parse m3u8
    // return files in it
    return ["/home/foo/bar"];
  }
}
danirabbit commented 11 months ago

Closing as a duplicate of #515