PDA

View Full Version : Download entire directory from Slimserver?



bigjilm
2005-05-06, 11:12
Hi everyone,
first off - Slimserver and my Squeezebox are awesome. A hearty thank you to everyone who had anything to do with this stuff.

secondly - I hope I have the right forum for this question. How can I modify the Slimserver to allow browsers to download an entire directory from the server? I occasionally download individual songs (using the download link on the songinfo.html) but it's a real pain to download an entire album or directory. Ideas?

Thanks,
BigJilm

mherger
2005-05-06, 11:19
> secondly - I hope I have the right forum for this question. How
> can I modify the Slimserver to allow browsers to download an entire
> directory from the server? I occasionally download individual songs
> (using the download link on the songinfo.html) but it's a real pain to
> download an entire album or directory. Ideas?

This isn't something a web server can do. They only serve one file at a
time.

--

Michael

-----------------------------------------------------------
Help translate SlimServer by using the
StringEditor Plugin (http://www.herger.net/slim/)

bigjilm
2005-05-06, 11:39
If I was to implement it from scratch, I would probably direct the download link to a PHP/ASP/etc page that could zip up the directory and return it as a single file.

I would write this myself, but opening the source for Slimserver makes me think I'd have a pretty steep learning curve.

Has anyone seen this implemented on a SlimServer before?

fuzzyT
2005-05-06, 11:42
Michael Herger wrote:

> This isn't something a web server can do. They only serve one file at a
> time.

Nonsense. Or, at the very least, imprecise. Webservers _can_ deal with
multiple concurrent connections and requests.

Roy Owen
2005-05-06, 11:47
Wouldn't this constitute unauthorized copying/distribution?
--
Do meddle in the affairs of Dragons,
for you are crunchy and good with Tabasco.

mherger
2005-05-06, 11:59
>> This isn't something a web server can do. They only serve one file at
>> a time.
>
> Nonsense. Or, at the very least, imprecise. Webservers _can_ deal with
> multiple concurrent connections and requests.

I thought of this objection. But its one request, one file. HTML files
typically cause further requests (images) which will result in several
parallel transfers. But these are all independant requests.

--

Michael

-----------------------------------------------------------
Help translate SlimServer by using the
StringEditor Plugin (http://www.herger.net/slim/)

fuzzyT
2005-05-06, 12:34
Roy Owen wrote:
> Wouldn't this constitute unauthorized copying/distribution?

it could, but not necessarily.

only if you assume that someone other than the operator of the
SlimServer has rights to the information in the files, or that the
copying wasn't within the terms of "Fair Use" (assuming US law here).

for home recordings, or those released under CopyLeft style licenses
there would be no violation.

--rt

fuzzyT
2005-05-06, 12:59
Michael Herger wrote:

> I thought of this objection. But its one request, one file. HTML files
> typically cause further requests (images) which will result in several
> parallel transfers. But these are all independant requests.

All very true. But it is possible to generate multiple independent
requests with one mouse click. As you point out, this happens with
almost every web page you visit. Only one document is delivered in the
initial request, but the handling application for that document type
interprets it and issues additional requests for other items. Playlist
handling for most streaming formats works in the same.

The servers can handle these requests just fine.

What's needed is a means for the user agent to conveniently generate
these requests and then handle the resulting issues of picking a
destination, possible bandwidth saturation and perhaps dealing with
pause and restart issues. These features are usually bundled in a free
standing application or browser extension known generically as a
"download manager".

But I think bigjilm's situation can be improved without going to those
lengths. I think all they need is for the download links to appear in
the album songlist page, rather than the songinfo page. Still one click
per track, but save a lot of paging around to get to those links.

--rt

Pale Blue Ego
2005-05-06, 13:50
Ideas?

There are Firefox Extensions that can handle that.

https://addons.update.mozilla.org/extensions/showlist.php?application=firefox&category=Download%20Tools

fuzzyT
2005-05-06, 13:56
Pale Blue Ego wrote:
> There are Firefox Extensions that can handle that.
>
> https://addons.update.mozilla.org/extensions/showlist.php?application=firefox&category=Download%20Tools

and they're great, but AFAIK they all deal with the set of links on a
single webpage. i think the issue here is that you have to navigate to
the songinfo page to get the download link. because of that, there is
only ever one d/l link on a page.

--rt

bigjilm
2005-05-10, 11:21
Hi everyone,
some good replies, thanks!

For the copyrights, I see no difference in navigating to each individual song page for the download, than I do hitting a single link for an archive download. Sure, the archive is more convenient, but there's no reason to think it's changing the model. For the record, I listen to my music from work, but sometimes my connection isn't fast enough, so I'd rather just download the album and listen to it offline. I own my laptop, and I believe that copying my MP3 files to my laptop is legal, as long as I own the original media.

Ideally, I would find a way to insert a new link at the album level that would call a PHP page with a parameter. I'm thinking an anchor like: http://myserver:9000/albumdownload.php?songs%2fGoldfinger%2fDisconnecti on%20Notice

I could write a PHP page to archive the directory passed in the parameter, and return it as a binary stream. The PHP side is not too difficult, but putting the link on the album page is kind of tricky.

Anyone have any ideas on how this link could be added?

It just occurred to me - can the Slimserver serve up a PHP (or another kind of server-side page)? Would my link have to point at an Apache link (get rid of the :9000, enable Apache on my server)?

This is getting kind of hardcore, which is why I was hoping that someone out there had some ideas.

Thanks,
BigJilm