UDP API problems

Want to help out? Need help accessing the AniDB API? This is the place to ask questions.

Moderator: AniDB

Locked
dinoex
Posts: 35
Joined: Wed Nov 17, 2004 8:28 pm
Contact:

UDP API problems

Post by dinoex »

I can connect via TCP to ANIDB,
but I get no response via UDP.
I trieded "PING" and "AUTH" without any response,
no datagramm, no icmp unreachable.

I might be misreading the spec.
Is the package format diffrent from spec "protover=2" ?

Request:
[COMMAND] + [LF]

Response:
[STRING] + [LF] + [LF]

Via TCP this works,
but my client can't login, as is not registered.
Response:
503 VERSION OUTDATED

UDP example:

myip.9000 > anidb.ath.cx.9000: [udp sum ok] udp 5 (ttl 63, id 1157, len 33, bad cksum 0!)
0x0000 4500 0021 0485 0000 3f11 0000 d906 c8c4 E..!....?.......
0x0010 40ca 69bc 2328 2328 000d c4a1 5049 4e47 @.i.#(#(....PING
0x0020 0a .

Where do I misread the docs,
to access the limited api?
PetriW
AniDB Staff
Posts: 1522
Joined: Sat May 24, 2003 2:34 pm

Post by PetriW »

When you connect via tcp you connect to the closed api. It is not the same as the UDP api.
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

Re: UDP API problems

Post by exp »

dinoex wrote:I can connect via TCP to ANIDB,
but I get no response via UDP.
I trieded "PING" and "AUTH" without any response,
no datagramm, no icmp unreachable.
ok, that was an error on my part. It seems that the UDP API was hung again (and an error in the restart script prevented it from being restarted).
please try again now.

BYe!
EXP
dinoex
Posts: 35
Joined: Wed Nov 17, 2004 8:28 pm
Contact:

Re: UDP API problems

Post by dinoex »

exp wrote: It seems that the UDP API was hung again [...] please try again now.
Thanks, Works as expected now.
My client is now operational.

Mylist-adds are working,
Edits will be tested.

Sources are Available on Request under BSD License.
dinoex
Posts: 35
Joined: Wed Nov 17, 2004 8:28 pm
Contact:

MYLISTADD and viewed=1

Post by dinoex »

from spec ver 2:

NOTE: currently this command will replace all mylist fields this commands supports, even if they were not specified by the client. I.e. an update with "MYLISTADD lid={int4 lid}&edit=1&viewed=1" will reset the state,source,storage and other fields to their default values.

I found out that if you send "viewed=1"
the returned viewdate will be updated to the current date.

Is there a way that the sate of a file can be modifed
without touching the viewed state?
dinoex
Posts: 35
Joined: Wed Nov 17, 2004 8:28 pm
Contact:

internal server error

Post by dinoex »

300 entries are working as expeced,
but I have trouble with this single one:


add: e2dk.anidb:ed2k://|file|Tenchi_Muyo!_Ryo-Ohki_OVA_Ep_02_[4CBCCC4D].avi
AUTH

SEND:
user=dinoex&pass=x&protover=2&client=aniupdate&clientver=1&tag=dinoex

RECV:
dinoex 200 6Fsp3 LOGIN ACCEPTED

SEND:
FILE s=6Fsp3&size=266829824&ed2k=e79a1dae317a3ab71f2b93af78e2dd53&tag=dinoex

RECV
dinoex 600 INTERNAL SERVER ERROR

SEND
LOGOUT s=6Fsp3&tag=dinoex

RECV
dinoex 203 LOGGED OUT


Please check if you find time
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

Re: internal server error

Post by exp »

dinoex wrote:SEND:
FILE s=6Fsp3&size=266829824&ed2k=e79a1dae317a3ab71f2b93af78e2dd53&tag=dinoex

RECV
dinoex 600 INTERNAL SERVER ERROR
that is caused by non-ascii characters somewhere in the description of that file or ep/anime name.
it's not that easy to fix but it's ontodo.

BYe!
EXP
Rar
AniDB Staff
Posts: 1471
Joined: Fri Mar 12, 2004 2:41 pm
Location: UK
Contact:

Post by Rar »

<rar> !file ed2k://|file|name|266829824|e79a1dae317a3ab71f2b93af78e2dd53|
<Chii[AR]> FILE: Tenchi Muyo! Ryo-Ohki 3 - 2 - Fiancée, by Anime-Kraze (gid: 85), 266.829.824 bytes (fid: 35155), ed2k://|file|Tenchi_Muyo!_Ryo-Ohki_3_-_2_-_Fiancée_-_[Ani-Kraze](4cbccc4d)[AniDB].avi|266829824|e79a1dae317a3ab71f2b93af78e2dd53|, http://anidb.ath.cx/f35155 , FILE STATUS: NOT IN LIST

Reads as Fianc馥 when I'm in jis.

Rar
Locked