Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

tryuploadSubtitles - Incorrect response? Struct vs. Array?

Thu Jun 18, 2009 2:06 am

I have the following in the tryuploadsubtitles:

When the subhash is in DB:
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>status</name>
<value>
<string>200 OK</string>
</value>
</member>
<member>
<name>alreadyindb</name>
<value>
<int>1</int>
</value>
</member>
<member>
<name>data</name>
<value>
<struct>
<member>
...
When the subhash is not in DB:
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>status</name>
<value>
<string>200 OK</string>
</value>
</member>
<member>
<name>alreadyindb</name>
<value>
<int>0</int>
</value>
</member>
<member>
<name>data</name>
<value>
<array>
<data>

<value>
<struct>
<member>
...
Since in both cases we should be getting a single set of data in the results, doesn't it make sense to remove the lines in red, so the structure of both files becomes identical regarding level of info? This way I could parse the response, no matter what it is, with the same routine.

The added Value/Array/Data hierarchies are not adding much, since it's been made clear the response will always be for the batch as a whole, and not to individual items...

I'm afraid this can't be changed or compatibility would be broken, but I thought I'd still ask.
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

User avatar
oss
Site Admin
Posts: 5890
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Thu Jun 18, 2009 7:30 am

I got your point, but as you thought - it can not be changed now, because it will break up with current implementations. You know before there was SearchSubtitles() contents, now I put there first result from CheckMovieHash2()...

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 31 guests