Map another subsonic

Got an idea? Missing something? Post your feature request here.

Moderator: moderators

Map another subsonic

Postby rimdur » Mon Oct 22, 2007 8:22 pm

Hi. Thanks for a great program.

Is it possible to make a feature that enables us to map another subsonic into "my private subsonic". E.g map my friends subsonic to my subsonic so that I don't need to start two sessions of subsonic.
Map it up in the same section that we map our music drives.
Then make a drop down list in the left pane where we can choose what subsonic to play from.
rimdur
 
Posts: 5
Joined: Mon Oct 22, 2007 8:16 pm

Postby sindre_mehus » Tue Oct 23, 2007 6:01 pm

Hi rimdur,

That would be very cool, indeed. I fear, though, that the technical complexity involved in this (there's a lot of issues) would outweigh the coolness.

I'll keep it in mind, though.

Cheers,
Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby dagg » Fri Dec 07, 2007 6:55 pm

I came to this forum looking for information on exactly this topic. I agree it would be very nice to have this feature! I also agree it would be a bit tricky to implement this but it should be doable...

I'll describe what jumps to my mind first if i would try to implement this, although i have literally never seen a single line of subsonic source code :)

Let's say the web interface is extended with ajax, allowing pages to be dynamic client side. Instead of the html file currently showing the left frame with the artist index there would be an html file containing scripting (e.g. javascript, though there are a number of libs that abstract these scripts) that dynamically retrieves a list of artists from a number of user-configured hosts. The script would then combine these lists, generate the appropriate html code for it, and display it in the browser. Displaying in the browser is done by setting the content of an html tag with id="bla" to a certain value (e.g. list of artists), this is often abstracted by ajax libraries available for most languages.

Following this logic you could replace all web-interface functionality in a similar fashion - retrieving info from multiple hosts, combine it, and display it. As a bonus you could get rid of the html frames all together by doing all the ajax scripting in a single frame - (no biggy but i am getting scrollbars all over the place in the webinterface - firefox 2.0.laststable - looks kinda ugly and should not be necessary for most cases).

This would be quite some work already and leaves one more problem: streaming audio from multiple hosts in a single playlist. I don't know much about serving streaming audio but i'd think it should be possible to just output a playlist file containg multiple 'tracks' pointing to different hosts. If not you could limit a single playlist to contain only tracks from a single host, easy solution and should be acceptable to users i think.

Simply put: you move part of the logic to the client's browser scripting and extend this logic with multiple subsonic hosts functionality.

edit: of course i really appreciate subsonic already, and i just wanted to maybe give you some idea's on implementing this. Hopefully resulting in an implementation at some point :) Imagine sharing subsonics with a bunch of friends, being able to browse and play music on demand anywhere from a huge collection.
dagg
 
Posts: 2
Joined: Fri Dec 07, 2007 6:23 pm

Postby sindre_mehus » Sat Dec 08, 2007 5:27 am

Yeah, the client-side approach you describe is probably the most feasable. Of course, it's still a huge job. I have started working on a Flash-based interface which would fit nicely into this scheme.
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby dagg » Sat Dec 08, 2007 6:16 pm

Nice, yeah i agree it would be quite a task, great to hear you are keeping it mind though. A flash client sounds good too, should offer anything ajax-based clients can do (and more :)). Looking forward to see the result, multiple hosts or not!
dagg
 
Posts: 2
Joined: Fri Dec 07, 2007 6:23 pm

Cool

Postby rimdur » Mon Jan 21, 2008 8:26 pm

Hi, Sindre. So cool that you have kept this in mind. Looking forward to whats happening with Subsonic.
rimdur
 
Posts: 5
Joined: Mon Oct 22, 2007 8:16 pm

Postby mars96 » Fri Feb 01, 2008 12:20 pm

I think the possibility to search other subsonics that friends have running is indeed a great option and I don't think this is hard to implement.
As I just did a backport of subsonic v3.3 to Java 1.4 I'll take a look at the current search code.

What I really don't like is a flash based interface (or is this just the integrated player?) as this requires the client to have a flash version installed. I'm thinking basically about less common Operating Systems far of the mainstream (Win, Linux, MacOS).
A better approach would be JSF (Java Server Faces) to build the GUI.
This doesn't require additional 3rd Party tools at the client side and integrates nicely into the existing Java stuff.
Last edited by mars96 on Mon Feb 04, 2008 9:23 pm, edited 2 times in total.
cu
mars96
 
