I want to create some additional views for my UPnP-devices, e.g. some "hierarchical categorized" views like: Genres -> Albums -> Tracks
How can I do this with mediatomb?
Another question: when I browse the views with my UPnP-device, I cannot scroll from the first item to last one. I have to scroll down all entries to go the last one.
With twonkyvision a can go up one item from the first one and I am at last item.
Isn't this possible with mediatomb?
for a custom view/hierarchy - please have a look at the scripting documentation, this is exactly what you want.
Regarding the scrolling: I would assume that this is some special behavior of your device, but to be honest - I have no idea why it works with Twonky but not with MediaTomb.
In UPnP terms the "browse result" contains the list of containers and items, devices can request this list in chunks (i.e. give me first 10, give me next 10), but the list is finite and the return XML contains a value of total available elements. So naturally, it would be up to the device to recognize when the list is over and offer some wrapping in the UI. Btw I do know devices that do this just as you described with all UPnP servers…
thanks for the hint with the scripting feature. I have already had a look on the wiki page, but it's very technical and needs to go in depth.
Are there any collections of ready scripts without reinventing the wheel again? I think my wish (a view with Genres -> Album -> Tracks) is not so exotic and has maybe already carried out by someone?
For the issue with the scrolling: I am using a "dnt IPdio" Webradio to access my Mediatomb server. I have to compare the behaviour between twonky and mediatomb a little bit more, maybe there was a change at the last firmware update of the player…
The 0.12 version has some nice hierarchies already, you just need to activate the import.js script in the config.xml as described. Building your own hierarchies is quite easy in fact, took me an hour to understand the syntax. Just don't forget to delete your database and let all be reimported.
all user contributed scripts are on the wiki page, maybe you can find something that suits you.
I would not "fear" that stuff, just enable "js" layout in the configuration and play around with the default import.js script, I think you will get the idea of how it works pretty quickly even without going into too much detail.
If you are using 0.11 it might indeed be a good idea to try the import.js from SVN, I think it has some improvements.
Thanks for your help! I think I have now understood how it works, so I added the following lines in the import.js:
chain = new Array('Audio', 'Genres/Albums', genre, album);
addCdsObject(obj, createContainerChain(chain), UPNP_CLASS_CONTAINER_MUSIC_GENRE);
But I cannot see the new browsing-categorie "Genres/Album"… I have updated the database and restart mediatomb, but without success.
You wrote that I have to activate the import.js in the config.xml file? I cannot find an option for this. Nor I can find something about it in the scripting manual. Could you give me a hint please?
Thanks a lot for your great work,
I have found the necessary option in the config.xml file myself:
has to be changed to
Now it seems to work.
P.S.: I think I am technical user, but for non technical users this would be impossible to implement… I think the Web GUI of mediatomb should be increased to do such settings from there. The user should be able to select from several predefined views and so not to need to edit any js files (my mother, who is working with a linux desktop wouldn't be able to do such things ;-).
has to be changed to:
Sorry, my previous post has been courrupted because of the missing code-block
That's what I thought as well. The import script provided looks as if it is developed with a few hundred photos and videos in mind and a thousand mp3s. I wanted to make the script I created "perfect", document it and then suggest - if Jin is fine with it - to add parts of it to the package.
You can also submit scripts to our wiki, but of course it is possible that we include several scripts in the package.
Just keep in mind: the more complicated the hierarchy is and the more virtual objects you have - the slower the import gets. It should be faster with caching enabled (this feature is in SVN), but still, the import speed could be better…
There should be several views available and the user should be able to select individually in the WebGUI the ones he/she wants to use (e.g. marking them to activate them). So he/she can choose how many performance intensive import scripts he/she is using.
It is clear that we cannot cover any possible view, but there could be a wider range of predefined views. Important is to improve the usability to do it with the WebGUI for the nontechnical users.
Well, I do not think that setting the layout to "js" and changing the path to the import script in config.xml is very "technical" :) Sure, it would be more convenient to do it via the UI, but just changing the path is really not that difficult, is it?
As for "predefined views" - that's what the scripting wiki is for, users can submit their scripts, and others are welcome to download, try and use them. So that's up to the community… the layout is anyway a matter of taste, everyone likes something different and we welcome script submissions to cover the widest range of possibilities.
I am a friend of making a software as easy to use as possible. Sure, the point's aren't very difficult, but even for me as a technical user it has cost me several hours to do all the "investigations" and reading the manual about scripting.
I know many people who won't be able to do this job, so they would cancel their attempt of using mediatomb as mediaserver. They are all "normal users" without knowledge of programming or scripting.
Twonkymedia shows how easy it could be. All things can be configured via the WebGUI and you get a working solution in several minutes without programming js.