LetrixZ/animethemes-api

Link to audio file is too complicated.

Closed this issue · 3 comments

The API currently returns all data about an anime, and it's video mirrors, however you have to download audio by requesting a link again, instead of getting it by default.

Currently I have to make 2 download functions, one for audio and one for video. This makes it overcomplicated.

I suggest instead of having mirrors lead to a video, it should return an audio alternative too.

Actually, for getting the media (video or audio) you need to request:
api/v1/anime/[id]/[theme]/[quality or mirror]/[video/audio]
Could you give me an example of what do you want?
EDIT: do you mean that in the anime details it should have alongside the mirror object a url that leads directly to audio as it does to the video file?

{ "malId": 40060, "title": [ "BNA", "Brand New Animal" ], "cover": "https://cdn.myanimelist.net/images/anime/1139/106986.jpg", "season": "Spring 2020", "year": 2020, "themes": [ { "title": "Ready to", "type": "OP V1", "mal_id": 40060, "theme_id": "40060-00", "notes": "", "views": 4, "mirrors": [ { "quality": "default", "mirrorUrl": "https://animethemes.moe/video/BrandNewAnimal-OP1.webm", "audioUrl": "https://animethemes-api.herokuapp.com/api/v1/anime/40060/0/0/audio", "appUrl": "40060/0/0" } ], "artist": null }, { "title": "Ready to", "type": "OP V2", "mal_id": 40060, "theme_id": "40060-01", "notes": "", "views": 0, "mirrors": [ { "quality": "default", "mirrorUrl": "https://animethemes.moe/video/BrandNewAnimal-OP1v2.webm", "audioUrl": "https://animethemes-api.herokuapp.com/api/v1/anime/40060/1/0/audio", "appUrl": "40060/1/0" } ], "artist": null },... ] }

Yes, having the audio link alongside the video link will simplify a few things and makes it so that there is no need to call for the API again.

Done.