Posts: 29
Joined: Fri Nov 09, 2007 7:19 pm

Postby mistaox » Fri Feb 01, 2008 9:20 pm

This scenario need not be that complicated.

Each subsonic instance should have its own web service that spits out XML data that can be interpreted by other instances.

Simple!
mistaox
 
Posts: 54
Joined: Sat Dec 09, 2006 7:36 am

Postby mars96 » Mon Feb 04, 2008 9:46 pm

mistaox wrote:This scenario need not be that complicated.

Each subsonic instance should have its own web service that spits out XML data that can be interpreted by other instances.

Simple!


Here is my basic concept so far:
The acegi-security component for Basic Authentication is already there when I look at the applicationContext-security.xml. I think the "/podcast" link uses the basic authentication right now.
So this is basically already solved. But the server should be using SSL so no user/password information is send unencrypted.

If this is not enough there is the possibility to use the digest authentication also provided by the acegi-security component.

Internal settings:
The admin needs the possibility to add additional servers (complete link as: http://some.server.org:9009/subsonic/) so uri and port as well as content of subsonic service are know.
Then he also needs to add user/pass for each server and if the server should be searchable for general users of this subsonic.
This would allow the admin to use the extended search while the general users search would not be extended to this kind of linked servers.

On the user side the user has a checkbox that allow to "Allow extended search (linked servers)"

Visible changes at the search dialog:
Finally at the search dialog at the top I wouldn't change anything.
But the search window that is shown in the central frame will get an additional search button called "extended search" (if the user is allowed to use this extended search - see above). If you click that one, the search request will be send to all servers added by the admin and which are marked at the config dialog to be used for extended use (again see above).

Service code:
What I've not yet fully checked is the the current search code and how this has to be implemented.
I've never used Spring before so I need to look a little bit longer at the code. So far it still looks easy to do.

Any comments?

Edit: Ok, I was kind of bored and began implementing the extended search. ;)
I already added most of the visible stuff except for the real search request send to the other servers. There are some errors I need to correct as I've not really tested my current implementation. The storage stuff for the class ExtendedSearchServers (very similar to net.sourceforge.subsonic.domain.MusicFolder except for other servers) is not yet fully completed. I handle creating and deleting the servers as you can create and delete music folders (see "settings" --> "music folders") except you specify the base url, username, password and if it's enabled for admins only or also users.
As I need to work on the really important stuff the next two days I should be able to add some screenshots on Thursday.

Edit2: Here are already two of three possible screenshots:
There is an error (no action handled) so at the moment I can't store the extended servers specified.
This is basically how it looks (delete button would show up when the entry is actually stored):
Image

It's possible to store the user setting to give the user the "extendedSearchRole".
Image

Edit3: Ok, here is the new search window.
The "Extended search" button only shows up if the user has the Admin-Role or the ExtendedSearch-Role (I might change that slightly until the search is ready).
I've added this information to the SearchCommand class so I can access this at the search.jsp:
Image

The actual search on other servers is not yet implemented!
Anyone willing to help?


There will be most likely some changes until it's complete.
The strings shown are all in the resource bundle so nothing is hardcoded into the jsp files.
cu
mars96
 
Posts: 29
Joined: Fri Nov 09, 2007 7:19 pm

Postby mars96 » Thu Feb 07, 2008 2:23 pm

Today when I talked with a friend about the extended search he came up with nice idea.

Instead of search request send to each external subsonic instance it would be a nice idea to fetch the latest database entries for example once a day and store this locally.
This way you can search the copy you stored in your database and do not send every request to each external subsonic.

You don't have the latest possible results but on the other hand is your music archive changing that much???

Any comments?


I began yesterday to work on the save/delete extended search server list.
As far as I understand Spring so far using the SearchSettingsController which extended SimpleFormController (a Spring class) can't be used.
I began changing the SearchSettingsController to extend ParameterizableViewController instead. This is also used at the MusicFolderSettingsController and PodcastReceiverController to manage the music folders and podcast links.
At the moment I get a NullPointerException after I try to get the data from the database.
I hope to get it working this evening, so only the real search has to be implemented (or in conjunction with the above described option to fetch the music data of external servers once a day).

@Sindre: I'll give you the code so it can be integrated into Subsonic 3.4 (I hope to be ready before you release that one).
Last edited by mars96 on Fri Feb 08, 2008 12:09 am, edited 1 time in total.
cu
mars96
 
