rejetto forum
July 31, 2010, 06:42:55 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: .m3u or rss templates for HFS (customize MIME needed)  (Read 1271 times)
0 Members and 1 Guest are viewing this topic.
est
Occasional poster
*
Offline Offline

China China

Posts: 2


View Profile
« on: July 07, 2009, 05:57:55 AM »
Reply with quoteQuote

Hi all,

I need to share a folder in dir listing mode, as well as .m3u or rss podcast feeds,

I tried to edit the template to make the output looks like .m3u or rss, but some media player seems having a trouble parsing the MIME. Is there a way to define MIME in HFS template? Or more advanced, customize a HTTP header?

Or why not HFS provide a way of multiple views of dir listing, like

normal dir listing: http://127.0.0.1/mp3/
m3u for current dir: http://127.0.0.1/mp3/:m3u
m3u for .mp3 files only: http://127.0.0.1/mp3/:m3u?filter=*.mp3

currently I am using a mongoose+python script to do this, I really HFS could provide such a funtion directly
« Last Edit: July 07, 2009, 06:00:22 AM by est » Logged
rejetto
Administrator
Insane programmer
*
Online Online

Italy Italy

Posts: 10757


View Profile
« Reply #1 on: July 07, 2009, 06:37:43 AM »
Reply with quoteQuote

> Is there a way to define MIME in HFS template?

switch to expert mode
menu > other options > mime types

> Or more advanced, customize a HTTP header?

in HFS 2.3 you can use command {.add header.}
refer official documentation for details
Logged
est
Occasional poster
*
Offline Offline

China China

Posts: 2


View Profile
« Reply #2 on: July 07, 2009, 08:37:36 AM »
Reply with quoteQuote

> Is there a way to define MIME in HFS template?

switch to expert mode
menu > other options > mime types

> Or more advanced, customize a HTTP header?

in HFS 2.3 you can use command {.add header.}
refer official documentation for details

thanks rejetto

place this filelist.tpl under the same dir as hfs242.exe,

Code:
#EXTM3U
%files%
[style]

[files]
{.mime|audio/x-mpegurl.}

%list%

[file]
%item-url%

[folder]
%item-name%/

http://localhost/mp3/~files.lst.m3u

works great!
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!


Google visited last this page Today at 06:19:44 AM