Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_httpcontrol (Read 938214 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

foo_httpcontrol

Reply #200
here you go
Code: [Select]
    v0.79 24 Aug
        add: [PATH_JS] - javascript array with current path of built-in
             browser, available in foo_httpcontrol_browser_tpl.html only.
             sample value:
             [ { "cmd": "/?cmd=Browse&param1=%20", "path": "Root:\" },
               { "cmd": "/?cmd=Browse&param1=D%3A\", "path": "D:\" },
               { "cmd": "/?cmd=Browse&param1=D%3A%5CMUSIC\", "path": "MUSIC\" } ]
        add: [PATH_PARENT] - urlencoded uppper level path of current built-in
             browser path. available in foo_httpcontrol_browser_tpl.html only.
        add: [BROWSER_JS] - javascript array of browser files. sample array
             element:
             [ { "p": "directory/file name",
                "pu": "urlencoded full directory/file path",
                "fs": "file size",
                "cm": "file type",
                "ft": "file time/date" } ]
        fix: disappearing network in browser with 'hide non-playables' option;

foo_httpcontrol

Reply #201
One small bug:  The component automatically adds a trailing slash to the default path set in preferences.  The JavaScript eval function interprets this as you wanting to ignore the closing quote of the "p" element, causing it to error out.  Of course, since we have url-encoded path in "pu", "p" may not even be necessary.  It's easy to strip the slashes out though, so I'll do that for now.

Thanks for the update.

edit: also, it seems the commas are missing between rows in the BROWSER_JS array.

foo_httpcontrol

Reply #202
whops, sorry! completely missed the necessity to escape slashes. the issue (along with missing commas) is fixed for newly added macros, and the current version is updated without increasing version number.

foo_httpcontrol

Reply #203
One small bug:  The component automatically adds a trailing slash to the default path set in preferences.  The JavaScript eval function interprets this as you wanting to ignore the closing quote of the "p" element, causing it to error out.  Of course, since we have url-encoded path in "pu", "p" may not even be necessary.  It's easy to strip the slashes out though, so I'll do that for now.

Thanks for the update.

edit: also, it seems the commas are missing between rows in the BROWSER_JS array.

Any update, Auric?

foo_httpcontrol

Reply #204
Any chance for support of embedded album art?

foo_httpcontrol

Reply #205
I absolutely love this. Thanks a lot

foo_httpcontrol

Reply #206
Any update, Auric?


The browser is pretty much done, but I need to implement enqueue support for directories, and I'd like to create subheaders for each album in a playlist.  I'll see if I can't release something this week.

foo_httpcontrol

Reply #207
Awesome work! Any updates?

foo_httpcontrol

Reply #208
made my webui with firefox as well (IE is still not supported and will not be):

http://www.2shared.com/file/3717567/6947f4...ntrol_data.html
http://www.uploading.com/files/9XPZ4C6M/fo...l_data.zip.html


Here's my modified version. Designed for iPhone, very barebones, no browser. http://www.2shared.com/file/3899339/d6fcdf...ntrol_data.html

foo_httpcontrol

Reply #209
Sorry for the lack of a release; I ran into a memory leak the other day and wanted to make sure it wasn't something in my Javascript.  There's still a lot of features I could put in, but I'll try to get something out soon.

foo_httpcontrol

Reply #210
Sorry for the lack of a release; I ran into a memory leak the other day and wanted to make sure it wasn't something in my Javascript.  There's still a lot of features I could put in, but I'll try to get something out soon.

Any update is good news, Auric.  I'd love to help you out if you'd like.

foo_httpcontrol

Reply #211
Ok, here you go:



Download iPhone template release 1

A few notes:

- Like Larskl's template, this one requires that you access it via index.html
- The "playlist row" field in the HTTP Control preferences must be set to the following, or some variation thereof:
Code: [Select]
{ "artist": "$ifgreater($len(%artist%),29,$cut(%artist%,29)'...',%artist%)", "album": "$ifgreater($len(%album%),29,$cut(%album%,29)'...',%album%)", "number": "%tracknumber%", "track": "$ifgreater($len($replace(%title%,",)),28,$cut($replace(%title%,",),28)'...',$replace(%title%,",))", "len": "%length%" }
- The shuffle button does not work like the iPhone shuffle, on account of the foobar shuffle not working like the iPhone shuffle.  Rather than shuffling the playlist, it picks a single track at random and continues forward from there.
- This template automatically refreshes every 5 seconds, regardless of whether or not you have the auto-refresh option checked in the HTTP Control preferences.  This is largely because the the AUTO_REFRESH macro is passed with quotes, and I didn't feel like stripping them out for an option that you should really leave turned on.  If there's a demand for it, I'll fix it.
- Many features are missing, on account of it being really hard to mimic Apple's UI with only a single form of user input (left-click).  I have a few ideas in the works, but feel free to make suggestions.

foo_httpcontrol

Reply #212
Thanks, Auric.  Though it chokes on large playlists (3143 items).

foo_httpcontrol

Reply #213
Thanks, Auric.  Though it chokes on large playlists (3143 items).


There is a setting in the http control preferences that is named page entries. Set that to however many playlist entries you want listed per page. Hope that helps.

*Feature Request* I would love to have a way of keyword searching either the playlist or the directory list, this would be extremely useful for those of us with large collections. Thanks again.

foo_httpcontrol

Reply #214
Thanks, Auric.  Though it chokes on large playlists (3143 items).

Yeah, I kind of expected that.  I believe it has to do with the maximum execution time allowed for Javascript on the iPhone.  Have you had better luck with other templates?

There is a setting in the http control preferences that is named page entries. Set that to however many playlist entries you want listed per page. Hope that helps.

*Feature Request* I would love to have a way of keyword searching either the playlist or the directory list, this would be extremely useful for those of us with large collections. Thanks again.

  Currently, the playlist does not support pages, as I wasn't designing this with very large playlists in mind.  I'll see if I can't work up something up, though.  Until then, I would recommend against loading playlists with more than 100 tracks.

A keyword search wouldn't be hard to implement, but like anything else it's matter of where to put it on the screen.

foo_httpcontrol

Reply #215

Thanks, Auric.  Though it chokes on large playlists (3143 items).

Yeah, I kind of expected that.  I believe it has to do with the maximum execution time allowed for Javascript on the iPhone.  Have you had better luck with other templates?

Actually, until this point I had been using a very simple layout with no playlist controls, just Play/pause, next, and previous.

foo_httpcontrol

Reply #216
I'm working on breaking the playlist up into chunks and loading them as you scroll.  The iPhone has no problem loading the whole playlist into memory, it just can't display it all at the same time.

foo_httpcontrol

Reply #217
Thanks for the great plugin and sorry for nitpicking, but "Browse path" restriction is easily avoided appending "..\" to the path.
Of course it's not a problem as long as you have the password set.

foo_httpcontrol

Reply #218
right, thanks for pointing that out. I'll add additional checks for this case.

foo_httpcontrol

Reply #219
I'm working on breaking the playlist up into chunks and loading them as you scroll.  The iPhone has no problem loading the whole playlist into memory, it just can't display it all at the same time.

FYI, Firmware 2.1 has added the ability to make a web app run in full screen.

Code: [Select]
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" />

foo_httpcontrol

Reply #220
FYI, Firmware 2.1 has added the ability to make a web app run in full screen.

Code: [Select]
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" />


Good to know; I'll add that in next time I get a chance to work on it.

foo_httpcontrol

Reply #221
this is great. perfect for my needs. huge thanks to all
The only missing feature for me is some form of search facility. In Foobar proper I use Album List set to 'by folder structure' to search my huge classical collection. Is it possible to emulate something like this function remotely?

foo_httpcontrol

Reply #222
Auric:  Thanks a lot for your work. I use your template but not on an iphone. I use it on my mac with fluid and its amazingly beautiful!!!
Yet i have one problem and 2 feature requests
My problem is that when using your template, the playlist page is not scrollable. I tried with fusion and firefox and it s not scrollable. Maybe it s something you want on iphone but do you know how to change that?

No my first feature request is to have a button on the playlist view to clear it. That can be useful when you want to change the music your listening to: you clear, you browse and you enqueue.
The second feature request is about enqueuing and i am not sure if it is doable.
When in the browser, if i am on a directory containing no mp3 files but directories which contain mp3, if i click enqueue nothing is enqueued. I suppose it is because the function for enqueuing is not recursive. Is it doable?

Thanks for your work, it s beautiful

EDIT: When switching track, the album cover is not refreshed.

foo_httpcontrol

Reply #223
My problem is that when using your template, the playlist page is not scrollable. I tried with fusion and firefox and it s not scrollable. Maybe it s something you want on iphone but do you know how to change that?

It has to do with how the iPhone handles scrolling.  To restore the scroll bar, open up the CSS file and remove the "overflow: hidden" attribute from the BODY element.

Quote
No my first feature request is to have a button on the playlist view to clear it. That can be useful when you want to change the music your listening to: you clear, you browse and you enqueue.

I'll see what I can do.

Quote
The second feature request is about enqueuing and i am not sure if it is doable.
When in the browser, if i am on a directory containing no mp3 files but directories which contain mp3, if i click enqueue nothing is enqueued. I suppose it is because the function for enqueuing is not recursive. Is it doable?

That's not something I can do on the template end; the plugin would have to support it.

Quote
EDIT: When switching track, the album cover is not refreshed.

If you manually switch tracks, it should update.  If it switches automatically after the previous track ends, there may be a pause, as the data is only requested every 5 seconds.

 

foo_httpcontrol

Reply #224
Quote
The second feature request is about enqueuing and i am not sure if it is doable.
When in the browser, if i am on a directory containing no mp3 files but directories which contain mp3, if i click enqueue nothing is enqueued. I suppose it is because the function for enqueuing is not recursive. Is it doable?

That's not something I can do on the template end; the plugin would have to support it.
it has been possible from almost the very beginning with EnqueueDirSubdirs cmd.

Quote
EDIT: When switching track, the album cover is not refreshed.

If you manually switch tracks, it should update.  If it switches automatically after the previous track ends, there may be a pause, as the data is only requested every 5 seconds.
may I ask why you didn't go in the way suggested by stock template, where the page is being refreshed only on track changes or in case of insufficient playing track data? requesting data every five seconds might be a bit consumptive batterywise.