Posts: 29
Joined: Fri Nov 09, 2007 7:19 pm

Postby mistaox » Thu Feb 07, 2008 5:24 pm

Wow..you really ran with this one..I hope to test this in a future release
mistaox
 
Posts: 54
Joined: Sat Dec 09, 2006 7:36 am

Postby mars96 » Fri Feb 08, 2008 12:07 am

mistaox wrote:Wow..you really ran with this one..I hope to test this in a future release


But it's not yet ready. ;)

Edit:
Finally I got the create/delete/modify Extended Search Server list (first of my screenshots above) working. I overlooked that I have to add the extendedSearchSettingsDao to the ApplicationContext-service.xml file.
I only need to understand how this "form:form" stuff works in Spring. I've got an issue with the path statement that was there before (<form:input path="interval"...>). This is only a minor problem and should be fixed later today...if I have the time to look into it.

The actual extended search implementation is next on my todo.
So far I'm not sure if I go for the direct search or the search on periodically fetched database table content....we'll see.

Input from other users/developers are still welcome. Now is a good time...once I begin this implementation it's unlikely that I change the way I did plan it.

Edit 2:
I'll move the extended search server configuration to it's own settings subentry. This way there is less trouble to integrate it into other subsonic versions and I don't have to rewrite the SearchSettingsController as I did before.
cu
mars96
 
Posts: 29
Joined: Fri Nov 09, 2007 7:19 pm

Postby googli » Tue Feb 26, 2008 1:51 pm

I have also kind of bumped into this issue when researching what might fit into a new search engine. ( http://forum.subsonic.org/forum/viewtopic.php?t=110 )

I came to the conclusion that solr would be perfect for this, also solr can deliver results as json if the plan is to do this on the client side.
googli
 
Posts: 6
Joined: Sun Sep 10, 2006 8:05 am

Postby mars96 » Tue Mar 04, 2008 2:19 pm

googli wrote:I have also kind of bumped into this issue when researching what might fit into a new search engine. ( http://forum.subsonic.org/forum/viewtopic.php?t=110 )

I came to the conclusion that solr would be perfect for this, also solr can deliver results as json if the plan is to do this on the client side.


Hi googli!
I've looked into the other thread and some of the requests you made to search the database should be easy to implement. There are some changes in the backend but because of the good sourcecode structure (well done Sindre!) you can get that done pretty fast even if you just start looking into the sourcecode.

I've not looked into Solr and JSON but I already stumbled over JSON some time ago. Solr uses Lucene but that's basically all I know.
Generally I like it as simple as possible. That means I don't really like to use a dozen of different libraries. I know this might solve some things but you also need to get into it which takes time. Most of the time you can get things done as fast using the stuff that's already there instead of adding another 3rd party library. Then there is the other side: I want to be Java backward compatible (at least to Java 1.4). Often this collides with libraries because they require Java 1.5+.

If you have already some example using Solr in Subsonic I'll take a look (when I have some time - currently my diploma is really buggin me and I have to focus on this).

I haven't changed much after my last Edit (see my previous comment above) but with two other friends we set up a SVN repository to work together on the missing stuff. I've not yet checked in the code but I created a package containing a patch file for all modifications and the new java classes. I hope to get some feedback from one of my friends. Once I get a positive feedback I'll put the complete code into our Subversion repository. By the way there is a guest access possible but I have to discuss with my friends when we spread the link to this repository.

I've also tried to contact Sindre (~two weeks ago) using the sourceforge address but so far I didn't get an answer (at least I haven't seen a reply). Because of this I currently have to assume he's not interested in this search extension over multiple instances.
cu
mars96
 
Posts: 29
Joined: Fri Nov 09, 2007 7:19 pm

Postby pampelmusenmann » Tue Mar 04, 2008 2:42 pm

mars96 wrote:I think the possibility to search other subsonics that friends have running is indeed a great option and I don't think this is hard to implement.

On one hand you'll get all kind of different security issues, on the other hand it sounds pretty nice to have some kind of napster based on subsonic ;-)

I think, it would be grat to enable more flexible templates possibilities e.G. embedding in Websites as 'small Player'. To enable a direct connection from you websites and programms...
pampelmusenmann
 
Posts: 19
Joined: Fri Feb 29, 2008 2:40 pm

Next

Return to Feature Requests

Who is online

Users browsing this forum: Bing [Bot] and 8 guests