Scripting number of entries in a container

  • Anonymous - 2008-05-18

    I just knocked up an import script to organise my movies into containers "ABC", "DEF", "GHI", etc and it works quite nicely when rendering on the PS3.  However I'd like to keep track of the number of movies I have inside each of the containers e.g. "ABC (20)", "DEF (3)", etc.

    I'm a programmer but I have never done Javascript before so I'm a bit out of my depth.  Is there a way to interface with the sql database being used by mediatomb to create and maintain a table of containers and associated numbers; or a way to interface with the file system to create and maintain a file that holds the container names and associated numbers.  Those are the only 2 ways I could think of keeping track of the count information.  Perhaps an update to the mediatomb engine could expose a method that gets the number of items in a particular container?

    What do you experts think?  What's the best way to tackle this?

    BTW as soon as I get my login for the Wiki I'll put my script online.  It seems to be taking forever to get the password e-mail...


    • Jin

      Jin - 2008-05-18


      currently there is no way to do this via our js feature, it would also require some changes in the way how containers are created, because you would have to update existing containers to change the number in the title. Apart from that we would indeed have to add a function that would allow querying the number of items in a container, this would probably slow down the import process even more.

      Sorry, but I do not think that we will be adding this.

      Did the wiki registration work out?

      Kind regards,

      • Anonymous - 2008-05-20

        Thanks for the reply.  It's a shame you don't think that the counter is a good idea.

        It doesn't look like the wiki registration is working.  I never got the confirmation e-mail with my password.


    • Jin

      Jin - 2008-05-20

      Could you please try again, and if it does not work drop me an email?

      I see it is working for other users, maybe it was just some temporary failure.

      Sorry about the counter :>

      Kind regards,

      • Anonymous - 2008-05-21

        Would you mind if I had a look in the source code to see if I could get the counters working as an option for users who may want to use them?  I'll probably have to ask a few questions about the structure of the code tho.

    • Jin

      Jin - 2008-05-21

      To be honest - I think this is not easy to do, especially if you want the patch to get accepted. We generally do not like too intrusive patches and usually accept only smaller, standalone features that do not touch the main server components; main reason for that is that we want to keep our copyright ownership throughout the server code.

      Nevertheless, I could of course give you some pointers if you want to play around with the code, be it for a patch or just for your own needs.

      Kind regards,


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks