Data from AMSA and MALA?

Is it possible to merge the data from Anime Multi Source Agent, which usually has a more detailed synopsis and the images (banner, background, etc) from the MyAnimeList Agent, which has superb image repositories?

@Dingmatt This question is for you DingMatt.
it was built for that i believe…
i searched https://myanimelist.net/anime/50/Aa_Megami-sama_TV/pics and can’t see backgrounds, am i missing something ?
Is it better than thetvdb.com poster wise? i can see difference in ratios that would make it uneven graphically…

Hi qmarchi,

I’m currently re-coding the AMSA agent from scratch to overhaul and speed up its code, this will give me to opportunity to add additional sources into its portfolio such as MAL (MyAnimeList ), I’ve previously looked into adding MAL but as the information it makes available through its API is pretty limited when compared to TvDB and AniDB I passed on the idea until more pressing changes were finalised; however I’m all for adding to the images selections within Plex so I’ll add it to my goal list for the next version.

@ZeroQI Cheers for the heads up.

@qmarchi i could create yet another source for posters optional depending the ids i can feed to it, and DingMatt could support then but myanimelist is using their own id, not anidbid not tvdbid… Is anything lacking from tvdb+fanarttv + omdb already supported in my agent ?

@ZeroQi If you need access to the MalID you can usually pull it from the AniDB api response, its resource type 2.

@Dingmatt Dang! Ding! You’re good :smiley: You just reminded me I had an old txt i did in july 2015 with the definition, thanks! I put it in my wiki now thanks to you: External XML information (dev) · ZeroQI/Hama.bundle Wiki · GitHub
will add the 3 anime id just in case somebody wants to create more modules. even found back old code with ANN id yes! ann_id = anime.xpath(“resources/resource[@type=‘1’]/externalentity/identifier”)[0].text and ann and myanimelistid are there…
Will articulate the code to do a meta load first like tvdb then modify the meta and name them consistently… Moving forward…

@ZeroQI Well I try… if you want something interesting to think over then consider that Themes.moe also use the MalID.

myanimelist.net/anime/28677
themes.moe/?a=28677

Unfortunately that’s just useful trivia atm as the version of Python that Plex exposes to the meta agents can’t fully use SSL correctly and thus can’t connect to certain sites (including themes.moe).

@Dingmatt added support for MyAnimeList pics. reworked DefaultPrefs.json, and separate the source (anidb tvdb omdb fanarttv tmdb) from type (poster fanart season_poster banner). here is the code:

themes.moe interesting but unuseable in the agent, no api, no link in html page…

def MyAnimeList_posters (metadata, malid):
  MAL_HTTP_API_URL = "http://fribbtastic-api.net/fribbtastic-api/services/anime?id="
  Log.Info("MyAnimeList_posters() - malid: '%s'" % malid)
  if Prefs['GetMyAnimeListImages'] and (Prefs['GetPosters'] or Prefs['GetFanarts'] or Prefs['GetBanners']):
    anime_xml = common.LoadFile(filename=malid+".xml", relativeDirectory="MAL", url=MAL_HTTP_API_URL + malid, cache=CACHE_1HOUR * 24 * 7)  # AniDB title database loaded once every 2 week
    if anime_xml:
      for cover      in (anime_xml.xpath('//anime/covers/cover'          ) if Prefs['GetPosters']):  metadata.posters [cover.text] = Proxy.Media(HTTP.Request(     cover.text).content); break
      for background in (anime_xml.xpath('//anime/backgrounds/background') if Prefs['GetFanarts']):  metadata.art[background.text] = Proxy.Media(HTTP.Request(background.text).content); break
      for banner     in (anime_xml.xpath('//anime/banners/banner'        ) if Prefs['GetBanners']):  metadata.banners[banner.text] = Proxy.Media(HTTP.Request(    banner.text).content); break

@ZeroQI Cheers, I’ll just parse your code for AMSA to save some time. Thanks for the hard work.

As for Themes.moe, I’ll can code a straightforward scraper to act as an api; I’ll alert you if I get it to work (almost bottom of my list atm though).

@Dingmatt Took hours for tiny lines in the end… I forgot, after loading anidbxml do the follwing to have both ids:
annid = anime.xpath("/anime/resources/resource[@type=‘1’]/externalentity/identifier")[0].text; Log.Info(“ann id: ‘%s’” % annid )
malid = anime.xpath("/anime/resources/resource[@type=‘2’]/externalentity/identifier")[0].text; Log.Info(“mal id: ‘%s’” % myalid)

Anime NFO “[@type=‘3’]” use two ids (id, title) to access the page but can’t really see anything of value there, correct em if i am wrong…
Code only we can have access to links to add as extras or download and put in Specials folder…

@Dingmatt I did not know about themes.moe, quite a useful resource. I’m tempted to knock together some code to parse it now (the HTTPS issues excepting).