UDP API Definition: Difference between revisions

Line 1,364: Line 1,364:
----
----


=== FILE: Retrieve File Data (deprecated) ===
'''Command String:'''<br>
by fid:
* FILE fid={int4 id}[&fcode={int4}&acode={int4}]
by size+ed2k hash:
* FILE size={int8 size}&ed2k={str ed2khash}[&fcode={int4}&acode={int4}]
by anime, group and epno
* FILE aname={str anime name}&gname={str group name}&epno={int4 episode number}[&fcode={int4}&acode={int4}]
* FILE aname={str anime name}&gid={int4 group id}&epno={int4 episode number}[&fcode={int4}&acode={int4}]
* FILE aid={int4 anime id}&gname={str group name}&epno={int4 episode number}[&fcode={int4}&acode={int4}]
* FILE aid={int4 anime id}&gid={int4 group id}&epno={int4 episode number}[&fcode={int4}&acode={int4}]


'''Possible Replies:'''
* 220 FILE
: {int4 fid}|{int4 aid}|{int4 eid}|{int4 gid}|{int4 state}|{int8 size}|{str ed2k}|{str anidbfilename}
* 220 FILE
: {int4 fid}|...(data list)
* 322 MULTIPLE FILES FOUND
: {int4 fid 0}|{int4 fid 1}|...|{int4 fid n}
* 320 NO SUCH FILE
'''Info:'''
* fid, aid, eid, gid are the unique ids for the file, anime, ep, group entries at anidb.
: You can use those to create links to the corresponding pages at anidb.
* anidbfilename is the anidb filename for the file.
: However this name does not contain all the extra information of the filenames on AniDB and might be composed slightly different.
* fcode and acode is integers where each bit corresponds to a data field related to the specified file (se below). The data list received is sorted in the same order as the tables (and fcode before acode). {f|a}code=-1 means retrieve all fields.
* Only the first matching file is returned when aname, gname and epno is used.
'''State:'''
<pre>
bit / int value meaning
1 / 1 FILE_CRCOK: file matched official crc (displayed with green background in anidb)
2 / 2 FILE_CRCERR: file DID NOT match official crc (displayed with red background in anidb)
3 / 4 FILE_ISV2: file is version 2
4 / 8 FILE_ISV3: file is version 3
5 / 16 FILE_ISV4: file is version 4
6 / 32 FILE_ISV5: file is version 5
7 / 64 FILE_UNC: file is uncensored
8 / 128 FILE_CEN: file is censored
examples:
state ==== 9 ==> FILE_CRCOK+FILE_ISV3 ==> file matched official crc and is version 3
state ==== 0 ==> - ==> file was not crc checked and is version 1
state ==== 34 ==> FILE_CRCERR+FILE_ISV5 ==> file DID NOT match official crc and is version 5
state ==== 1 ==> FILE_CRCOK ==> file matched official crc and is version 1
state ==== 8 ==> FILE_ISV3 ==> file was not crc checked and is version 3
</pre>
'''fcode:'''
{| cellpadding="0" align="center"
! width="40"|Bit
! width="80"|Decimal
! width="160"|Data field
! width="50"|-
! width="40"|Bit
! width="120"|Decimal
! width="160"|Data field
|- style="background-color: #eee;"
|0 ||1 || not used || || 16 || 65536 || str dub language
|-
|1 ||2 || int4 aid || || 17 || 131072 || str sub language
|- style="background-color: #eee;"
|2 ||4 || int4 eid || || 18 || 262144 || str quality
|-
|3 ||8 || int4 gid ||  || 19 || 524288 || str source
|- style="background-color: #eee;"
|4 ||16 || int4 lid || || 20 || 1048576 || str audio codec
|-
|5 ||32 || not used || || 21 || 2097152 || int4 audio bitrate
|- style="background-color: #eee;"
|6 ||64 || not used || || 22 || 4194304 || str video codec
|-
|7 ||128 || not used || || 23 || 8388608 || int4 video bitrate
|- style="background-color: #eee;"
|8 ||256 || int2 state || || 24 || 16777216 || str video resolution
|-
|9 ||512 || int8 size || || 25 || 33554432 || str file type (extension)
|- style="background-color: #eee;"
|10 ||1024 || str ed2k || || 26 || 67108864 || int4 length in seconds
|-
|11 ||2048 || str md5 || || 27 || 134217728 || str description
|- style="background-color: #eee;"
|12 ||4096 || str sha1 || || 28 || 268435456 || not used
|-
|13 ||8192 || str crc32 || || 29 || 536870912 || not used
|- style="background-color: #eee;"
|14 ||16384 || not used || || 30 || 1073741824 || str anidb file name
|-
|15 ||32768 || not used || || 31 || -2147483648 || not used
|}
'''acode:'''
{| cellpadding="0" align="center"
! width="40"|Bit
! width="80"|Decimal
! width="160"|Data field
! width="50"|-
! width="40"|Bit
! width="120"|Decimal
! width="160"|Data field
|- style="background-color: #eee;"
|0 ||1 || str group name || || 16 || 65536 || int4 anime total episodes
|-
|1 ||2 || str group short name || || 17 || 131072 || int4 last episode nr (highest, not special)
|- style="background-color: #eee;"
|2 ||4 || not used || || 18 || 262144 || str year
|-
|3 ||8 || not used ||  || 19 || 524288 || str type
|- style="background-color: #eee;"
|4 ||16 || not used || || 20 || 1048576 || str romaji name
|-
|5 ||32 || not used || || 21 || 2097152 || str kanji name
|- style="background-color: #eee;"
|6 ||64 || not used || || 22 || 4194304 || str english name
|-
|7 ||128 || not used || || 23 || 8388608 || str other name
|- style="background-color: #eee;"
|8 ||256 || str epno || || 24 || 16777216 || str short name list
|-
|9 ||512 || str ep name || || 25 || 33554432 || str synonym list
|- style="background-color: #eee;"
|10 ||1024 || str ep romaji name || || 26 || 67108864 || str category list
|-
|11 ||2048 || str ep kanji name || || 27 || 134217728 || str related aid list
|- style="background-color: #eee;"
|12 ||4096 || not used || || 28 || 268435456 || str producer name list
|-
|13 ||8192 || not used || || 29 || 536870912 || str producer id list
|- style="background-color: #eee;"
|14 ||16384 || not used || || 30 || 1073741824 || not used
|-
|15 ||32768 || not used || || 31 || -2147483648 || not used
|}
'''Examples:''' (html escaped code intended)
<pre>
> FILE fid=15201&s=xxxxx
< 220 FILE
15201|74|445|41|1|242772540|a53c401ed95eaa502ba85acde773040c|Ai yori Aoshi - 1 - Relation - [Zhentarim DivX].ogm
> FILE fid=15201&fcode=33554432&acode=1049346
< 220 FILE
15201|ogm|zx|01|Relation|Ai yori Aoshi
> FILE aname=narutaru&gname=triad&amp;amp;aone&epno=2&s=xxxxx
< t001 220 FILE
15459|782|8772|380|1|171298816|2c8a3b53d94d8579b9b81941c549e108|Narutaru - 02 - Catastrophe During the Daytime - [Triad & AonE].avi
</pre>
----


=== GROUP: Retrieve Group Data ===
=== GROUP: Retrieve Group Data ===
MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.