[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 1014: Undefined array key 3
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 1014: Undefined array key 3
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 1014: Undefined array key 3
AniDB • UDP API - FILE command
Page 1 of 1

UDP API - FILE command

Posted: Sat Feb 18, 2006 11:06 pm
by jonbaby
I am having a problem with the FILE command using the UDP API.
It seems that no matter what command I send I always get the basic response message
ie something along the lines of
220 FILE 15201|74|445|41|1|242772540|a53c401ed95eaa502ba85acde773040c|Ai yori Aoshi - 1 - Relation - [Zhentarim DivX].ogm

I have tried both variations of the FILE command which use fdata and adata

FILE fid=15201&fdata=-1&adata=-1&s=xxxxx
and
FILE size=9999&ed2k=XXXX&fdata=-1&adata=-1&s=xxxxx

Is there something I am doing wrong?

Posted: Sun Feb 19, 2006 6:22 pm
by epoximator
it's fcode and acode, the example in wiki was just wrong

Posted: Sun Feb 19, 2006 11:42 pm
by jonbaby
Ok, thanks a lot.

Posted: Mon May 15, 2006 1:38 am
by KnightAR
Has the wiki examples been fixed yet? They look very confusing ;_;

- KnightAR

Posted: Mon May 15, 2006 7:04 am
by epoximator
yeah, fcode and acode was fixed then. & -> & was fixed now. what else is confusing?

Posted: Mon May 15, 2006 7:51 am
by KnightAR
I'm just confused at the data fields, By looking at the wiki examples:

15201|74|445|41|1|242772540|a53c401ed95eaa502ba85acde773040c|Ai yori Aoshi - 1 - Relation - [Zhentarim DivX].ogm

15201|74|445|41|0|1|242772540|a53c401ed95eaa502ba85acde773040c|a69c9ca88822338685f163db95da8231|842fc9060b4338757d0197a9f7bf0c79cf39a549|01ffc5f4|842fc9060b4338757d0197a9f7bf0c79cf39a549|dual (jap/eng)|english|very high|DVD|Ogg Vorbis|101|DivX5|1182|640x480|ogm|Zhentarim DivX|zx|24|24|2002|TV|Ai yori Aoshi|?????|Bluer than Indigo|Azul||aya1'AYA'AiAo|

on the 2nd example: 15201|74|445|41|0|1|242772540|a53c401ed95eaa502ba85acde773040c| ... The red looks out of place (It wasnt there for the first example) cause I would think that anything new would come after a53c401ed95eaa502ba85acde773040c ... am I wrong?

I'm trying to find a way to know the difference between those strings using acode & fcode & those that dont use them ... and I dont see any documented examples on using selected (a/f)codes insted of using -1 ... so thats where I'm kinda confused with.

- KnightAR

Posted: Mon May 15, 2006 9:00 am
by epoximator
that 0 is the lid (mylist id). a custom response is built after the f/acode tables and has nothing to do with the default response. file data (f) comes before anime/ep/group data (a).

let's say you only need data to build the filename:

Code: Select all

int fcode = 1<<25;
int acode = 1<<1|1<<8|1<<9|1<<20;

>FILE fid=15201&fcode=33554432&acode=1049346
<220 FILE
15201|ogm|zx|01|Relation|Ai yori Aoshi
that's how you make the codes. the returned fields are ordered by the tables (bit pos), as you can see. note that the fid is not optional.

btw, you should _not_ use fcode=-1 and acode=-1 (except when testing). this would break your client whenever new fields are added at server side.

Posted: Mon May 15, 2006 8:05 pm
by KnightAR
ah, ok. I understand now. Thanks!