Sign up here and you can log into the forum!

Proposal for a unified plugin configuration file

Discussion, features, plugins--everything about zoster's UMSP UPnP Media Server software

Proposal for a unified plugin configuration file   

Postby mad_ady » Sun Aug 21, 2011 6:31 am

Hello everyone,

I'd like see your opinions on a unique xml file, storable in /conf that could have sections for all the UMSP plugins that need it. For example, we could have one file that could hold data for daily-podcasts, grooveshark, indiantv, dailymotion, etc, each in their respective sections. The file would have a format similar to this:
Code: Select all
<?xml version="1.0"?>
<daily-podcasts>
   <list>
   <item>
      <description>Leisure</description>
      <image>http://upload.wikimedia.org/wikipedia/commons/thumb/2/2e
/Neelkanth.jpg/120px-Neelkanth.jpg</image>
      <item>
         <description>Marine podcast</description>
         <image>http://upload.wikimedia.org/wikipedia/commons/th
umb/7/75/Muchroom_coral.JPG/220px-Muchroom_coral.JPG</image>
         <item>
             <url>http://feeds2.feedburner.com/WeeklyMarinePodca
st-hd</url>
             <limit>-96</limit>
         </item>
      </item>
        </item>
  </list>
</daily-podcasts>
<grooveshark>
</grooveshark>
<indiantv>
</indiantv>
<dailymotion>
  <list>
  <user>
      <propername>Channel - News</propername>
      <userid>news</userid>
      <type>channel</type>
      <maxresults>20</maxresults>
  </user>
  </list>
</dailymotion>


Pros:
* new plugins don't need to add new files to /conf
* one single file is easier to manage/edit than several files
* an extension to the web interface could be built to allow easy editing + syntax checking of this file
* one file could free up additional conf variables, since the file name would be known

Cons:
* One syntax error in the file will break all plugins that depend on it
* Most plugins need to be changed, and old settings would not be used (users would need to migrate their data)
* All plugins have access to the same data - could read users/passwords for other services (though they can do this right now).

The reason why I brought this up is that I'm writing a new plugin that will need it's own xml file, and creating a new file in /conf is begining to be dangerous. In the future it might not be sustainable. Plugins that just use variables under /conf/config could go on using them - no point in changing that, but plugins requiring extra (user) data might benefit from this.

So, what is your opinion on this?
User avatar
mad_ady
Developer
 
Posts: 2996
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Proposal for a unified plugin configuration file   

Postby RMerlin » Sun Aug 21, 2011 9:40 am

How big is that XML file you will require going to be? Could it be simply Base64 encoded, and stored in /conf/config as usual instead, or are users expected to be allowed to manually edit it, break all their UMSP plugins, and come to you for support? :)
WDLXTV Webend maintainer. Visit http://www.lostrealm.ca/wdlxtv to see my other WDLXTV projects.
If you like my work, please consider donating.
User avatar
RMerlin
WDLXTV Team
 
Posts: 3236
Joined: Sat Jun 26, 2010 9:25 am
Location: Montreal, Canada

Re: Proposal for a unified plugin configuration file   

Postby mad_ady » Sun Aug 21, 2011 10:02 pm

I'm not set on the format, it could be xml, gzipped xml, json or whatever, but I think having the ability to edit it without going to the gui would be better. Also, it might keep the GUI simpler.
I realize it is likely to grow beyond the capabilities of /conf, but as far as I remember, having multiple files in /conf consumed more space than having a single file...
So, let's hear some proposals. :)
User avatar
mad_ady
Developer
 
Posts: 2996
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania


Return to UMSP Media Server

Who is online

Users browsing this forum: No registered users and 1 guest