FAQ  •  Register  •  Login

REST Library Update

<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Fri Mar 23, 2012 4:31 am

REST Library Update

When using PUT /rest/repository I assume you must provide the data for the complete library, and not just the sections that have changes.

Second question, can the ID's be in random order or must they be sequential, in other words if I want to reorder the items can I just alter the ids or do i need to move the whole <onlineRepository> section.

Third question, if I want to delete an item do I need to renumber all following section ids so there is no gap?

Fourth question, if i want to add an item( id left blank) can the be anywhere in the sequence or just at the end.

Fifth question, once a feed is added does it keep the same id until it is deleted or does Serviio renumber the ids dynamically as required. I want to automate refresh of some feeds so I need a locked in id for forceOnlineResourceRefresh
<<

will

DLNA master

Posts: 2138

Joined: Mon Aug 30, 2010 11:18 am

Location: UK

Post Fri Mar 23, 2012 8:20 am

Re: REST Library Update

1) You must provide a complete copy of how the library should look you need to GET /rest/repository, make your changes and then PUT /rest/repository

2) The ID is for internal use, the client doesn't/shouldn't/cannot change them. Moving the order of data before sending it back does nothing, except if there are new items

3) No, just remove the item

4) Think you can add it anywhere, it doesn't really matter unless you are adding multiple shows I guess, I shove it at the end

5) It keeps the same ID as far as I rememeber

What are you trying to do, I'm guessing a small utility/script rather than a full app? If so, you still might as well grab a new copy of the repository and check against that rather than keeping track of ids yourself so that you can refresh an online source
Will

ServiiDroid (Android Console) Developer: Download | Home | Support
ServiiGo (Android 3G/4G/WiFi Playback App) Developer: Download | Home | Support

Return to Third-party tools integration

Who is online

Users browsing this forum: No registered users and 15 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.