2010-10-14, 06:44
I'd like to state that I have no problem with the path in core (which as you saw on your ticket I liked), its mainly that I don't see the need for a client to send the path, for many reasons.
And yeah jsonrpc wouldn't technically need to check the path but since its exposing the core method I either need to have jsonrpc do a check, or be garantued that the underlying does it, which I dislike assuming.
So if you want #1 what you really are after is a AddPathToLibrary or AddMediaSource with the possibility to add autoscan. This is a method I think would make sense having as I see more uses in this, for example web gui could allow user to add sources etc. If you still wish to make #2 I would suggest making it to instead of taking a path, take a media source. And by media source I mean an ID which is given in the GetMediaSources method (IIRC the name correct). That way it would perhaps be same security as a full scan, still can't say I perticularily approve of it but that way you have more of a chance for inclusion (perhaps other developers will vote in your favour).
At any rate, when I began this discussion all I wanted was to point out that I think there is a much better way solving the problem, since you run NFS and is tech savvy it may not be perfect but for the vast majority of users a polling solution over NFS is what they would expect, not a script on server telling xbmc what to do.
And yeah jsonrpc wouldn't technically need to check the path but since its exposing the core method I either need to have jsonrpc do a check, or be garantued that the underlying does it, which I dislike assuming.
So if you want #1 what you really are after is a AddPathToLibrary or AddMediaSource with the possibility to add autoscan. This is a method I think would make sense having as I see more uses in this, for example web gui could allow user to add sources etc. If you still wish to make #2 I would suggest making it to instead of taking a path, take a media source. And by media source I mean an ID which is given in the GetMediaSources method (IIRC the name correct). That way it would perhaps be same security as a full scan, still can't say I perticularily approve of it but that way you have more of a chance for inclusion (perhaps other developers will vote in your favour).
At any rate, when I began this discussion all I wanted was to point out that I think there is a much better way solving the problem, since you run NFS and is tech savvy it may not be perfect but for the vast majority of users a polling solution over NFS is what they would expect, not a script on server telling xbmc what to do.