Carlos M. Fernández via plug on 24 Jan 2021 16:12:23 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Load an m3u file as text file in a Firefox tab


I'm quite certain that you can override the MIME type sent by Apache to the browser so that it understands that it should render it as text. Something like "AddType text/plain .m3u" in the appropriate httpd.conf context should do it.

On Sun, Jan 24, 2021, 18:48 Casey Bralla via plug <plug@lists.phillylinux.org> wrote:
I've got a bunch of playlist files (*.m3u) which contain text of my
various music files.   I use MPD (Music Player Daemon) to load these
playlists and play the music.   I also have an apache2 web server on the
MPD machine running a python script which shows the playing songs and a
photo of the artist.

I want to put a link on the web page that will display the playlist
(m3u) file as a text file.  Unfortunately, Firefox sees the m3u
extension, and then wants to load it as a media file.  If I allow this,
it goes crazy and starts opening a continuous list of new tabs with the
playlist file.  The only fix is to kill Firefox.    Chrome is not much
better.  It won't go crazy, but won't do much with the file either.

I can force Firefox to open the file in a text editor, but I would
really prefer to open it as a text file in a tab.  (If the file ended in
.txt, this would work fine.)

Any body know how can I convince Firefox to open a specific extension as
a text file in a tab?

TIA

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug