View Issue Details

IDProjectCategoryView StatusLast Update
0001750AniDB UDP APIFeature Requestpublic2010-01-18 01:12
Reporterbiggrospif Assigned ToOmmina  
PrioritynormalSeverityfeatureReproducibilityN/A
Status assignedResolutionopen 
Summary0001750: Episode title and anime title from udp api
DescriptionThis page (http://anidb.net/perl-bin/animedb.pl?show=addeptitle&eid=88794) show the episode title of an episode for different language.
In the udp api definition help, we can access the japanese, romanji and english name of the episode with the anime and file command, but we cannot access others language. This is also true for anime titles.

I asked in a forum post and learned that this feature doesn't exist yet, so I am making a feature request.

Example of a situation where this feature will be used : I downloaded some French fansub and added it to mylist. The files were already added to anidb.
When I wanted to rename them like I always do, the episode names were in English. I watch most of the time English fansub so there is no problem, but having a French fansub with English episode title looks weird. When this feature will be completed, I will modify my udp client the support it, add french title and rename in french.

***** Please read the programmer section first, I explain why I choosed a certain way instead of another.
If you disagree my way of programming this on certain points, all the command syntax could change.
I do not know much of anidb background, if the chief architect/programmer think I am wrong, they are probably right.
I am in no position to impose something, I just give "suggestion" on how to do it.


I checked a how the udp api definition generally work so here is a summary of how could it be done :

We add a new function name "EPTITLE"

EPTITLE : retrive title of an episode
Command String:

by eid
EPTITLE eid={int4 eid}&lang={3 char},{3 char},{3 char},{3 char}.......{3 char}
EPTITLE eid=10604&lang=fra,eng,est,fij


by anime and episode number
EPTITLE aname={str anime name}&epno={int4 episode number}&lang={3 char},{3 char},{3 char},{3 char}.......{3 char}
EPTITLE aid={int4 anime id}&epno={int4 episode number}&lang={3 char},{3 char},{3 char},{3 char}.......{3 char}

{3 char} is a 3 caracter long string.

Possible Replies:

xxx EPTITLE {3 char}=title|{3 char}=title2|{3 char}=title3......{3 char}=titlex

XXX EPTITLE fra=La tour au-delĂ  des nuages|eng=The Place Promised in Our Early Days|est=Pilvede taga


xxx EPTITLE NOT FOUND
if there is no title available for all the language code requested, ie, 0/5, or 0/1, return this reply.

TITLE eid=10604&lang=asm
xxx EPTITLE NOT FOUND


****** EXCEPTION ***************************************
If there is at least 1 title available, return the available title only with the previous command.
EPTITLE eid=10604&lang=est,fij
EPTITLE est=Pilvede taga
 
if one of the title is not available from the database, the command does not return the language code, as with the example with the fij language code.
By not repeating unavailable language, this will reduce server upload.


598 UNKNOWN COMMAND or ___something similar___ when the user do not call correctly the command

EPTITLE eid=10604&lang=english, french,
598 UNKNOWN COMMAND
EPTITLE eid=10604&lang=eng,fra,
                ^^^^ the last ,
any other cases not mentioned here with incorrect syntax


Info:
when sending and receiving, the language code are lower case
the language code are from the ISO 639-2 code (http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes


Programmer specific :

I choose to use the ISO 639 code list instead of hardcoding a list of language in a bit array, this will use more bandwidth but will also be
easier to understand and more flexible; you don't need to modify the bit array when adding new language. You don't need to program all the language,
just choose a list of common language and link them to your bd field. If one of the requested language is not supported in your database,
return TITLE NOT FOUND or do not return the language code in the list of title

If you want to save more bandwidth and/or you do not support many language, you could use the ISO 639-1 code instead (http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
This list contains less language and use 2 character unique language code.

the programmer will need to check if a generic return code could be used or a new return code need to be created for each different reply of this command.

I choose to use the episode id a the primary key for the title search. If this does not reflect your database or would take too much cpu time when linking the data, in the EPISODE AND FILE (and maybe others, don't know all) command, return the title id (tid, primary key of the title database table) and then use this tid when calling the EPTITLE command
EPTITLE {tid}&lang={3 char}...&lang={3 char}

To rename a file, this command will most of time be called with just one language code. I decided to permit more that one language code per request to adapt for an application requesting information to display only or something similar :
Showing 2-3 title on the tv media center with other episode related information;
in webaom, when clicking on a file, displaying the user favorite language episode title and other episode related information.

NOT sure :
Is it hard to return the title code with their title in the same order as the request language code ?
if all the title are returned, it would be easier for an application using the udp api to parse title,
but if some of the title are not returned, this would be completly useless and only burn more the cpu. I don't know if it's useful or not.


ATITLE
An anime can also have many title other that romanji, english and japanese.
Make a command similar to the EPTITLE for anime title named ATITLE

This command ___NEED___ to be similar to the episode title and vice versa for the sake of simplicity. If you use 639-2 in the episode title,
don't use a bit language array in this command.
Similar calling syntax, similar response syntax, similar error response (maybe with different error number)
Additional InformationForum post : http://anidb.net/perl-bin/animedb.pl?show=cmt&id=25938
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2010-01-18 01:12 biggrospif New Issue
2010-01-18 01:12 biggrospif Status new => assigned
2010-01-18 01:12 biggrospif Assigned To => Ommina