ZeroQI / Hama.bundle

Plex HTTP Anidb Metadata Agent (HAMA)
GNU General Public License v3.0
1.21k stars 113 forks source link

Consistently Source Director/Writer Metadata for Series #102

Closed KingJ closed 6 years ago

KingJ commented 7 years ago

Currently, depending on if a series has been matched in standard mode or multi-episode mode (i.e. tvdb2/3/4 mode), different sources of metadata will be used for each episode's Director and Writer. In standard mode, it will be sourced from AniDB and in multi-episode mode it will be sourced from the TVDB.

We should be consistent in which source is used. Each site has a different approach for storing the metadata - AniDB stores it per-show and TVDB stores it per-episode. If AniDB is used as the metadata source, this means that if a show has different Directors or Writers for certain episodes, all episodes will have all potential Directors and Writers listed - when really only the Director or Writer who did that episode should be added.

As TVDB separates the data down to a per-episode level, i'd prefer to update the standard mode code to source the Director/Writer metadata from TVDB instead of AniDB as is currently done.

Any thoughts on the 'right' approach here?

ZeroQI commented 7 years ago

Due to complication in separating the anidb and tvdb code in their respective module files, by the need to manage the failover of one meta source to the other in the absence of content, i have the regret to announce that i will have to download each meta source in a meta structure copied on plex metadata one.

Since that will be done i will devise a way to both give a choice per meta to pick the source and if none specified will not update that setting, and only update if different so all meta will be shown consistently in the same part of the log as well. That should free possibly some of the prefs variables.

For memory performance and code lisibility i have choosen namedTuples with default value not to have to specify every field name

@Dingmatt you have reached the 'Great Seer Level'. Wipe that grin of you face now :D To further the discussion I haven't tested yet but here is the gist. Please tell me you honest opinion but if positive you can yank the compliments :) Trying to sort the rest of the magic function then test if works. DingBatt, do you think it's inspired?

Having the below accurate would spare me buckets of time but don't have the courage right now: https://github.com/ZeroQI/Hama.bundle/wiki/Plex-Metadata-Fields-Available

init.py

MetaSources = {'AniDB':     AniDB_meta, 'MyAnimeList': MyAnimeList_meta, 'FanartTV': FanartTV_meta, 'OMDb':       OMDb_meta, 
                 'TheTVDB': TheTVDB_meta, 'TheMovieDB':   TheMovieDB_meta, 'Plex':         Plex_meta  # all meta sources in a dict of namedTuples
                }
  Plex.UpdateMeta(MetaSources, movie)

common.py

from collections import namedtuple, Mapping
Movie            = namedTupleDefaults('source', 'title summary originally_available_at rating absolute_index year content_rating_age trivia quotes original_title tagline art posters themes')
Serie            = namedTupleDefaults('source', 'title summary originally_available_at rating studio countries duration genres tags collections art posters banners themes content_rating')
Season           = namedTupleDefaults('number', 'summary posters banners') 
Episode          = namedTupleDefaults('number', 'title summary originally_available_at rating absolute_index thumbs writers directors producers')
def namedTupleDefaults(typename, field_names, default_values=()):
    T = collections.namedtuple(typename, field_names)
    T.__new__.__defaults__ = (None,) * len(T._fields)
    T.__new__.__defaults__ = tuple( T(**default_values) if isinstance(default_values, collections.Mapping) else T(*default_values) )
    return T

Plex.py

from operator import attrgetter
MoviePriority    = Movie  ( title                   = (),
                            original_title          = (),
                            summary                 = (),
                            rating                  = (),
                            originally_available_at = (),
                            art                     = (),
                            posters                 = (),
                            themes                  = (),
                            genres                  = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            tags                    = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            collections             = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            year                    = (),
                            content_rating          = (),
                            trivia                  = (),
                            quotes                  = (),
                            tagline                 = ('TheMovieDB')
                          )
SeriePriority    = Serie  ( title                   = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'), 
                            summary                 = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            rating                  = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            originally_available_at = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            art                     = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV'),
                            posters                 = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            themes                  = ('Plex'),
                            banners                 = ('TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV'),
                            content_rating          = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            studio                  = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            duration                = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            genres                  = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            tags                    = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            collections             = ('AniDB', 'TheTVDB', 'MyAnimeList' 'TheMovieDB', 'FanartTV', 'OMDb'),
                            countries               = (),
                            #season                  = ()
                          )
Season_Priority  = Season ( summary                 = ('TheTVDB'),
                            #episode                 = ('TheTVDB'),
                            poster                  = ('TheTVDB'),
                            banner                  = ()
                          )
Episode_Priority = Episode( number                  = "priority",
                            absolute_index          = (),
                            title                   = ('AniDB', 'TheTVDB'),
                            summary                 = ('TheTVDB'),
                            originally_available_at = (),
                            rating                  = (),
                            writers                 = (),
                            directors               = (),
                            producers               = ()
                          )
def UpdateMeta(metadata, MetaSources, MetaSourceSeasons={}, MetaSourceEpisodes={})
  for metadata_field in SeriePriority._fields:  # Loop through namedTuple() "SeriePriority" (metadata) field names ("title", "summary", ...)
    for metadata_source in getattr(SeriePriority, metadata_field):  # Loop through the metadata source (ordered immutable) tuple ("AniDB", "TheTVDB", ...)
      if metadata_source in MetaSources and hasattr(MetaSources[metadata_source], metadata_field):
        selected_metadata_value = getattr( MetaSources[metadata_source], metadata_field)
        if selected_metadata_value:
          original_metadata_value = getattr( metadata                    , metadata_field)
          if selected_metadata_value == original_metadata_value:  Log.Info("Metadata field: '%s', Value: '%s'*" % (metadata_field, selected_metadata_value))
          else:
            Log.Info("Metadata field: '%s', Value: '%s', type: '%s', metadata.%s: '%s' " % (metadata_field, str(selected_metadata_value), type(selected_metadata_value), metadata_field, str(original_metadata_value)))
            if isinstance(selected_metadata_value, string):  setattr(metadata, metadata_field, selected_metadata_value)
            elif metadata_field in ('genres', 'collections', 'tags', 'roles'):  # selected_metadata_value is a tuple or list, can we copy whole list/tuple in one go???
              original_metadata_value.clear()
              for item in selected_metadata_value:  # list of string or for 'roles' a list or tuple of tuples (('name', 'character', 'actor photo url'),...)
                if metadata_field == 'roles':
                  role                             = original_metadata_value.new()
                  role.name, role.role, role.photo = item  # tuple ('name', 'character', 'actor photo url')
                else:  original_metadata_value.add(item.strip())
            elif metadata_field in ('seasons', 'episodes'):
              for item in selected_metadata_value:  UpdateMeta(original_metadata_value[item], MetaSourceSeasons, MetaSourceEpisodes)
              return  #no need for now, keeping in comment in case:  f = operator.attrgetter("b.c", "b.d") #c, d = f(a)
          break  # No more metadata_source to try for that metadata_field
        else:  continue
      else:  Log.Info("Mispelt metadata source: '%s' in metadata field: '%s'" % (metadata_source, metadata_field))
    # Enf of for metadata_source in getattr(SeriePriority, metadata_field):
  # End of for metadata_field in SeriePriority._fields:

any attribute starting with _ or __ gives an error... Might have to use a dict instead

Dingmatt commented 7 years ago

@ZeroQI It looks like your coming to the same conclusions I hit when initially starting the AMSA fork, I'm also trying to figure out how to offer the various metadata choices to the user without making the agents setting a never ending list however the solution eludes me so far.

I was contemplating making the various sources they're own agent with the order you use them in Plex (on the agent page) dictating their priority but that isn't granular enough; it'd be a global order rather than an order per data field.

On a separate note I've just updated the new AMSA AniDB integration to populate a few extra fields (like tags and countries) so help yourself to the code if anythings of use.

ZeroQI commented 7 years ago

@Dingmatt Great spirits thinks alike (or in french "les grands esprits se rencontrent" I thought the matrix above allows:

Do you have a better proposal for the selection? Was thinking a text box in Prefs per metadata field but that is a lot

Will build fake tree with couple info and display without adding with update meta function to test it works

Working on code output:

def Logging():
  import logging
  for handler in logging.getLogger('com.plexapp.agents.hama').handlers:  handler.setFormatter(logging.Formatter('%(asctime)-15s (%(thread)x/%(module)-15s/%(funcName)-18s/%(lineno)4d) %(levelname)-6s %(message)s'))
2017-02-06 16:29:50,854 (-8f2b900/__init__       /Start            /  37) INFO   =============================================================================================================================================================
2017-02-06 16:29:50,855 (-8f2b900/__init__       /Start            /  38) INFO   HTTP Anidb Metadata Agent (HAMA)v By ZeroQI (Forked from Atomicstrawberry's v0.4 - AniDB, TVDB mod agent using SdudLee XML's ###
2017-02-06 16:29:50,855 (-8f2b900/__init__       /Start            /  39) INFO   =============================================================================================================================================================
2017-02-06 16:29:50,858 (-8f2b900/common         /LoadFile         /  72) DEBUG  LoadFile() - CacheTime: 'Sat Jan 28 11:39:06 2017', Limit: 'Mon Jan 23 16:29:50 2017', url: 'http://anidb.net/api/anime-titles.xml.gz', Filename: 'anime-titles.xml.gz' loaded from cache
2017-02-06 16:29:51,277 (-8f2b900/common         /LoadFile         /  72) DEBUG  LoadFile() - CacheTime: 'Sat Jan 28 14:02:55 2017', Limit: 'Mon Jan 23 16:29:51 2017', url: 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-movieset-list.xml', Filename: 'anime-movieset-list.xml' loaded from cache
2017-02-06 16:29:51,289 (-8f2b900/common         /LoadFile         /  72) DEBUG  LoadFile() - CacheTime: 'Sat Jan 28 14:02:54 2017', Limit: 'Mon Jan 23 16:29:51 2017', url: 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list-master.xml', Filename: 'anime-list-master.xml' loaded from cache
2017-02-06 16:29:51,457 (-8f2b900/common         /LoadFile         /  72) DEBUG  LoadFile() - CacheTime: 'Sun Feb  5 17:56:55 2017', Limit: 'Sat Feb  4 16:29:51 2017', url: 'https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/master/anime-list-corrections.xml', Filename: 'anime-list-corrections.xml' loaded from cache
2017-02-06 16:29:51,458 (-8f2b900/AnimeLists     /MergeAniDBTVDBMaps/  16) INFO   MergeAniDBTVDBMaps() - Adding/Modifying AniDBids: '['10091', '3395', '9900', '11747', '10008', '10009', '10804', '11123', '4597', '10833', '9042', '9227', '10027', '11637', '8655', '5842']'
2017-02-06 16:29:51,494 (-8f2b900/__init__       /Start            /  48) INFO   =============================================================================================================================================================
2017-02-06 16:29:51,559 (-8f2b900/core           /start            / 611) INFO   Started plug-in
2017-02-06 16:29:51,614 (-8f2b900/socketinterface/listen           / 160) DEBUG  Starting socket server
2017-02-06 16:29:51,615 (-8f2b900/runtime        /create_thread    /1117) DEBUG  Created a thread named 'start'
2017-02-06 16:29:51,616 (-8f2b900/socketinterface/listen           / 184) INFO   Socket server started on port 38807
2017-02-06 16:29:51,616 (-8f2b900/pipeinterface  /listen           /  25) INFO   Entering run loop
2017-02-06 16:29:51,617 (-8f2b900/runtime        /handle_request   / 717) DEBUG  Handling request GET /:/prefixes
2017-02-06 16:29:51,621 (-8f2b900/runtime        /handle_request   / 814) DEBUG  Found route matching /:/prefixes
2017-02-06 16:29:51,623 (-8f2b900/runtime        /handle_request   / 924) DEBUG  Response: [200] MediaContainer, 148 bytes
ZeroQI commented 7 years ago

SyntaxError: Line 92: "fields" is an invalid attribute name because it starts with "". Cannot use nametuples sicne i can't use property _fields to loop through...

Have to code with dict which is less good performance wise but simpler Good thing the code hardly need any change

Edit: without recursivity for eps/seasons, the meta from dict works. building meta to test more now

KingJ commented 7 years ago

@ZeroQI is the code in the ZeroQI-major-rewrite branch the latest? I have a bit more time now so i'm looking to actually help out with testing.

I don't think there's a nice easy solution for metadata source ordering. @Dingmatt 's multiple agent idea is nice and user-friendly for organising the order but not having the ability to change the order for individual data items is definitely a problem. Having it all in the agent prefs is probably the only way to do it even if it does make the preferences screen pretty large. With good defaults most people probably wouldn't need to change it, and anyone who does will probably be fine going through all the options 😄 .

ZeroQI commented 7 years ago

Code splitting was done in modules, still some bugs... Am now loading in dictionaries the meta from each source now, so no testing yet i am afraid as too much will change

Note: https://github.com/plexinc-agents/TheMovieDB.bundle/blob/master/Contents/Code/__init__.py

TheMovieDB uses this approach to update meta but movies only (all into a tree then process it)...

Instead of processing meta keys, will process my priority tree, one field in the source order specified at a time... Once works, i add the episodes part. Will then add on each meta checks to respect the priority tree if no meta source listed but that is after all works

ZeroQI commented 7 years ago

@KingJ Did they removed producers, writers, directors to put them at ep level? I know they put it at ep level but was under the impression they left it a root... The meta writing function from list of dicts with priority works for series (list, roles, date, float, strings) but no season or ep meta yet but looking good. Not ready for prod testing but can update the Pull request if you want a look at the code

Edit: logs teaser from the Metadata writing function

2017-02-08 18:05:07,850 (-bfee4c0/common         /UpdateMeta        / 265) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-08 18:05:07,850 (-bfee4c0/common         /UpdateMeta        / 266) INFO     Plex.UpdateMeta() - Metadata Sources with fields
2017-02-08 18:05:07,851 (-bfee4c0/common         /UpdateMeta        / 267) INFO     - FanartTV             ( 0) []
2017-02-08 18:05:07,851 (-bfee4c0/common         /UpdateMeta        / 267) INFO     - OMDb                 ( 0) []
2017-02-08 18:05:07,852 (-bfee4c0/common         /UpdateMeta        / 267) INFO     - AniDB                ( 7) [rating                  | genres                  | roles                   | originally_available_at  | title                   | summary                 | posters                ]
2017-02-08 18:05:07,852 (-bfee4c0/common         /UpdateMeta        / 267) INFO     - Plex                 ( 0) []
2017-02-08 18:05:07,852 (-bfee4c0/common         /UpdateMeta        / 267) INFO     - MyAnimeList          ( 0) []
2017-02-08 18:05:07,853 (-bfee4c0/common         /UpdateMeta        / 267) INFO     - TheMovieDB           ( 0) []
2017-02-08 18:05:07,853 (-bfee4c0/common         /UpdateMeta        / 267) INFO     - TheTVDB              (26) [s1e8                    | s1e3                    | s1e2                    | s1e1                    | s1e7                    | s1e6                    | s1e5                    | title                   | s0e6                    | s0e7                    | s0e4                    | s0e5                    | s0e2                    | s0e3                    | s0e1                    | s1e4                    | s1e12                   | s1e11                   | s1e10                   | genres                  | ContentRating           | studio                  | originally_available_at  | content_rating          | summary                 | s1e9                   ]
2017-02-08 18:05:07,854 (-bfee4c0/common         /UpdateMeta        / 268) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-08 18:05:07,854 (-bfee4c0/common         /UpdateMeta        / 269) INFO     Plex.UpdateMeta() - Metadata Fields
2017-02-08 18:05:07,854 (-bfee4c0/common         /UpdateMeta        / 280) INFO     [ ] Metadata Field: rating                   Format: <type 'float'>          Source: AniDB        Value: '4.58'
2017-02-08 18:05:07,855 (-bfee4c0/common         /UpdateMeta        / 302) INFO     [X] Metadata Field: genres                   Format: <type 'list'>           Source: AniDB        Value: '['Small breasts', 'Magical girl', 'Present', 'Fantasy world', 'Earth', 'Absurdist humour', 'Slapstick', 'Parody', 'Japan', 'Urination', 'Large breasts', 'Nudity', 'Shoujo ai', 'Plot continuity', 'Pantsu', 'Asia', 'Parallel universe', 'Science fiction', 'Comedy', 'Ecchi', 'Romance', 'Harem']'
2017-02-08 18:05:07,857 (-bfee4c0/common         /UpdateMeta        / 302) INFO     [X] Metadata Field: content_rating           Format: <type 'float'>          Source: TheTVDB      Value: '5.7'
2017-02-08 18:05:07,858 (-bfee4c0/common         /UpdateMeta        / 302) INFO     [X] Metadata Field: roles                    Format: <type 'list'>           Source: AniDB        Value: '[{'photo': 'http://img7.anidb.net/pics/anime/17296.jpg', 'role': 'Plug Cryostat', 'name': 'Fukuhara Kaori'}, {'photo': 'http://img7.anidb.net/pics/anime/17475.jpg', 'role': 'Arrester Blanket', 'name': 'Takagaki Ayahi'}, {'photo': 'http://img7.anidb.net/pics/anime/23381.jpg', 'role': 'Oumi Hakone', 'name': 'Miyazaki Ui'}, {'photo': 'http://img7.anidb.net/pics/anime/148709.jpg', 'role': 'Tomonaga Iono', 'name': 'Yahagi Sayuri'}, {'photo': 'http://img7.anidb.net/pics/anime/19811.jpg', 'role': 'Oumi Sento', 'name': 'Takahashi Hiroki'}, {'photo': 'http://img7.anidb.net/pics/anime/177060.jpg', 'role': 'Rona Elmo', 'name': 'Hirano Aya'}, {'photo': 'http://img7.anidb.net/pics/anime/24704.jpg', 'role': 'Pulse Trans', 'name': 'Tomizawa Michie'}, {'photo': 'http://img7.anidb.net/pics/anime/151677.jpg', 'role': 'Kuran Shant', 'name': 'Shimizu Ai'}, {'photo': 'http://img7.anidb.net/pics/anime/184301.jpg', 'role': 'Reika Galvini', 'name': 'Kawasumi Ayako'}, {'photo': 'http://img7.anidb.net/pics/anime/21776.jpg', 'role': 'Rinko', 'name': 'Gibu Yuuko'}, {'photo': 'http://img7.anidb.net/pics/anime/28754.jpg', 'role': 'Sokko', 'name': 'Kinoshita Sayaka'}, {'photo': 'http://img7.anidb.net/pics/anime/45925.jpg', 'role': 'Taako', 'name': 'Shindou Kei'}, {'photo': 'http://img7.anidb.net/pics/anime/151657.jpg', 'role': 'Maako', 'name': 'Ishikawa Ayano'}, {'photo': 'http://img7.anidb.net/pics/anime/170553.jpg', 'role': 'Chiiko', 'name': 'Kaneda Tomoko'}, {'photo': 'http://img7.anidb.net/pics/anime/58661.jpg', 'role': 'Tenchou', 'name': 'Mitsuishi Kotono'}]'
2017-02-08 18:05:07,862 (-bfee4c0/common         /UpdateMeta        / 280) INFO     [ ] Metadata Field: originally_available_at  Format: <type 'datetime.date'>  Source: AniDB        Value: '2009-06-25'
2017-02-08 18:05:07,863 (-bfee4c0/common         /UpdateMeta        / 280) INFO     [ ] Metadata Field: summary                  Format: <type 'unicode'>        Source: AniDB        Value: '* Based on a seinen manga by Ditama Bow, serialised in Comic..'
2017-02-08 18:05:07,863 (-bfee4c0/common         /UpdateMeta        / 302) INFO     [X] Metadata Field: studio                   Format: <type 'str'>            Source: TheTVDB      Value: 'Tokyo MX'
2017-02-08 18:05:07,864 (-bfee4c0/common         /UpdateMeta        / 302) INFO     [X] Metadata Field: posters                  Format: <type 'tuple'>          Source: AniDB        Value: '(<Framework.modelling.attributes.ProxyContainerObject object at 0xf35275cc>, 'http://img7.anidb.net/pics/anime/22451.jpg', 99, 'AniDB/22451.jpg')'
2017-02-08 18:05:07,864 (-bfee4c0/common         /UpdateMeta        / 280) INFO     [ ] Metadata Field: title                    Format: <type 'str'>            Source: AniDB        Value: 'Fight Ippatsu! Juuden-chan!!'
2017-02-08 18:05:07,865 (-bfee4c0/common         /UpdateMeta        / 306) INFO     =============================================================================================================================================================
ZeroQI commented 7 years ago

Engine to write stuff works with series, show meta for seasons, episodes but doesn't write yet for them Logs infinitely more readable, display a list of all fields for series, season, episodes, which are updated or already match with hte database choosen, or not filled by any database Uploaded current base, moving forward at last... It is slow starting and have to launch twice the manual search for it to work, would like to know why but lack some knowledge there...

ZeroQI commented 7 years ago

In https://github.com/ZeroQI/Hama.bundle/releases/tag/v1.0 i uploaded Hama.bundle.BETA.7z

This is the current state of the new agent. Please review it if you wish.

some ep fields don't update due to current bug, but logs look really fancy. There is some preliminary code for Trailers but stumped due to youtube issue... There is some preliminary Simkl support, but don't enable it yet in agent settings, will add sync functionality Should get more Metadata and priority are set in commons module... init.py should be hightly readable... Please any comments to make it shorter or clearer appreciated... Edit:

sven-7 commented 7 years ago

Is the fix from #112 in this?

I still had trouble matching.

017-02-21 14:46:10,744 (ef4/networking     /load              / 166) DEBUG    Requesting 'http://127.0.0.1:32400/library/metadata/75351/tree'
2017-02-21 14:46:10,760 (ef4/logkit         /Info              /  16) INFO     === Search Begin ============================================================================================================
2017-02-21 14:46:10,760 (ef4/logkit         /Info              /  16) INFO     --- AniDB.Search() - Begin --------------------------------------------------------------------------------------------------
2017-02-21 14:46:10,760 (ef4/logkit         /Info              /  16) INFO     Title: 'Sacred Seven', name: 'None', filename: 'Z%3A%5CAnime%20Series%5CSacred%20Seven%5CSacred%20Seven%20-%2012%20-%20Sacred%20Seven%2Emkv', manual: 'False', year: 'None'
2017-02-21 14:46:10,848 (ef4/logkit         /Info              /  16) INFO     cleanse_title: 'giỏ trái cây' <type 'str'>, new_func_title: 'giỏ trái cây' <type 'str'>, title: 'Giỏ Trái Cây' <type 'unicode'>
2017-02-21 14:46:10,887 (ef4/logkit         /Info              /  16) INFO     cleanse_title: 'ওয়ান পিস্' <type 'str'>, new_func_title: 'ওয়ান পিস্' <type 'str'>, title: 'ওয়ান পিস্' <type 'unicode'>
2017-02-21 14:46:11,484 (ef4/logkit         /Info              /  16) INFO     cleanse_title: 'cậu bé bút chì' <type 'str'>, new_func_title: 'cậu bé bút chì' <type 'str'>, title: 'Cậu bé bút chì' <type 'unicode'>
2017-02-21 14:46:13,267 (ef4/logkit         /Info              /  16) INFO     cleanse_title: 'קיבַּה' <type 'str'>, new_func_title: 'קיבַּה' <type 'str'>, title: 'קיבַּה' <type 'unicode'>
2017-02-21 14:46:14,565 (ef4/logkit         /Info              /  16) INFO     AniDB - score: '100', id: '  8205', title: 'Sacred Seven' 
2017-02-21 14:46:14,739 (ef4/logkit         /Info              /  16) INFO     AniDB - score: ' 35', id: '  8760', title: 'Sacred Seven' 
2017-02-21 14:46:15,561 (ef4/logkit         /Info              /  16) INFO     cleanse_title: 'モルモランド' <type 'str'>, new_func_title: 'モルモランド' <type 'str'>, title: 'モルモランド' <type 'unicode'>
2017-02-21 14:46:15,766 (ef4/logkit         /Info              /  16) INFO     cleanse_title: 'シックス ハート プリンセス' <type 'str'>, new_func_title: 'シックス ハート プリンセス' <type 'str'>, title: 'シックス ハート プリンセス' <type 'unicode'>
2017-02-21 14:46:15,796 (ef4/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-21 14:46:15,806 (ef4/runtime        /return_state_data /  88) DEBUG    Sending packed state data (104 bytes)
2017-02-21 14:46:15,806 (ef4/runtime        /handle_request    / 924) DEBUG    Response: [200] str, 1016 bytes
2017-02-21 14:46:15,880 (17c4/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo3NTM1MXM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQ0CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vYW5pZGItODIwNT9sYW5nPWVuczQKZ3VpZHMxMAphbmlkYi04MjA1czIKaWRyMAo_
2017-02-21 14:46:15,881 (17c4/runtime        /handle_request    / 814) DEBUG    Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo3NTM1MXM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQ0CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vYW5pZGItODIwNT9sYW5nPWVuczQKZ3VpZHMxMAphbmlkYi04MjA1czIKaWRyMAo_
2017-02-21 14:46:15,881 (17c4/model          /__getitem__       /  32) DEBUG    Loading model with GUID com.plexapp.agents.hama://anidb-8205?lang=en
2017-02-21 14:46:15,884 (17c4/model          /_deserialize      / 234) DEBUG    Deserializing from C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\f\3f6355f9711435540e4844b3167d30c4633901a.bundle\Contents\com.plexapp.agents.hama\Info.xml
2017-02-21 14:46:15,914 (17c4/networking     /load              / 166) DEBUG    Requesting 'http://127.0.0.1:32400/library/metadata/75351/tree'
2017-02-21 14:46:15,926 (17c4/logkit         /Info              /  16) INFO     === Update Begin ============================================================================================================Windows  i386
2017-02-21 14:46:15,927 (17c4/logkit         /Info              /  16) INFO     Update() - metadata.id: 'anidb-8205', Title: 'None', lang: 'en', force: 'True', movie: 'False', max(media.seasons.keys()): 'False'
2017-02-21 14:46:15,927 (17c4/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-21 14:46:15,927 (17c4/logkit         /Info              /  16) INFO     AnimeLists.GetMetadata() - Local custom mapping - No file detected
2017-02-21 14:46:16,051 (17c4/logkit         /Info              /  16) INFO     AnimeLists.GetMetadata() - anidb: '8205', tvbdid: '249939', tmdbid: '', imbdid: '', defaulttvdbseason: '1', name: 'Sacred Seven'
2017-02-21 14:46:16,055 (17c4/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-21 14:46:16,055 (17c4/logkit         /Info              /  16) INFO     AniDB.GetMetadata() - AniDB Serie XML: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8205', file: 'AniDB/8205.xml
2017-02-21 14:46:16,055 (17c4/logkit         /Debug             /  13) DEBUG    common.LoadFile() - CacheTime: 'Tue Feb 21 13:38:22 2017', Limit: 'Tue Feb 14 14:46:16 2017', url: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8205', Filename: 'AniDB\8205.xml' loaded from cache
2017-02-21 14:46:16,062 (17c4/core           /log_exception     / 574) CRITICAL Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://anidb-8205?lang=en' (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 89, in update
    def update (self, metadata, media, lang, force ):  Update (metadata, media, lang, force,  False)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 66, in Update
    if AniDBid.isdigit():                ANNid, MALid, AniDB_dict =      AniDB.GetMetadata(metadata, media, movie, error_log, AniDBMovieSets, AniDBid, TVDBid, mappingList)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\AniDB.py", line 293, in GetMetadata
    if not  season    in AniDB_dict['seasons']:                      AniDB_dict['seasons'][season]                      = {}
TypeError: int() argument must be a string or a number, not 'NoneType'

2017-02-21 14:46:16,131 (17c4/model          /_serialize        / 229) DEBUG    Serializing to C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\f\3f6355f9711435540e4844b3167d30c4633901a.bundle\Contents\com.plexapp.agents.hama\Info.xml
2017-02-21 14:46:16,134 (17c4/runtime        /return_state_data /  88) DEBUG    Sending packed state data (104 bytes)
2017-02-21 14:46:16,135 (17c4/runtime        /handle_request    / 924) DEBUG    Response: [200] str, 16 bytes
ZeroQI commented 7 years ago

@sven-7 Yes it was included but tested always with the same serie (my bad) and your serie that failed triggered errors all over the code, corrected them all for now, published new version here, please test again https://github.com/ZeroQI/Hama.bundle/releases/download/Beta/Hama.bundle.zip

sven-7 commented 7 years ago

Still appears to not be working.

logs.zip

ZeroQI commented 7 years ago

major corrections in progress, works if meta is already there, doesn't do anythign if meta not there :/ once fixed will be good. i keep you posted but htere's quite few things to correct

sven-7 commented 7 years ago

Sounds good. Let me know if you need me to run anything else and upload logs.

ZeroQI commented 7 years ago

Uploaded latest: https://github.com/ZeroQI/Hama.bundle/releases/download/Beta/Hama.bundle.zip Could not prevent re-writing these episode fields (metatype is "SetObject") at every refresh. I also cannot read the values of these fields neither from metadata object. help welcome.

sven-7 commented 7 years ago

Still not matching for Sacred Seven. Logs attached.

2017-02-27 09:38:01,085 (10d0) :  INFO (core:349) - Starting framework core - Version: 2.6.3, Build: ab90695 (Sun Feb 19 13:13:29 UTC 2017)
2017-02-27 09:38:01,085 (10d0) :  DEBUG (core:361) - Using the elevated policy
2017-02-27 09:38:01,085 (10d0) :  DEBUG (core:450) - Starting runtime component.
2017-02-27 09:38:01,092 (10d0) :  DEBUG (core:450) - Starting caching component.
2017-02-27 09:38:01,094 (10d0) :  DEBUG (core:450) - Starting data component.
2017-02-27 09:38:01,094 (10d0) :  DEBUG (core:450) - Starting networking component.
2017-02-27 09:38:01,095 (10d0) :  DEBUG (networking:284) - Loaded HTTP cookies
2017-02-27 09:38:01,095 (10d0) :  DEBUG (networking:452) - Setting the default network timeout to 20.0
2017-02-27 09:38:01,095 (10d0) :  DEBUG (core:450) - Starting localization component.
2017-02-27 09:38:01,096 (10d0) :  INFO (localization:409) - Setting the default locale to en-us
2017-02-27 09:38:01,096 (10d0) :  DEBUG (core:450) - Starting messaging component.
2017-02-27 09:38:01,098 (10d0) :  DEBUG (core:450) - Starting debugging component.
2017-02-27 09:38:01,098 (10d0) :  DEBUG (core:450) - Starting services component.
2017-02-27 09:38:01,101 (10d0) :  DEBUG (core:450) - Starting myplex component.
2017-02-27 09:38:01,101 (13d4) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/system/messaging/clear_events/com.plexapp.agents.hama'
2017-02-27 09:38:01,102 (10d0) :  DEBUG (core:450) - Starting notifications component.
2017-02-27 09:38:01,262 (10d0) :  DEBUG (accessor:68) - Creating a new model access point for provider com.plexapp.agents.hama in namespace 'metadata'
2017-02-27 09:38:01,267 (10d0) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes'
2017-02-27 09:38:01,579 (10d0) :  DEBUG (runtime:1117) - Created a thread named 'load_all_services'
2017-02-27 09:38:01,579 (10a4) :  DEBUG (services:265) - Plug-in is not daemonized - loading services from system
2017-02-27 09:38:01,582 (10a4) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0J1bmRsZVNlcnZpY2U6QWxsU2VydmljZXM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMApyMAo_'
2017-02-27 09:38:01,582 (10d0) :  DEBUG (runtime:1117) - Created a thread named 'get_server_info'
2017-02-27 09:38:01,584 (10d0) :  DEBUG (core:150) - Finished starting framework core
2017-02-27 09:38:01,586 (10d0) :  DEBUG (core:560) - Loading plug-in code
2017-02-27 09:38:01,586 (5c8) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400'
2017-02-27 09:38:01,604 (5c8) :  DEBUG (core:538) - Machine identifier is 9cb7d9cba69992d51b245cb5971e75a0d917946e
2017-02-27 09:38:01,604 (5c8) :  DEBUG (core:539) - Server version is 1.4.2.3400-ab906953b
2017-02-27 09:38:01,756 (10d0) :  DEBUG (core:566) - Finished loading plug-in code
2017-02-27 09:38:01,884 (10a4) :  DEBUG (services:362) - Loaded services
2017-02-27 09:38:01,894 (174) :  DEBUG (services:438) - No shared code to load
2017-02-27 09:38:02,127 (10d0) :  INFO (logkit:16) - 1 - C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py
2017-02-27 09:38:02,127 (10d0) :  INFO (logkit:16) - 2 - C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py
2017-02-27 09:38:03,075 (10d0) :  DEBUG (logkit:13) - common.LoadFile() - Filename: 'anime-titles.xml', Directory: '' does not exists in cache
2017-02-27 09:38:03,088 (10d0) :  DEBUG (networking:161) - Fetching 'http://anidb.net/api/anime-titles.xml.gz' from the HTTP cache
2017-02-27 09:38:03,096 (10d0) :  DEBUG (logkit:13) - LoadFile() - url: 'http://anidb.net/api/anime-titles.xml.gz loaded
2017-02-27 09:38:03,098 (10d0) :  DEBUG (logkit:13) - SaveFile() - CachePath: 'C:\Users\Sven\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.agents.hama\DataItems', file: 'anime-titles.xml', directory(ies) were present
2017-02-27 09:38:03,240 (10d0) :  DEBUG (logkit:13) - common.LoadFile() - CacheTime: 'Tue Feb 21 13:33:57 2017', Limit: 'Mon Feb 13 09:38:03 2017', url: 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list-master.xml', Filename: 'anime-list-master.xml' loaded from cache
2017-02-27 09:38:03,289 (10d0) :  DEBUG (logkit:13) - common.LoadFile() - CacheTime: 'Sun Feb 26 23:35:12 2017', Limit: 'Sat Feb 25 09:38:03 2017', url: 'https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/master/anime-list-corrections.xml', Filename: 'anime-list-corrections.xml' loaded from cache
2017-02-27 09:38:03,290 (10d0) :  INFO (logkit:16) - MergeMaps() - Adding/Modifying AniDBids: '['10091', '3395', '9900', '11747', '10008', '10009', '10804', '11123', '4597', '10833', '9042', '9227', '10027', '11637', '8655', '5842']'
2017-02-27 09:38:03,302 (10d0) :  DEBUG (logkit:13) - common.LoadFile() - CacheTime: 'Tue Feb 21 13:33:57 2017', Limit: 'Mon Feb 13 09:38:03 2017', url: 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-movieset-list.xml', Filename: 'anime-movieset-list.xml' loaded from cache
2017-02-27 09:38:03,305 (10d0) :  DEBUG (agentkit:1115) - Creating new agent class called HamaTVAgent
2017-02-27 09:38:03,306 (10d0) :  DEBUG (agentkit:933) - Updating agent information: [{'media_types': ['TV_Show'], 'accepts_from': ['com.plexapp.agents.localmedia'], 'fallback_agent': False, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'HamaTV'}]
2017-02-27 09:38:03,308 (10d0) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0FnZW50U2VydmljZTpVcGRhdGVJbmZv/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQo2CmRpY3QKbGlzdApkaWN0Cmxpc3QKbGlzdApsaXN0CjIKczIzCmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hczEwCmlkZW50aWZpZXJyMQpzMTAKYWdlbnRfaW5mbzEKcjIKMTAKcjMKczExCm1lZGlhX3R5cGVzcjQKczEyCmFjY2VwdHNfZnJvbWIwczE0CmZhbGxiYWNrX2FnZW50bnMxNApjb250cmlidXRlc190b3I1CnM5Cmxhbmd1YWdlc2IxczIwCnBlcnNpc3Rfc3RvcmVkX2ZpbGVzaTAKczcKdmVyc2lvbmIxczE2CnByaW1hcnlfcHJvdmlkZXJiMXM1CnByZWZzczYKSGFtYVRWczQKbmFtZTEKczcKVFZfU2hvdzEKczI5CmNvbS5wbGV4YXBwLmFnZW50cy5sb2NhbG1lZGlhMjMKczIKZW5zMgpmcnMyCnpoczIKc3ZzMgpub3MyCmRhczIKZmlzMgpubHMyCmRlczIKaXRzMgplc3MyCnBsczIKaHVzMgplbHMyCnRyczIKcnVzMgpoZXMyCmphczIKcHRzMgpjc3MyCmtvczIKc2xzMgpocnIwCg__'
2017-02-27 09:38:03,319 (10d0) :  DEBUG (agentkit:1115) - Creating new agent class called HamaMovieAgent
2017-02-27 09:38:03,321 (10d0) :  DEBUG (agentkit:933) - Updating agent information: [{'media_types': ['TV_Show'], 'accepts_from': ['com.plexapp.agents.localmedia'], 'fallback_agent': False, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'HamaTV'}, {'media_types': ['Movie'], 'accepts_from': ['com.plexapp.agents.localmedia'], 'fallback_agent': False, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'HamaMovies'}]
2017-02-27 09:38:03,322 (10d0) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0FnZW50U2VydmljZTpVcGRhdGVJbmZv/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxMApkaWN0Cmxpc3QKZGljdApsaXN0Cmxpc3QKbGlzdApkaWN0Cmxpc3QKbGlzdApsaXN0CjIKczIzCmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hczEwCmlkZW50aWZpZXJyMQpzMTAKYWdlbnRfaW5mbzIKcjIKcjYKMTAKcjMKczExCm1lZGlhX3R5cGVzcjQKczEyCmFjY2VwdHNfZnJvbWIwczE0CmZhbGxiYWNrX2FnZW50bnMxNApjb250cmlidXRlc190b3I1CnM5Cmxhbmd1YWdlc2IxczIwCnBlcnNpc3Rfc3RvcmVkX2ZpbGVzaTAKczcKdmVyc2lvbmIxczE2CnByaW1hcnlfcHJvdmlkZXJiMXM1CnByZWZzczYKSGFtYVRWczQKbmFtZTEKczcKVFZfU2hvdzEKczI5CmNvbS5wbGV4YXBwLmFnZW50cy5sb2NhbG1lZGlhMjMKczIKZW5zMgpmcnMyCnpoczIKc3ZzMgpub3MyCmRhczIKZmlzMgpubHMyCmRlczIKaXRzMgplc3MyCnBsczIKaHVzMgplbHMyCnRyczIKcnVzMgpoZXMyCmphczIKcHRzMgpjc3MyCmtvczIKc2xzMgpocjEwCnI3CnMxMQptZWRpYV90eXBlc3I4CnMxMgphY2NlcHRzX2Zyb21iMHMxNApmYWxsYmFja19hZ2VudG5zMTQKY29udHJpYnV0ZXNfdG9yOQpzOQpsYW5ndWFnZXNiMXMyMApwZXJzaXN0X3N0b3JlZF9maWxlc2kwCnM3CnZlcnNpb25iMXMxNgpwcmltYXJ5X3Byb3ZpZGVyYjFzNQpwcmVmc3MxMApIYW1hTW92aWVzczQKbmFtZTEKczUKTW92aWUxCnMyOQpjb20ucGxleGFwcC5hZ2VudHMubG9jYWxtZWRpYTIzCnMyCmVuczIKZnJzMgp6aHMyCnN2czIKbm9zMgpkYXMyCmZpczIKbmxzMgpkZXMyCml0czIKZXNzMgpwbHMyCmh1czIKZWxzMgp0cnMyCnJ1czIKaGVzMgpqYXMyCnB0czIKY3NzMgprb3MyCnNsczIKaHJyMAo_'
2017-02-27 09:38:03,334 (10d0/logkit         /Info              /  16) INFO     =============================================================================================================================================================
2017-02-27 09:38:03,334 (10d0/logkit         /Info              /  16) INFO     HTTP Anidb Metadata Agent (HAMA)v By ZeroQI (Forked from Atomicstrawberry's v0.4 - AniDB, TVDB mod agent using SdudLee XML's ###
2017-02-27 09:38:03,334 (10d0/logkit         /Info              /  16) INFO     =============================================================================================================================================================
2017-02-27 09:38:03,336 (10d0/preferences    /_load_prefs       / 258) DEBUG    Loaded preferences from DefaultPrefs.json
2017-02-27 09:38:03,336 (10d0/preferences    /_load_user_file   / 178) DEBUG    Loaded the user preferences for com.plexapp.agents.hama
2017-02-27 09:38:03,338 (10d0/logkit         /Info              /  16) INFO     Simkl.Register()
2017-02-27 09:38:03,743 (10d0/logkit         /Info              /  16) INFO     Level 1 - Copy code: 'BA5CA' and go to 'url': 'https://simkl.com/pin', 'expires_in': '900', 'interval': '5'
2017-02-27 09:38:03,743 (10d0/core           /log_exception     / 574) CRITICAL Exception when calling function 'Start' (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 294, in call_named_function
    result = f(*args, **kwargs)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 43, in Start
    if Prefs['Simkl']:  Simkl.Register()
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\Simkl.py", line 46, in Register
    time.sleep(interval)
NameError: global name 'time' is not defined

2017-02-27 09:38:03,743 (10d0/core           /start             / 611) INFO     Started plug-in
2017-02-27 09:38:03,743 (10d0/socketinterface/listen            / 160) DEBUG    Starting socket servera
2017-02-27 09:38:03,744 (10d0/runtime        /create_thread     /1117) DEBUG    Created a thread named 'start'
2017-02-27 09:38:03,744 (10d0/socketinterface/listen            / 184) INFO     Socket server started on port 59110
2017-02-27 09:38:03,744 (10d0/pipeinterface  /listen            /  25) INFO     Entering run loop
2017-02-27 09:38:03,746 (10d0/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/prefixes
2017-02-27 09:38:03,746 (10d0/runtime        /handle_request    / 814) DEBUG    Found route matching /:/prefixes
2017-02-27 09:38:03,746 (10d0/runtime        /handle_request    / 924) DEBUG    Response: [200] MediaContainer, 148 bytes
2017-02-27 09:38:03,756 (7f4/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo3NTY4N3M0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQ0CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vYW5pZGItODIwNT9sYW5nPWVuczQKZ3VpZHMxMAphbmlkYi04MjA1czIKaWRyMAo_
2017-02-27 09:38:03,756 (7f4/runtime        /parse_state_data  /  49) DEBUG    Received packed state data (1524 bytes)
2017-02-27 09:38:03,769 (7f4/runtime        /handle_request    / 814) DEBUG    Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo3NTY4N3M0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQ0CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vYW5pZGItODIwNT9sYW5nPWVuczQKZ3VpZHMxMAphbmlkYi04MjA1czIKaWRyMAo_
2017-02-27 09:38:03,769 (7f4/model          /__getitem__       /  32) DEBUG    Loading model with GUID com.plexapp.agents.hama://anidb-8205?lang=en
2017-02-27 09:38:03,770 (7f4/model          /_deserialize      / 234) DEBUG    Deserializing from C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\f\3f6355f9711435540e4844b3167d30c4633901a.bundle\Contents\com.plexapp.agents.hama\Info.xml
2017-02-27 09:38:03,773 (7f4/networking     /load              / 166) DEBUG    Requesting 'http://127.0.0.1:32400/library/metadata/75687/tree'
2017-02-27 09:38:03,792 (7f4/logkit         /Info              /  16) INFO     === Update Begin ============================================================================================================Windows  i386
2017-02-27 09:38:03,792 (7f4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 11 - Blade Sharpened.mkv
2017-02-27 09:38:03,792 (7f4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 10 - Aoi's Memory.mkv
2017-02-27 09:38:03,792 (7f4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 12 - Sacred Seven.mkv
2017-02-27 09:38:03,792 (7f4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 1 - The Stone's Awakening.mkv
2017-02-27 09:38:03,792 (7f4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 3 - The Crazy Knight.mkv
2017-02-27 09:38:03,792 (7f4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 2 - A Bond in the Color of Ruri.mkv
2017-02-27 09:38:03,792 (7f4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 5 - The Heart's Mirror.mkv
2017-02-27 09:38:03,792 (7f4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 4 - School Fair of Hell.mkv
2017-02-27 09:38:03,792 (7f4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 7 - The True Lightstone and Darkstone.mkv
2017-02-27 09:38:03,792 (7f4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 6 - One More Night.mkv
2017-02-27 09:38:03,793 (7f4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 9 - Will Like a Rolling Stone.mkv
2017-02-27 09:38:03,793 (7f4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 8 - Show Me Your Devotion.mkv
2017-02-27 09:38:03,793 (7f4/logkit         /Info              /  16) INFO     Update() - metadata.id: 'anidb-8205', Title: 'None', lang: 'en', force: 'True', movie: 'False', max(media.seasons.keys()): 'False'
2017-02-27 09:38:03,793 (7f4/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 09:38:03,793 (7f4/logkit         /Info              /  16) INFO     AnimeLists.GetMetadata() - Local custom mapping - No file detected
2017-02-27 09:38:03,917 (7f4/logkit         /Info              /  16) INFO     AnimeLists.GetMetadata() - anidb: '8205', tvbdid: '249939', tmdbid: '', imbdid: '', defaulttvdbseason: '1', name: 'Sacred Seven'
2017-02-27 09:38:03,920 (7f4/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 09:38:03,920 (7f4/logkit         /Info              /  16) INFO     AniDB.GetMetadata() - AniDB Serie XML: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8205', file: 'AniDB/8205.xml
2017-02-27 09:38:03,921 (7f4/logkit         /Debug             /  13) DEBUG    common.LoadFile() - CacheTime: 'Tue Feb 21 13:38:22 2017', Limit: 'Mon Feb 20 09:38:03 2017', url: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8205', Filename: 'AniDB\8205.xml' loaded from cache
2017-02-27 09:38:03,930 (7f4/core           /log_exception     / 574) CRITICAL Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://anidb-8205?lang=en' (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 96, in update
    def update (self, metadata, media, lang, force ):  Update (metadata, media, lang, force,  False)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 73, in Update
    if AniDBid.isdigit():                ANNid, MALid, AniDB_dict =      AniDB.GetMetadata(metadata, media, movie, error_log, AniDBMovieSets, AniDBid, TVDBid, mappingList)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\AniDB.py", line 204, in GetMetadata
    elif epNumType == "2": missing_specials.append("s" + season + "e" + episode )
TypeError: int() argument must be a string or a number, not 'NoneType'

2017-02-27 09:38:03,933 (7f4/model          /_serialize        / 229) DEBUG    Serializing to C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\f\3f6355f9711435540e4844b3167d30c4633901a.bundle\Contents\com.plexapp.agents.hama\Info.xml
2017-02-27 09:38:03,936 (7f4/runtime        /return_state_data /  88) DEBUG    Sending packed state data (1548 bytes)
2017-02-27 09:38:03,937 (7f4/runtime        /handle_request    / 924) DEBUG    Response: [200] str, 16 bytes
ZeroQI commented 7 years ago

@sven, i can see you use my Beta agent, i added the file list so it's easier to reproduce for me. some value is none, need to track in which xml and line it happen since the reported line is often wrong, like no int in reported line.

First error "NameError: global name 'time' is not defined", do not enable Simkl in the Prefs yet... I created your "Sacred Seven" folder in my library, did you use the file https://github.com/ZeroQI/Hama.bundle/releases/download/Beta/Hama.bundle.zip i uploaded today ? i have no error with the same filenames... maybe a bad file cache ?

2017-02-27 17:10:18,146 (-8f47900/__init__       /Start             /  39) INFO     =============================================================================================================================================================
2017-02-27 17:10:18,146 (-8f47900/__init__       /Start             /  40) INFO     HTTP Anidb Metadata Agent (HAMA)v By ZeroQI (Forked from Atomicstrawberry's v0.4 - AniDB, TVDB mod agent using SdudLee XML's ###
2017-02-27 17:10:18,146 (-8f47900/__init__       /Start             /  41) INFO     =============================================================================================================================================================
2017-02-27 17:10:18,147 (-8f47900/preferences    /_load_prefs       / 258) DEBUG    Loaded preferences from DefaultPrefs.json
2017-02-27 17:10:18,149 (-8f47900/preferences    /_load_user_file   / 178) DEBUG    Loaded the user preferences for com.plexapp.agents.hama
2017-02-27 17:10:18,150 (-8f47900/Simkl          /Register          /  35) INFO     Simkl.Register()
2017-02-27 17:10:18,150 (-8f47900/core           /start             / 611) INFO     Started plug-in
2017-02-27 17:10:18,150 (-8f47900/socketinterface/listen            / 160) DEBUG    Starting socket server
2017-02-27 17:10:18,152 (-8f47900/runtime        /create_thread     /1117) DEBUG    Created a thread named 'start'
2017-02-27 17:10:18,152 (-8f47900/socketinterface/listen            / 184) INFO     Socket server started on port 39134
2017-02-27 17:10:18,153 (-8f47900/pipeinterface  /listen            /  25) INFO     Entering run loop
2017-02-27 17:10:18,153 (-8f47900/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/prefixes
2017-02-27 17:10:18,157 (-8f47900/runtime        /handle_request    / 814) DEBUG    Found route matching /:/prefixes
2017-02-27 17:10:18,159 (-8f47900/runtime        /handle_request    / 924) DEBUG    Response: [200] MediaContainer, 148 bytes
2017-02-27 17:10:18,164 (-bfee4c0/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNgo0MjkxODVzNApkYmlkaTAKczcKdmVyc2lvbm5zMTAKcGFyZW50R1VJRG5zOApwYXJlbnRJRHM3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZXM0NApjb20ucGxleGFwcC5hZ2VudHMuaGFtYTovL2FuaWRiLTgyMDU%40bGFuZz1lbnM0Cmd1aWRzMTAKYW5pZGItODIwNXMyCmlkcjAK
2017-02-27 17:10:18,165 (-bfee4c0/runtime        /parse_state_data  /  49) DEBUG    Received packed state data (2008 bytes)
2017-02-27 17:10:18,212 (-bfee4c0/runtime        /handle_request    / 814) DEBUG    Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNgo0MjkxODVzNApkYmlkaTAKczcKdmVyc2lvbm5zMTAKcGFyZW50R1VJRG5zOApwYXJlbnRJRHM3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZXM0NApjb20ucGxleGFwcC5hZ2VudHMuaGFtYTovL2FuaWRiLTgyMDU@bGFuZz1lbnM0Cmd1aWRzMTAKYW5pZGItODIwNXMyCmlkcjAK
2017-02-27 17:10:18,214 (-bfee4c0/model          /__getitem__       /  32) DEBUG    Loading model with GUID com.plexapp.agents.hama://anidb-8205?lang=en
2017-02-27 17:10:18,239 (-bfee4c0/model          /_deserialize      / 234) DEBUG    Deserializing from /volume1/Plex/Library/Application Support/Plex Media Server/Metadata/TV Shows/f/3f6355f9711435540e4844b3167d30c4633901a.bundle/Contents/com.plexapp.agents.hama/Info.xml
2017-02-27 17:10:19,414 (-bfee4c0/networking     /load              / 166) DEBUG    Requesting 'http://127.0.0.1:32400/library/metadata/429185/tree'
2017-02-27 17:10:19,437 (-bfee4c0/__init__       /Update            /  66) INFO     === Update Begin ============================================================================================================Linux  i386
2017-02-27 17:10:19,438 (-bfee4c0/__init__       /Update            /  70) INFO     Update() - /volume1/downloads/_Plex_Current issues/Sacred Seven/Sacred Seven - 11 - Blade Sharpened.mkv
2017-02-27 17:10:19,438 (-bfee4c0/__init__       /Update            /  70) INFO     Update() - /volume1/downloads/_Plex_Current issues/Sacred Seven/Sacred Seven - 10 - Aoi's Memory.mkv
2017-02-27 17:10:19,439 (-bfee4c0/__init__       /Update            /  70) INFO     Update() - /volume1/downloads/_Plex_Current issues/Sacred Seven/Sacred Seven - 12 - Sacred Seven.mkv
2017-02-27 17:10:19,439 (-bfee4c0/__init__       /Update            /  70) INFO     Update() - /volume1/downloads/_Plex_Current issues/Sacred Seven/Sacred Seven - 1 - The Stone's Awakening.mkv
2017-02-27 17:10:19,440 (-bfee4c0/__init__       /Update            /  70) INFO     Update() - /volume1/downloads/_Plex_Current issues/Sacred Seven/Sacred Seven - 3 - The Crazy Knight.mkv
2017-02-27 17:10:19,440 (-bfee4c0/__init__       /Update            /  70) INFO     Update() - /volume1/downloads/_Plex_Current issues/Sacred Seven/Sacred Seven - 2 - A Bond in the Color of Ruri.mkv
2017-02-27 17:10:19,441 (-bfee4c0/__init__       /Update            /  70) INFO     Update() - /volume1/downloads/_Plex_Current issues/Sacred Seven/Sacred Seven - 5 - The Heart's Mirror.mkv
2017-02-27 17:10:19,441 (-bfee4c0/__init__       /Update            /  70) INFO     Update() - /volume1/downloads/_Plex_Current issues/Sacred Seven/Sacred Seven - 4 - School Fair of Hell.mkv
2017-02-27 17:10:19,441 (-bfee4c0/__init__       /Update            /  70) INFO     Update() - /volume1/downloads/_Plex_Current issues/Sacred Seven/Sacred Seven - 7 - The True Lightstone and Darkstone.mkv
2017-02-27 17:10:19,442 (-bfee4c0/__init__       /Update            /  70) INFO     Update() - /volume1/downloads/_Plex_Current issues/Sacred Seven/Sacred Seven - 6 - One More Night.mkv
2017-02-27 17:10:19,442 (-bfee4c0/__init__       /Update            /  70) INFO     Update() - /volume1/downloads/_Plex_Current issues/Sacred Seven/Sacred Seven - 9 - Will Like a Rolling Stone.mkv
2017-02-27 17:10:19,442 (-bfee4c0/__init__       /Update            /  70) INFO     Update() - /volume1/downloads/_Plex_Current issues/Sacred Seven/Sacred Seven - 8 - Show Me Your Devotion.mkv
2017-02-27 17:10:19,443 (-bfee4c0/__init__       /Update            /  71) INFO     Update() - metadata.id: 'anidb-8205', Title: 'Sacred Seven', lang: 'en', force: 'True', movie: 'False', max(media.seasons.keys()): 'False'
2017-02-27 17:10:19,443 (-bfee4c0/AnimeLists     /GetMetadata       /  90) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:19,444 (-bfee4c0/AnimeLists     /GetMetadata       /  90) INFO     AnimeLists.GetMetadata() - Local custom mapping - No file detected
2017-02-27 17:10:19,868 (-bfee4c0/AnimeLists     /GetMetadata       /  93) INFO     AnimeLists.GetMetadata() - anidb: '8205', tvbdid: '249939', tmdbid: '', imbdid: '', defaulttvdbseason: '1', name: 'Sacred Seven'
2017-02-27 17:10:19,879 (-bfee4c0/AniDB          /GetMetadata       /  25) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:19,879 (-bfee4c0/AniDB          /GetMetadata       /  26) INFO     AniDB.GetMetadata() - AniDB Serie XML: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8205', file: 'AniDB/8205.xml
2017-02-27 17:10:19,927 (-bfee4c0/common         /LoadFile          / 193) DEBUG    common.LoadFile() - CacheTime: 'Wed Feb 22 06:19:47 2017', Limit: 'Mon Feb 20 17:10:19 2017', url: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8205', Filename: 'AniDB/8205.xml' loaded from cache
2017-02-27 17:10:20,006 (-bfee4c0/AniDB          /GetMetadata       / 274) INFO     AniDB.get_metadata() - DURATION: 300, numEpisodes: 12
2017-02-27 17:10:20,009 (-bfee4c0/AniDB          /GetMetadata       / 288) INFO     AniDB.get_metadata() - ANNid: '12393', MALid: '10156', ANFOid: '('4910', '4910')', xml loaded: 'True'
2017-02-27 17:10:20,009 (-bfee4c0/AniDB          /GetMetadata       / 289) INFO     {'rating': 3.44, 'genres': ['Super power', 'Earth', 'Japan', 'Slow when it comes to love', 'Asia', 'Action', 'Science fiction', 'Henshin', 'Ecchi', 'Conspiracy', 'Parental abandonment', 'Ended'], 'roles': [{'photo': 'http://img7.anidb.net/pics/anime/25743.jpg', 'role': 'Tandouji Aruma', 'name': 'Terashima Takuma'}, {'photo': 'http://img7.anidb.net/pics/anime/33609.jpg', 'role': 'Kijima Naito', 'name': 'Okamoto Nobuhiko'}, {'photo': 'http://img7.anidb.net/pics/anime/30429.jpg', 'role': 'Fei', 'name': 'Nomizu Iori'}, {'photo': 'http://img7.anidb.net/pics/anime/37799.jpg', 'role': 'Aiba Ruri', 'name': 'Nakajima Megumi'}, {'photo': 'http://img7.anidb.net/pics/anime/23192.jpg', 'role': 'Itou Wakana', 'name': 'Itou Kanae'}, {'photo': 'http://img7.anidb.net/pics/anime/188456.jpg', 'role': 'Kenmi Yuuji', 'name': 'Konishi Katsuyuki'}, {'photo': 'http://img7.anidb.net/pics/anime/17419.jpg', 'role': 'Kagami Makoto', 'name': 'Irino Miyu'}, {'photo': 'http://img7.anidb.net/pics/anime/186900.jpg', 'role': 'Onigawara', 'name': 'Ookawa Tooru'}, {'photo': 'http://img7.anidb.net/pics/anime/157190.jpg', 'role': 'Ami', 'name': 'Nanase Ami'}, {'photo': 'http://img7.anidb.net/pics/anime/74664.jpg', 'role': 'Saori', 'name': 'Hayashi Saori'}, {'photo': 'http://img7.anidb.net/pics/anime/25937.jpg', 'role': 'Shiori', 'name': 'Mikami Shiori'}, {'photo': 'http://img7.anidb.net/pics/anime/134453.jpg', 'role': 'Manami', 'name': 'Tanaka Manami'}, {'photo': 'http://img7.anidb.net/pics/anime/74734.jpg', 'role': 'Miho', 'name': 'Nakano Miho'}, {'photo': 'http://img7.anidb.net/pics/anime/161653.jpg', 'role': 'Yumiko', 'name': 'Fujita Yumiko'}, {'photo': 'http://img7.anidb.net/pics/anime/23720.jpg', 'role': 'Rie', 'name': 'Tozuka Rie'}, {'photo': 'http://img7.anidb.net/pics/anime/74664.jpg', 'role': 'Risa', 'name': 'Hayashi Saori'}, {'photo': 'http://img7.anidb.net/pics/anime/25743.jpg', 'role': 'Tandouji Aruma', 'name': 'Terashima Takuma'}, {'photo': 'http://img7.anidb.net/pics/anime/62583.jpg', 'role': 'Yamaguchi Ageha', 'name': 'Yamaguchi Rie'}, {'photo': 'http://img7.anidb.net/pics/anime/85893.jpg', 'role': 'Akasaki Nanami', 'name': 'Akasaki Chinatsu'}, {'photo': 'http://img7.anidb.net/pics/anime/29211.jpg', 'role': 'SP', 'name': 'Takabe Ai'}, {'photo': 'http://img7.anidb.net/pics/anime/148709.jpg', 'role': 'Aiba Aoi', 'name': 'Yahagi Sayuri'}], 'originally_available_at': datetime.date(2011, 7, 3), 'title': 'Sacred Seven', 'summary': 'In a port city in the Kantou region, there lives Tandouji Aruma who lives a lonely and solitary life. One day, he is approached by Aiba Ruri who asks for his help, for the power of the Sacred Seven which resides within Aruma. However, Aruma turns her away, since in the past, he had hurt people with that power, so he had forsworn using it.\nBut when the peaceful city is attacked by a monster, Aruma reluctantly decides to use the Sacred Seven. However, his powers go berserk and the situation becomes even more dire. At that moment, Ruri comes to his aid.\n~ translated and adapted from official site by Cranston', 'seasons': {'1': {'episodes': {'11': {'duration': 1500000, 'rating': 5.9, 'originally_available_at': '2011-09-09', 'title': 'Blade Sharpened'}, '10': {'duration': 1500000, 'rating': 6.81, 'originally_available_at': '2011-09-03', 'title': "Aoi's Memory"}, '12': {'duration': 1500000, 'rating': 8.17, 'originally_available_at': '2011-09-16', 'title': 'Sacred Seven'}, '1': {'duration': 1500000, 'rating': 5.77, 'originally_available_at': '2011-07-03', 'title': "Ishi's Awakening"}, '3': {'duration': 1500000, 'rating': 5.98, 'originally_available_at': '2011-07-17', 'title': 'Crazy Night'}, '2': {'duration': 1500000, 'rating': 4.83, 'originally_available_at': '2011-07-10', 'title': 'A Bond in the Colour of Ruri'}, '5': {'duration': 1500000, 'rating': 5.35, 'originally_available_at': '2011-07-31', 'title': "The Heart's Mirror"}, '4': {'duration': 1500000, 'rating': 6.64, 'originally_available_at': '2011-07-24', 'title': 'School Fair of Hell'}, '7': {'duration': 1500000, 'rating': 5.17, 'originally_available_at': '2011-08-14', 'title': 'The True Lightstone and Darkstone'}, '6': {'duration': 1500000, 'rating': 8.01, 'originally_available_at': '2011-08-07', 'title': 'One More Night'}, '9': {'duration': 1500000, 'rating': 5.35, 'originally_available_at': '2011-08-28', 'title': 'A Will Like a Rolling Stone'}, '8': {'duration': 1500000, 'rating': 7.87, 'originally_available_at': '2011-08-21', 'title': 'Show Me Your Devotion'}}}}, 'posters': {'http://img7.anidb.net/pics/anime/73004.jpg': ('AniDB/73004.jpg', 99, None)}}
2017-02-27 17:10:20,010 (-bfee4c0/TheTVDB        /GetMetadata       /  85) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:20,011 (-bfee4c0/TheTVDB        /GetMetadata       /  86) INFO     TheTVDB.GetMetadata() - TVDBid: '249939', url: 'http://thetvdb.com/api/A27AD9BE0DA63333/series/249939/all/en.xml'
2017-02-27 17:10:20,128 (-bfee4c0/common         /LoadFile          / 193) DEBUG    common.LoadFile() - CacheTime: 'Wed Feb 22 10:45:43 2017', Limit: 'Mon Feb 20 17:10:20 2017', url: 'http://thetvdb.com/api/A27AD9BE0DA63333/series/249939/all/en.xml', Filename: 'TVDB/249939.xml' loaded from cache
2017-02-27 17:10:20,147 (-bfee4c0/TheTVDB        /GetMetadata       / 168) INFO     TheTVDB.GetMetadata() - abs_manual_placement_worked: 'True', abs_manual_placement_info: '[]'
2017-02-27 17:10:20,204 (-bfee4c0/TheTVDB        /GetMetadata       / 174) DEBUG    TheTVDB.GetMetadata() - TVDB - Episodes with    Summary: ['s1e1', 's1e11', 's1e2', 's1e3', 's1e4', 's1e5', 's1e6', 's1e7', 's1e8']
2017-02-27 17:10:20,205 (-bfee4c0/TheTVDB        /GetMetadata       / 175) DEBUG    TheTVDB.GetMetadata() - TVDB - Episodes without Summary: ['s1e10', 's1e12', 's1e9']
2017-02-27 17:10:20,205 (-bfee4c0/common         /LoadFile          / 193) DEBUG    common.LoadFile() - Filename: '249939.banners.xml', Directory: 'TVDB' does not exists in cache
2017-02-27 17:10:20,240 (-bfee4c0/networking     /load              / 166) DEBUG    Requesting 'http://thetvdb.com/api/A27AD9BE0DA63333/series/249939/banners.xml'
2017-02-27 17:10:20,486 (-bfee4c0/common         /LoadFile          / 193) DEBUG    LoadFile() - url: 'http://thetvdb.com/api/A27AD9BE0DA63333/series/249939/banners.xml loaded
2017-02-27 17:10:20,487 (-bfee4c0/common         /SaveFile          / 163) DEBUG    SaveFile() - CachePath: '/volume1/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems', file: 'TVDB/249939.banners.xml', directory(ies) were present
2017-02-27 17:10:20,508 (-bfee4c0/TheTVDB        /GetImages         /  77) INFO     TheTVDB.GetImages() - Posters : 3, Season posters: 2, Posters total: 3, num: 9
2017-02-27 17:10:20,509 (-bfee4c0/TheMovieDB     /GetMetadata       /  25) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:20,510 (-bfee4c0/TheMovieDB     /GetMetadata       /  26) INFO     TheMovieDB.GetMetadata() - IMDbid: , TMDbid: , TVDBid: 249939
2017-02-27 17:10:20,510 (-bfee4c0/common         /LoadFile          / 193) DEBUG    common.LoadFile() - Filename: 'TVDB-249939.json', Directory: 'OMDB' does not exists in cache
2017-02-27 17:10:20,530 (-bfee4c0/networking     /load              / 166) DEBUG    Requesting 'http://api.themoviedb.org/3/find/249939?api_key=7f4a0bd0bd3315bb832e17feda70b5cd&external_source=tvdb_id&append_to_response=releases,credits,trailers&language=en'
2017-02-27 17:10:21,101 (-bfee4c0/common         /LoadFile          / 193) DEBUG    LoadFile() - url: 'http://api.themoviedb.org/3/find/249939?api_key=7f4a0bd0bd3315bb832e17feda70b5cd&external_source=tvdb_id&append_to_response=releases,credits,trailers&language=en loaded
2017-02-27 17:10:21,102 (-bfee4c0/common         /SaveFile          / 163) DEBUG    SaveFile() - CachePath: '/volume1/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems', file: 'OMDB/TVDB-249939.json', directory(ies) were present
2017-02-27 17:10:21,104 (-bfee4c0/common         /LoadFile          / 193) DEBUG    common.LoadFile() - CacheTime: 'Sun Jan 29 12:50:22 2017', Limit: 'Sat Jan 28 17:10:21 2017', url: 'http://api.tmdb.org/3/configuration?api_key=7f4a0bd0bd3315bb832e17feda70b5cd', Filename: 'TMDB_CONFIG_URL.json' loaded from cache
2017-02-27 17:10:21,107 (-bfee4c0/TheMovieDB     /GetMetadata       /  66) INFO     TheMovieDB.GetMetadata() - IMDbid: '', TMDbid: ''
2017-02-27 17:10:21,107 (-bfee4c0/Simkl          /GetMetadata       /  59) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:21,108 (-bfee4c0/Simkl          /GetMetadata       /  60) INFO     Simkl.GetMetadata()
2017-02-27 17:10:21,505 (-bfee4c0/Simkl          /GetMetadata       /  94) INFO     Simkl.GetMetadata() - 'token' exist[{u'tvdb': 249939, u'anidb': 8205, u'result': False}]
2017-02-27 17:10:21,506 (-bfee4c0/OMDb           /GetMetadata       /  15) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:21,506 (-bfee4c0/OMDb           /GetMetadata       /  16) INFO     OMDb.GetMetadata() - background, Poster - imdbid: ''
2017-02-27 17:10:21,507 (-bfee4c0/FanartTV       /GetMetadata       /  15) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:21,508 (-bfee4c0/FanartTV       /GetMetadata       /  16) INFO     FanartTv.GetMetadata() - movie:'False', TVDBid: '249939', imdbid:'', tmdbid: '', season: '0', num: '100'
2017-02-27 17:10:21,509 (-bfee4c0/common         /LoadFile          / 193) DEBUG    common.LoadFile() - Filename: '249939.json', Directory: 'FanartTV/tv/249939' does not exists in cache
2017-02-27 17:10:21,580 (-bfee4c0/networking     /load              / 166) DEBUG    Requesting 'http://webservice.fanart.tv/v3/tv/249939?api_key=cfa9dc054d221b8d107f8411cd20b13f'
2017-02-27 17:10:21,759 (-bfee4c0/common         /LoadFile          / 193) DEBUG    LoadFile() - url: 'http://webservice.fanart.tv/v3/tv/249939?api_key=cfa9dc054d221b8d107f8411cd20b13f loaded
2017-02-27 17:10:21,760 (-bfee4c0/MyAnimeList    /GetMetadata       /  15) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:21,761 (-bfee4c0/MyAnimeList    /GetMetadata       /  16) INFO     MyAnimeList.GetMetadata() - MALid: '10156'
2017-02-27 17:10:21,790 (-bfee4c0/common         /LoadFile          / 193) DEBUG    common.LoadFile() - CacheTime: 'Wed Feb 22 10:45:49 2017', Limit: 'Mon Feb 20 17:10:21 2017', url: 'http://fribbtastic-api.net/fribbtastic-api/services/anime?id=10156', Filename: 'MAL/10156.xml' loaded from cache
2017-02-27 17:10:21,796 (-bfee4c0/common         /GetXml            / 127) INFO     field: originally_available_at, type: dict
2017-02-27 17:10:21,797 (-bfee4c0/common         /GetXml            / 127) INFO     field: title, type: dict
2017-02-27 17:10:21,797 (-bfee4c0/common         /GetXml            / 127) INFO     field: content_rating, type: dict
2017-02-27 17:10:21,798 (-bfee4c0/common         /GetXml            / 127) INFO     field: summary, type: dict
2017-02-27 17:10:21,803 (-bfee4c0/Plex           /GetMetadata       /  20) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:21,804 (-bfee4c0/Plex           /GetMetadata       /  25) INFO     Plex.GetMetadata() - Prefs['Themes']: 'True, TVDBid: '249939', result code: 'True', url: 'http://tvthemes.plexapp.com/249939.mp3'
2017-02-27 17:10:21,805 (-bfee4c0/TVTunes        /GetMetadata       /  13) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:21,806 (-bfee4c0/TVTunes        /GetMetadata       /  19) INFO     TVTunes.GetMetadata() - Return code: '*', url: 'http://www.televisiontunes.com/uploads/audio/Sacred Seven.mp3'
2017-02-27 17:10:21,806 (-bfee4c0/common         /write_logs        / 255) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:21,879 (-bfee4c0/common         /write_logs        / 281) DEBUG    common.write_logs() - 'Missing Special Summaries  ': ["TVDBid: <a href='http://thetvdb.com/?tab=series&id=249939' target='_blank'>249939</a> | Title: 'Sacred Seven' | Missing Special Summaries: ['s0e1', 's0e2']"]
2017-02-27 17:10:21,890 (-bfee4c0/common         /write_logs        / 281) DEBUG    common.write_logs() - 'Missing Episode Summaries  ': ["TVDBid: <a href='http://thetvdb.com/?tab=series&id=249939' target='_blank'>249939</a> | Title: 'Sacred Seven' | Missing Episode Summaries: ['s1e9', 's1e10', 's1e12']"]
2017-02-27 17:10:21,897 (-bfee4c0/__init__       /Update            /  86) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:21,897 (-bfee4c0/__init__       /Update            /  87) INFO     Update() - AniDBid: 8205, TVDBid: 249939, TMDbid: , IMDbid: , ANNid:12393, MALid: 10156
2017-02-27 17:10:21,897 (-bfee4c0/common         /UpdateMeta        / 374) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:21,898 (-bfee4c0/common         /UpdateMeta        / 375) INFO     Plex.UpdateMeta() - Metadata Sources with fields
2017-02-27 17:10:21,899 (-bfee4c0/common         /UpdateMeta        / 376) INFO     {'FanartTV': {}, 'AnimeLists': {'studio': ''}, 'TVTunes': {'themes': {'http://www.televisiontunes.com/uploads/audio/Sacred Seven.mp3': ('TelevisionTunes/Sacred Seven.mp3', 1, None)}}, 'OMDb': {}, 'Simkl': {}, 'AniDB': {'rating': 3.44, 'genres': ['Super power', 'Earth', 'Japan', 'Slow when it comes to love', 'Asia', 'Action', 'Science fiction', 'Henshin', 'Ecchi', 'Conspiracy', 'Parental abandonment', 'Ended'], 'roles': [{'photo': 'http://img7.anidb.net/pics/anime/25743.jpg', 'role': 'Tandouji Aruma', 'name': 'Terashima Takuma'}, {'photo': 'http://img7.anidb.net/pics/anime/33609.jpg', 'role': 'Kijima Naito', 'name': 'Okamoto Nobuhiko'}, {'photo': 'http://img7.anidb.net/pics/anime/30429.jpg', 'role': 'Fei', 'name': 'Nomizu Iori'}, {'photo': 'http://img7.anidb.net/pics/anime/37799.jpg', 'role': 'Aiba Ruri', 'name': 'Nakajima Megumi'}, {'photo': 'http://img7.anidb.net/pics/anime/23192.jpg', 'role': 'Itou Wakana', 'name': 'Itou Kanae'}, {'photo': 'http://img7.anidb.net/pics/anime/188456.jpg', 'role': 'Kenmi Yuuji', 'name': 'Konishi Katsuyuki'}, {'photo': 'http://img7.anidb.net/pics/anime/17419.jpg', 'role': 'Kagami Makoto', 'name': 'Irino Miyu'}, {'photo': 'http://img7.anidb.net/pics/anime/186900.jpg', 'role': 'Onigawara', 'name': 'Ookawa Tooru'}, {'photo': 'http://img7.anidb.net/pics/anime/157190.jpg', 'role': 'Ami', 'name': 'Nanase Ami'}, {'photo': 'http://img7.anidb.net/pics/anime/74664.jpg', 'role': 'Saori', 'name': 'Hayashi Saori'}, {'photo': 'http://img7.anidb.net/pics/anime/25937.jpg', 'role': 'Shiori', 'name': 'Mikami Shiori'}, {'photo': 'http://img7.anidb.net/pics/anime/134453.jpg', 'role': 'Manami', 'name': 'Tanaka Manami'}, {'photo': 'http://img7.anidb.net/pics/anime/74734.jpg', 'role': 'Miho', 'name': 'Nakano Miho'}, {'photo': 'http://img7.anidb.net/pics/anime/161653.jpg', 'role': 'Yumiko', 'name': 'Fujita Yumiko'}, {'photo': 'http://img7.anidb.net/pics/anime/23720.jpg', 'role': 'Rie', 'name': 'Tozuka Rie'}, {'photo': 'http://img7.anidb.net/pics/anime/74664.jpg', 'role': 'Risa', 'name': 'Hayashi Saori'}, {'photo': 'http://img7.anidb.net/pics/anime/25743.jpg', 'role': 'Tandouji Aruma', 'name': 'Terashima Takuma'}, {'photo': 'http://img7.anidb.net/pics/anime/62583.jpg', 'role': 'Yamaguchi Ageha', 'name': 'Yamaguchi Rie'}, {'photo': 'http://img7.anidb.net/pics/anime/85893.jpg', 'role': 'Akasaki Nanami', 'name': 'Akasaki Chinatsu'}, {'photo': 'http://img7.anidb.net/pics/anime/29211.jpg', 'role': 'SP', 'name': 'Takabe Ai'}, {'photo': 'http://img7.anidb.net/pics/anime/148709.jpg', 'role': 'Aiba Aoi', 'name': 'Yahagi Sayuri'}], 'originally_available_at': datetime.date(2011, 7, 3), 'title': 'Sacred Seven', 'summary': 'In a port city in the Kantou region, there lives Tandouji Aruma who lives a lonely and solitary life. One day, he is approached by Aiba Ruri who asks for his help, for the power of the Sacred Seven which resides within Aruma. However, Aruma turns her away, since in the past, he had hurt people with that power, so he had forsworn using it.\nBut when the peaceful city is attacked by a monster, Aruma reluctantly decides to use the Sacred Seven. However, his powers go berserk and the situation becomes even more dire. At that moment, Ruri comes to his aid.\n~ translated and adapted from official site by Cranston', 'seasons': {'1': {'episodes': {'11': {'duration': 1500000, 'rating': 5.9, 'originally_available_at': '2011-09-09', 'title': 'Blade Sharpened'}, '10': {'duration': 1500000, 'rating': 6.81, 'originally_available_at': '2011-09-03', 'title': "Aoi's Memory"}, '12': {'duration': 1500000, 'rating': 8.17, 'originally_available_at': '2011-09-16', 'title': 'Sacred Seven'}, '1': {'duration': 1500000, 'rating': 5.77, 'originally_available_at': '2011-07-03', 'title': "Ishi's Awakening"}, '3': {'duration': 1500000, 'rating': 5.98, 'originally_available_at': '2011-07-17', 'title': 'Crazy Night'}, '2': {'duration': 1500000, 'rating': 4.83, 'originally_available_at': '2011-07-10', 'title': 'A Bond in the Colour of Ruri'}, '5': {'duration': 1500000, 'rating': 5.35, 'originally_available_at': '2011-07-31', 'title': "The Heart's Mirror"}, '4': {'duration': 1500000, 'rating': 6.64, 'originally_available_at': '2011-07-24', 'title': 'School Fair of Hell'}, '7': {'duration': 1500000, 'rating': 5.17, 'originally_available_at': '2011-08-14', 'title': 'The True Lightstone and Darkstone'}, '6': {'duration': 1500000, 'rating': 8.01, 'originally_available_at': '2011-08-07', 'title': 'One More Night'}, '9': {'duration': 1500000, 'rating': 5.35, 'originally_available_at': '2011-08-28', 'title': 'A Will Like a Rolling Stone'}, '8': {'duration': 1500000, 'rating': 7.87, 'originally_available_at': '2011-08-21', 'title': 'Show Me Your Devotion'}}}}, 'posters': {'http://img7.anidb.net/pics/anime/73004.jpg': ('AniDB/73004.jpg', 99, None)}}, 'Plex': {'themes': {'http://tvthemes.plexapp.com/249939.mp3': ('Plex/249939.mp3', 2, None)}}, 'MyAnimeList': {'posters': {'https://myanimelist.cdn-dena.com/images/anime/3/29747l.jpg': ('MyAnimeList/images/anime/3/29747l.jpg', 50, None), 'https://myanimelist.cdn-dena.com/images/anime/12/30218l.jpg': ('MyAnimeList/images/anime/12/30218l.jpg', 50, None), 'https://myanimelist.cdn-dena.com/images/anime/12/30218.jpg': ('MyAnimeList/images/anime/12/30218.jpg', 50, None), 'https://myanimelist.cdn-dena.com/images/anime/13/31863l.jpg': ('MyAnimeList/images/anime/13/31863l.jpg', 50, None), 'https://myanimelist.cdn-dena.com/images/anime/7/30597l.jpg': ('MyAnimeList/images/anime/7/30597l.jpg', 50, None), 'https://myanimelist.cdn-dena.com/images/anime/13/27990l.jpg': ('MyAnimeList/images/anime/13/27990l.jpg', 50, None)}, 'genres': ['Action', 'Sci-Fi', 'Super Power', 'School', 'Ended', 'Serie'], 'seasons': {'1': {'episodes': {'11': {'title': '', 'originally_available_at': ''}, '10': {'title': '', 'originally_available_at': ''}, '12': {'title': '', 'originally_available_at': ''}, '1': {'title': '', 'originally_available_at': ''}, '3': {'title': '', 'originally_available_at': ''}, '2': {'title': '', 'originally_available_at': ''}, '5': {'title': '', 'originally_available_at': ''}, '4': {'title': '', 'originally_available_at': ''}, '7': {'title': '', 'originally_available_at': ''}, '6': {'title': '', 'originally_available_at': ''}, '9': {'title': '', 'originally_available_at': ''}, '8': {'title': '', 'originally_available_at': ''}}}}}, 'tvdb4': {}, 'TheMovieDB': {'posters': {u'http://image.tmdb.org/t/p/original/XI8jIoTOKS6VkMhus8a3ixRk9Q.jpg': (u'XI8jIoTOKS6VkMhus8a3ixRk9Q.jpg', 90, u'http://image.tmdb.org/t/p/w300/XI8jIoTOKS6VkMhus8a3ixRk9Q.jpg')}, 'art': {u'http://image.tmdb.org/t/p/original/pAOKQqtgbHOfgpadnrvaRDorjQ9.jpg': (u'pAOKQqtgbHOfgpadnrvaRDorjQ9.jpg', 90, None)}}, 'TheTVDB': {'genres': ['Continuing'], 'art': {'http://thetvdb.com/banners/fanart/original/249939-1.jpg': ('TVDB/fanart/original/249939-1.jpg', 2, None)}, 'title': 'Sacred Seven', 'seasons': {'1': {'posters': {'http://thetvdb.com/banners/seasons/249939-1.jpg': ('TVDB/seasons/249939-1.jpg', 7, None), 'http://thetvdb.com/banners/seasons/249939-1-2.jpg': ('TVDB/seasons/249939-1-2.jpg', 6, None)}, 'episodes': {'11': {'rating': '', 'title': 'Blade Sharpened', 'originally_available_at': '2011-09-10', 'summary': 'Ruri was taken in to custody by Kenmi. Alma, Kagami and the entire Aiba Foundation declared war against Kenmi Group and rescued Ruri. Knight and Fei plans to use the vaccine on Zero to retain his mind and control over his Darkstone powers.', 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4167193.jpg': ('TVDB/episodes/4167193.jpg', 1, None)}}, '10': {'rating': '', 'title': "Aoi's Memory", 'originally_available_at': '2011-09-03', 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4163629.jpg': ('TVDB/episodes/4163629.jpg', 1, None)}}, '12': {'rating': '', 'title': 'Sacred Seven', 'originally_available_at': '2011-09-17', 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4170338.jpg': ('TVDB/episodes/4170338.jpg', 1, None)}}, '1': {'rating': '9.0', 'title': "The Stone's Awakening", 'originally_available_at': '2011-07-03', 'summary': "Tandouji Aruma, a 17 year old student who prefers to live away from others due to an incident in the past, is contacted by the mysterious Aiba Ruri to use the power of the Sacred Seven inside him to defeat a monster called 'Ashi' that has started to run amok near his home.  Due to Aruma's fear of hurting others again, he refuses to help.  When a fellow classmate Itoh Wakana gets caught up in the chaos, Aruma is forced to rescue her using the powers he vehemently hates. ", 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4125857.jpg': ('TVDB/episodes/4125857.jpg', 1, None)}}, '3': {'rating': '', 'title': 'The Crazy Knight', 'originally_available_at': '2011-07-17', 'summary': 'Ruri returns from London after buying a fine grade gemstone for Alma to use. During trip a routine trip home, she and her convoy is attacked by Knight, the one who caused the Darkstone incidents. Kenmi reveals his reasons of his research on the Sacred Seven and information on his history on Knight. ', 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4129316.jpg': ('TVDB/episodes/4129316.jpg', 1, None)}}, '2': {'rating': '9.0', 'title': 'A Bond in the Color of Ruri', 'originally_available_at': '2011-07-10', 'summary': "Even after using the power of the Sacred Seven to defeat the Medusa Ashi, Aruma still has doubts about whether that power can be used for good.  Even though Ruri explains to him how the Sacred Seven came to be, Aruma is not convinced he can help until he learns the true reason for Ruri's fight against the Ashi.  Using this conviction, Aruma sets out to fight a new Ashi that has appeared as a massive typhoon off the coast of Japan, but he never thought that he would have to learn to skydive...", 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4129216.jpg': ('TVDB/episodes/4129216.jpg', 1, None)}}, '5': {'rating': '', 'title': "The Heart's Mirror", 'originally_available_at': '2011-08-01', 'summary': 'Tandoji and the Geology Club went to a camp. There, Kagami and Tandoji found a darkstone and informed Ruri about it. They managed to defeat it without the geology club members knowing. ', 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4142907.jpg': ('TVDB/episodes/4142907.jpg', 1, None)}}, '4': {'rating': '', 'title': 'School Fair of Hell', 'originally_available_at': '2011-07-24', 'summary': "Ruri and Alma participate for the school fair. However, things turn worse when a few of Knight's Darkstone snakes cause problems. Wakana converses with Ruri to know her a little more. ", 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4138111.jpg': ('TVDB/episodes/4138111.jpg', 1, None)}}, '7': {'rating': '', 'title': 'The True Lightstone and Darkstone', 'originally_available_at': '2011-08-14', 'summary': "Alma and Ruri hears the dark truth of Kenmi's so called research from Knight. ", 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4151143.jpg': ('TVDB/episodes/4151143.jpg', 1, None)}}, '6': {'rating': '', 'title': 'One More Night', 'originally_available_at': '2011-08-07', 'summary': 'Ruri invites Alma to eat lunch with her. Alma feels very annoyed by Ruri. Knight kidnapped Ruri to get a serum that will help him control the darkstone in him. ', 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4147734.jpg': ('TVDB/episodes/4147734.jpg', 1, None)}}, '9': {'rating': '', 'title': 'Will Like a Rolling Stone', 'originally_available_at': '2011-08-29', 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4159893.jpg': ('TVDB/episodes/4159893.jpg', 1, None)}}, '8': {'rating': '', 'title': 'Show Me Your Devotion', 'originally_available_at': '2011-08-21', 'summary': "Confused as to whose side tells the truth, Ruri and Alma relfects on how they've become ignorant with what's really happening. Kagami vists an old aquaintance to look for further evidence concerning Kenmi's research facility, he was advised about the danger of trying to investigate Kenmi as he can eliminate them. Ruri visits Alma in his house and asked him to form a contract but Alma rejects it, Seeing the relationship between the two in turmoil, A partially fixed Hellbrick asked the two to go to kamakura to retrive a stone needed to completely fix him or he will die within 3 days but for the stone to glow Ruri and Alma must join hands. Ruri finally managed to tell Alma her worries which helped in developing their relationship further in hopes that the stone will glow. Alma proceeds to take Ruri to his hometown where he used to live with his mother and has told her the pain he endured as a result of having his powers, Ruri told him that they actually met when they were young after Alma saved her from a falling construction material on their school which he didn't remember. with the stone still not glowing, The two spent their time on the beach and went to Ruri's Mansion only to find out that hellbrick has been fixed and the date was just a setup to further improve their relationship. ", 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4156154.jpg': ('TVDB/episodes/4156154.jpg', 1, None)}}}}, '0': {'episodes': {'1': {'rating': '', 'title': 'Shirogane no Tsubasa', 'originally_available_at': '2012-01-07', 'guest_stars': '', 'directors': '', 'writers': '', 'thumbs': {'http://thetvdb.com/banners/episodes/249939/4716257.jpg': ('TVDB/episodes/4716257.jpg', 1, None)}}, '2': {'rating': '', 'directors': '', 'writers': '', 'guest_stars': '', 'title': 'Picture Drama'}}}}, 'posters': {'http://thetvdb.com/banners/posters/249939-2.jpg': ('TVDB/posters/249939-2.jpg', 4, None), 'http://thetvdb.com/banners/posters/249939-1.jpg': ('TVDB/posters/249939-1.jpg', 2, None), 'http://thetvdb.com/banners/posters/249939-3.jpg': ('TVDB/posters/249939-3.jpg', 1, None)}, 'banners': {'http://thetvdb.com/banners/graphical/249939-g2.jpg': ('TVDB/graphical/249939-g2.jpg', 9, None), 'http://thetvdb.com/banners/graphical/249939-g.jpg': ('TVDB/graphical/249939-g.jpg', 8, None)}}}
2017-02-27 17:10:21,900 (-bfee4c0/common         /UpdateMeta        / 378) INFO     - AnimeLists       : studio                  (  1)
2017-02-27 17:10:21,900 (-bfee4c0/common         /UpdateMeta        / 378) INFO     - TVTunes          : themes                  (  1)
2017-02-27 17:10:21,901 (-bfee4c0/common         /UpdateMeta        / 378) INFO     - AniDB            : rating                  (  1) | genres                  ( 12) | roles                   ( 21) | originally_available_at (  1) | title                   (  1) | summary                 (  1) | seasons                 (  1) | posters                 (  1)
2017-02-27 17:10:21,902 (-bfee4c0/common         /UpdateMeta        / 392) INFO       - Episodes  ( 12): duration                ( 12) | rating                  ( 12) | title                   ( 12) | originally_available_at ( 12)
2017-02-27 17:10:21,902 (-bfee4c0/common         /UpdateMeta        / 378) INFO     - Plex             : themes                  (  1)
2017-02-27 17:10:21,903 (-bfee4c0/common         /UpdateMeta        / 378) INFO     - MyAnimeList      : posters                 (  6) | genres                  (  6) | seasons                 (  1)
2017-02-27 17:10:21,903 (-bfee4c0/common         /UpdateMeta        / 392) INFO       - Episodes  ( 12): originally_available_at ( 12) | title                   ( 12)
2017-02-27 17:10:21,904 (-bfee4c0/common         /UpdateMeta        / 378) INFO     - TheMovieDB       : posters                 (  1) | art                     (  1)
2017-02-27 17:10:21,905 (-bfee4c0/common         /UpdateMeta        / 378) INFO     - TheTVDB          : genres                  (  1) | art                     (  1) | title                   (  1) | seasons                 (  2) | posters                 (  3) | banners                 (  2)
2017-02-27 17:10:21,905 (-bfee4c0/common         /UpdateMeta        / 391) INFO       - Seasons   (  2): posters                 (  1)
2017-02-27 17:10:21,906 (-bfee4c0/common         /UpdateMeta        / 392) INFO       - Episodes  ( 14): rating                  ( 14) | originally_available_at ( 13) | title                   ( 14) | summary                 (  9) | guest_stars             ( 14) | directors               ( 14) | writers                 ( 14) | thumbs                  ( 13)
2017-02-27 17:10:21,906 (-bfee4c0/common         /UpdateMeta        / 393) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:21,907 (-bfee4c0/common         /UpdateMeta        / 395) INFO     Plex.UpdateMeta() - Metadata Fields
2017-02-27 17:10:21,907 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] rating                         Type: float                 Source: AniDB        Value: '3.44'
2017-02-27 17:10:21,908 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] genres                   (12)  Type: list                  Source: AniDB        Value: '['Super power', 'Earth', 'Japan', 'Slow when it comes to love', 'Asia', 'Action', 'Science fiction', 'Henshin', 'Ecchi', 'Conspiracy', 'Parental abandonment', 'Ended']'
2017-02-27 17:10:21,908 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] art                      ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/fanart/original/249939-1.jpg': ('TVDB/fanart/original/249939-1.jpg', 2, None)}'
2017-02-27 17:10:21,910 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] roles                    (21)  Type: list                  Source: AniDB        Value: '[{'photo': 'http://img7.anidb.net/pics/anime/25743.jpg', 'role': 'Tandouji Aruma', 'name': 'Terashima Takuma'}, {'photo': 'http://img7.anidb.net/pics/anime/33609.jpg', 'role': 'Kijima Naito', 'name': 'Okamoto Nobuhiko'}, {'photo': 'http://img7.anidb.net/pics/anime/30429.jpg', 'role': 'Fei', 'name': 'Nomizu Iori'}, {'photo': 'http://img7.anidb.net/pics/anime/37799.jpg', 'role': 'Aiba Ruri', 'name': 'Nakajima Megumi'}, {'photo': 'http://img7.anidb.net/pics/anime/23192.jpg', 'role': 'Itou Wakana', 'name': 'Itou Kanae'}, {'photo': 'http://img7.anidb.net/pics/anime/188456.jpg', 'role': 'Kenmi Yuuji', 'name': 'Konishi Katsuyuki'}, {'photo': 'http://img7.anidb.net/pics/anime/17419.jpg', 'role': 'Kagami Makoto', 'name': 'Irino Miyu'}, {'photo': 'http://img7.anidb.net/pics/anime/186900.jpg', 'role': 'Onigawara', 'name': 'Ookawa Tooru'}, {'photo': 'http://img7.anidb.net/pics/anime/157190.jpg', 'role': 'Ami', 'name': 'Nanase Ami'}, {'photo': 'http://img7.anidb.net/pics/anime/74664.jpg', 'role': 'Saori', 'name': 'Hayashi Saori'}, {'photo': 'http://img7.anidb.net/pics/anime/25937.jpg', 'role': 'Shiori', 'name': 'Mikami Shiori'}, {'photo': 'http://img7.anidb.net/pics/anime/134453.jpg', 'role': 'Manami', 'name': 'Tanaka Manami'}, {'photo': 'http://img7.anidb.net/pics/anime/74734.jpg', 'role': 'Miho', 'name': 'Nakano Miho'}, {'photo': 'http://img7.anidb.net/pics/anime/161653.jpg', 'role': 'Yumiko', 'name': 'Fujita Yumiko'}, {'photo': 'http://img7.anidb.net/pics/anime/23720.jpg', 'role': 'Rie', 'name': 'Tozuka Rie'}, {'photo': 'http://img7.anidb.net/pics/anime/74664.jpg', 'role': 'Risa', 'name': 'Hayashi Saori'}, {'photo': 'http://img7.anidb.net/pics/anime/25743.jpg', 'role': 'Tandouji Aruma', 'name': 'Terashima Takuma'}, {'photo': 'http://img7.anidb.net/pics/anime/62583.jpg', 'role': 'Yamaguchi Ageha', 'name': 'Yamaguchi Rie'}, {'photo': 'http://img7.anidb.net/pics/anime/85893.jpg', 'role': 'Akasaki Nanami', 'name': 'Akasaki Chinatsu'}, {'photo': 'http://img7.anidb.net/pics/anime/29211.jpg', 'role': 'SP', 'name': 'Takabe Ai'}, {'photo': 'http://img7.anidb.net/pics/anime/148709.jpg', 'role': 'Aiba Aoi', 'name': 'Yahagi Sayuri'}]'
2017-02-27 17:10:21,910 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] title                          Type: str                   Source: AniDB        Value: 'Sacred Seven'
2017-02-27 17:10:21,911 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] summary                        Type: str                   Source: AniDB        Value: 'In a port city in the Kantou region, there lives Tandouji Aruma who lives a lone..'
2017-02-27 17:10:21,911 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] themes                   ( 1)  Type: dict                  Source: TVTunes      Value: '{'http://www.televisiontunes.com/uploads/audio/Sacred Seven.mp3': ('TelevisionTunes/Sacred Seven.mp3', 1, None)}'
2017-02-27 17:10:21,920 (-bfee4c0/networking     /load              / 166) DEBUG    Requesting 'http://www.televisiontunes.com/uploads/audio/Sacred Seven.mp3'
2017-02-27 17:10:22,655 (-bfee4c0/networking     /load              / 219) ERROR    Error opening URL 'http://www.televisiontunes.com/uploads/audio/Sacred Seven.mp3'
2017-02-27 17:10:22,655 (-bfee4c0/common         /metadata_download / 222) ERROR    error downloading, Exception: 'HTTP Error 404: Not Found'
2017-02-27 17:10:22,656 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [2] themes                   ( 1)  Type: dict                  Source: Plex         Value: '{'http://tvthemes.plexapp.com/249939.mp3': ('Plex/249939.mp3', 2, None)}'
2017-02-27 17:10:22,709 (-bfee4c0/networking     /load              / 166) DEBUG    Requesting 'http://tvthemes.plexapp.com/249939.mp3'
2017-02-27 17:10:23,217 (-bfee4c0/networking     /load              / 219) ERROR    Error opening URL 'http://tvthemes.plexapp.com/249939.mp3'
2017-02-27 17:10:23,217 (-bfee4c0/common         /metadata_download / 222) ERROR    error downloading, Exception: 'HTTP Error 404: Not Found'
2017-02-27 17:10:23,218 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] posters                  ( 3)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/posters/249939-2.jpg': ('TVDB/posters/249939-2.jpg', 4, None), 'http://thetvdb.com/banners/posters/249939-1.jpg': ('TVDB/posters/249939-1.jpg', 2, None), 'http://thetvdb.com/banners/posters/249939-3.jpg': ('TVDB/posters/249939-3.jpg', 1, None)}'
2017-02-27 17:10:23,219 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] posters                  ( 6)  Type: dict                  Source: MyAnimeList  Value: '{'https://myanimelist.cdn-dena.com/images/anime/3/29747l.jpg': ('MyAnimeList/images/anime/3/29747l.jpg', 50, None), 'https://myanimelist.cdn-dena.com/images/anime/12/30218l.jpg': ('MyAnimeList/images/anime/12/30218l.jpg', 50, None), 'https://myanimelist.cdn-dena.com/images/anime/12/30218.jpg': ('MyAnimeList/images/anime/12/30218.jpg', 50, None), 'https://myanimelist.cdn-dena.com/images/anime/13/31863l.jpg': ('MyAnimeList/images/anime/13/31863l.jpg', 50, None), 'https://myanimelist.cdn-dena.com/images/anime/7/30597l.jpg': ('MyAnimeList/images/anime/7/30597l.jpg', 50, None), 'https://myanimelist.cdn-dena.com/images/anime/13/27990l.jpg': ('MyAnimeList/images/anime/13/27990l.jpg', 50, None)}'
2017-02-27 17:10:23,219 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [4] posters                  ( 1)  Type: dict                  Source: TheMovieDB   Value: '{u'http://image.tmdb.org/t/p/original/XI8jIoTOKS6VkMhus8a3ixRk9Q.jpg': (u'XI8jIoTOKS6VkMhus8a3ixRk9Q.jpg', 90, u'http://image.tmdb.org/t/p/w300/XI8jIoTOKS6VkMhus8a3ixRk9Q.jpg')}'
2017-02-27 17:10:23,309 (-bfee4c0/networking     /load              / 166) DEBUG    Requesting 'http://image.tmdb.org/t/p/w300/XI8jIoTOKS6VkMhus8a3ixRk9Q.jpg'
2017-02-27 17:10:23,828 (-bfee4c0/networking     /load              / 198) DEBUG    Not caching 'http://image.tmdb.org/t/p/w300/XI8jIoTOKS6VkMhus8a3ixRk9Q.jpg' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2017-02-27 17:10:23,828 (-bfee4c0/common         /SaveFile          / 163) DEBUG    SaveFile() - CachePath: '/volume1/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems', file: 'XI8jIoTOKS6VkMhus8a3ixRk9Q.jpg', directory(ies) were present
2017-02-27 17:10:23,829 (-bfee4c0/common         /metadata_download / 227) INFO     url: 'http://image.tmdb.org/t/p/original/XI8jIoTOKS6VkMhus8a3ixRk9Q.jpg', num: '90', filename: 'XI8jIoTOKS6VkMhus8a3ixRk9Q.jpg', DownloadedSaved locally
2017-02-27 17:10:23,830 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] posters                  ( 1)  Type: dict                  Source: AniDB        Value: '{'http://img7.anidb.net/pics/anime/73004.jpg': ('AniDB/73004.jpg', 99, None)}'
2017-02-27 17:10:23,831 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] banners                  ( 2)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/graphical/249939-g2.jpg': ('TVDB/graphical/249939-g2.jpg', 9, None), 'http://thetvdb.com/banners/graphical/249939-g.jpg': ('TVDB/graphical/249939-g.jpg', 8, None)}'
2017-02-27 17:10:23,847 (-bfee4c0/networking     /load              / 166) DEBUG    Requesting 'http://thetvdb.com/banners/graphical/249939-g2.jpg'
2017-02-27 17:10:23,936 (-bfee4c0/networking     /load              / 198) DEBUG    Not caching 'http://thetvdb.com/banners/graphical/249939-g2.jpg' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2017-02-27 17:10:23,936 (-bfee4c0/common         /SaveFile          / 163) DEBUG    SaveFile() - CachePath: '/volume1/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems', file: 'TVDB/graphical/249939-g2.jpg', directory(ies) were present
2017-02-27 17:10:23,938 (-bfee4c0/common         /metadata_download / 227) INFO     url: 'http://thetvdb.com/banners/graphical/249939-g2.jpg', num: '9', filename: 'TVDB/graphical/249939-g2.jpg', DownloadedSaved locally
2017-02-27 17:10:23,986 (-bfee4c0/networking     /load              / 166) DEBUG    Requesting 'http://thetvdb.com/banners/graphical/249939-g.jpg'
2017-02-27 17:10:24,498 (-bfee4c0/networking     /load              / 198) DEBUG    Not caching 'http://thetvdb.com/banners/graphical/249939-g.jpg' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2017-02-27 17:10:24,499 (-bfee4c0/common         /SaveFile          / 163) DEBUG    SaveFile() - CachePath: '/volume1/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems', file: 'TVDB/graphical/249939-g.jpg', directory(ies) were present
2017-02-27 17:10:24,500 (-bfee4c0/common         /metadata_download / 227) INFO     url: 'http://thetvdb.com/banners/graphical/249939-g.jpg', num: '8', filename: 'TVDB/graphical/249939-g.jpg', DownloadedSaved locally
2017-02-27 17:10:24,501 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] originally_available_at        Type: date                  Source: AniDB        Value: '2011-07-03'
2017-02-27 17:10:24,501 (-bfee4c0/common         /UpdateMeta        / 406) INFO     metadata.seasons[ 1].
2017-02-27 17:10:24,502 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] posters                  ( 2)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/seasons/249939-1.jpg': ('TVDB/seasons/249939-1.jpg', 7, None), 'http://thetvdb.com/banners/seasons/249939-1-2.jpg': ('TVDB/seasons/249939-1-2.jpg', 6, None)}'
2017-02-27 17:10:24,503 (-bfee4c0/common         /UpdateMeta        / 416) INFO     [#] art                            Type: ProxyContainerObject
2017-02-27 17:10:24,503 (-bfee4c0/common         /UpdateMeta        / 416) INFO     [#] summary                        Type: NoneType            
2017-02-27 17:10:24,504 (-bfee4c0/common         /UpdateMeta        / 420) INFO     metadata.seasons[ 1].episodes[  1].
2017-02-27 17:10:24,505 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] rating                         Type: float                 Source: AniDB        Value: '5.77'
2017-02-27 17:10:24,506 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] originally_available_at        Type: date                  Source: TheTVDB      Value: '2011-07-03'
2017-02-27 17:10:24,507 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] title                          Type: str                   Source: TheTVDB      Value: 'The Stone's Awakening'
2017-02-27 17:10:24,507 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] summary                        Type: str                   Source: TheTVDB      Value: 'Tandouji Aruma, a 17 year old student who prefers to live away from others due t..'
2017-02-27 17:10:24,508 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] producers                      Type: SetObject           
2017-02-27 17:10:24,509 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] guest_stars                    Type: SetObject           
2017-02-27 17:10:24,509 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] directors                      Type: SetObject           
2017-02-27 17:10:24,510 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] writers                        Type: SetObject           
2017-02-27 17:10:24,510 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] thumbs                   ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/episodes/249939/4125857.jpg': ('TVDB/episodes/4125857.jpg', 1, None)}'
2017-02-27 17:10:24,511 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] duration                       Type: int                   Source: AniDB        Value: '1500000'
2017-02-27 17:10:24,511 (-bfee4c0/common         /UpdateMeta        / 420) INFO     metadata.seasons[ 1].episodes[  2].
2017-02-27 17:10:24,512 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] rating                         Type: float                 Source: AniDB        Value: '4.83'
2017-02-27 17:10:24,512 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] originally_available_at        Type: date                  Source: TheTVDB      Value: '2011-07-10'
2017-02-27 17:10:24,513 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] title                          Type: str                   Source: TheTVDB      Value: 'A Bond in the Color of Ruri'
2017-02-27 17:10:24,514 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] summary                        Type: str                   Source: TheTVDB      Value: 'Even after using the power of the Sacred Seven to defeat the Medusa Ashi, Aruma ..'
2017-02-27 17:10:24,514 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] producers                      Type: SetObject           
2017-02-27 17:10:24,515 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] guest_stars                    Type: SetObject           
2017-02-27 17:10:24,515 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] directors                      Type: SetObject           
2017-02-27 17:10:24,516 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] writers                        Type: SetObject           
2017-02-27 17:10:24,516 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] thumbs                   ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/episodes/249939/4129216.jpg': ('TVDB/episodes/4129216.jpg', 1, None)}'
2017-02-27 17:10:24,517 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] duration                       Type: int                   Source: AniDB        Value: '1500000'
2017-02-27 17:10:24,517 (-bfee4c0/common         /UpdateMeta        / 420) INFO     metadata.seasons[ 1].episodes[  3].
2017-02-27 17:10:24,518 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] rating                         Type: float                 Source: AniDB        Value: '5.98'
2017-02-27 17:10:24,518 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] originally_available_at        Type: date                  Source: TheTVDB      Value: '2011-07-17'
2017-02-27 17:10:24,519 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] title                          Type: str                   Source: TheTVDB      Value: 'The Crazy Knight'
2017-02-27 17:10:24,520 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] summary                        Type: str                   Source: TheTVDB      Value: 'Ruri returns from London after buying a fine grade gemstone for Alma to use. Dur..'
2017-02-27 17:10:24,520 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] producers                      Type: SetObject           
2017-02-27 17:10:24,521 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] guest_stars                    Type: SetObject           
2017-02-27 17:10:24,521 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] directors                      Type: SetObject           
2017-02-27 17:10:24,522 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] writers                        Type: SetObject           
2017-02-27 17:10:24,522 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] thumbs                   ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/episodes/249939/4129316.jpg': ('TVDB/episodes/4129316.jpg', 1, None)}'
2017-02-27 17:10:24,523 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] duration                       Type: int                   Source: AniDB        Value: '1500000'
2017-02-27 17:10:24,523 (-bfee4c0/common         /UpdateMeta        / 420) INFO     metadata.seasons[ 1].episodes[  4].
2017-02-27 17:10:24,524 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] rating                         Type: float                 Source: AniDB        Value: '6.64'
2017-02-27 17:10:24,524 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] originally_available_at        Type: date                  Source: TheTVDB      Value: '2011-07-24'
2017-02-27 17:10:24,525 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] title                          Type: str                   Source: TheTVDB      Value: 'School Fair of Hell'
2017-02-27 17:10:24,526 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] summary                        Type: str                   Source: TheTVDB      Value: 'Ruri and Alma participate for the school fair. However, things turn worse when a..'
2017-02-27 17:10:24,526 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] producers                      Type: SetObject           
2017-02-27 17:10:24,527 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] guest_stars                    Type: SetObject           
2017-02-27 17:10:24,527 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] directors                      Type: SetObject           
2017-02-27 17:10:24,528 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] writers                        Type: SetObject           
2017-02-27 17:10:24,528 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] thumbs                   ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/episodes/249939/4138111.jpg': ('TVDB/episodes/4138111.jpg', 1, None)}'
2017-02-27 17:10:24,529 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] duration                       Type: int                   Source: AniDB        Value: '1500000'
2017-02-27 17:10:24,529 (-bfee4c0/common         /UpdateMeta        / 420) INFO     metadata.seasons[ 1].episodes[  5].
2017-02-27 17:10:24,530 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] rating                         Type: float                 Source: AniDB        Value: '5.35'
2017-02-27 17:10:24,530 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] originally_available_at        Type: date                  Source: TheTVDB      Value: '2011-08-01'
2017-02-27 17:10:24,531 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] title                          Type: str                   Source: TheTVDB      Value: 'The Heart's Mirror'
2017-02-27 17:10:24,532 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] summary                        Type: str                   Source: TheTVDB      Value: 'Tandoji and the Geology Club went to a camp. There, Kagami and Tandoji found a d..'
2017-02-27 17:10:24,532 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] producers                      Type: SetObject           
2017-02-27 17:10:24,533 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] guest_stars                    Type: SetObject           
2017-02-27 17:10:24,533 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] directors                      Type: SetObject           
2017-02-27 17:10:24,534 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] writers                        Type: SetObject           
2017-02-27 17:10:24,534 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] thumbs                   ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/episodes/249939/4142907.jpg': ('TVDB/episodes/4142907.jpg', 1, None)}'
2017-02-27 17:10:24,535 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] duration                       Type: int                   Source: AniDB        Value: '1500000'
2017-02-27 17:10:24,535 (-bfee4c0/common         /UpdateMeta        / 420) INFO     metadata.seasons[ 1].episodes[  6].
2017-02-27 17:10:24,536 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] rating                         Type: float                 Source: AniDB        Value: '8.01'
2017-02-27 17:10:24,537 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] originally_available_at        Type: date                  Source: TheTVDB      Value: '2011-08-07'
2017-02-27 17:10:24,537 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] title                          Type: str                   Source: TheTVDB      Value: 'One More Night'
2017-02-27 17:10:24,538 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] summary                        Type: str                   Source: TheTVDB      Value: 'Ruri invites Alma to eat lunch with her. Alma feels very annoyed by Ruri. Knight..'
2017-02-27 17:10:24,539 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] producers                      Type: SetObject           
2017-02-27 17:10:24,539 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] guest_stars                    Type: SetObject           
2017-02-27 17:10:24,539 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] directors                      Type: SetObject           
2017-02-27 17:10:24,540 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] writers                        Type: SetObject           
2017-02-27 17:10:24,540 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] thumbs                   ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/episodes/249939/4147734.jpg': ('TVDB/episodes/4147734.jpg', 1, None)}'
2017-02-27 17:10:24,541 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] duration                       Type: int                   Source: AniDB        Value: '1500000'
2017-02-27 17:10:24,541 (-bfee4c0/common         /UpdateMeta        / 420) INFO     metadata.seasons[ 1].episodes[  7].
2017-02-27 17:10:24,542 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] rating                         Type: float                 Source: AniDB        Value: '5.17'
2017-02-27 17:10:24,543 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] originally_available_at        Type: date                  Source: TheTVDB      Value: '2011-08-14'
2017-02-27 17:10:24,543 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] title                          Type: str                   Source: TheTVDB      Value: 'The True Lightstone and Darkstone'
2017-02-27 17:10:24,544 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] summary                        Type: str                   Source: TheTVDB      Value: 'Alma and Ruri hears the dark truth of Kenmi's so called research from Knight. '
2017-02-27 17:10:24,545 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] producers                      Type: SetObject           
2017-02-27 17:10:24,545 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] guest_stars                    Type: SetObject           
2017-02-27 17:10:24,545 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] directors                      Type: SetObject           
2017-02-27 17:10:24,546 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] writers                        Type: SetObject           
2017-02-27 17:10:24,546 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] thumbs                   ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/episodes/249939/4151143.jpg': ('TVDB/episodes/4151143.jpg', 1, None)}'
2017-02-27 17:10:24,547 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] duration                       Type: int                   Source: AniDB        Value: '1500000'
2017-02-27 17:10:24,547 (-bfee4c0/common         /UpdateMeta        / 420) INFO     metadata.seasons[ 1].episodes[  8].
2017-02-27 17:10:24,548 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] rating                         Type: float                 Source: AniDB        Value: '7.87'
2017-02-27 17:10:24,549 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] originally_available_at        Type: date                  Source: TheTVDB      Value: '2011-08-21'
2017-02-27 17:10:24,549 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] title                          Type: str                   Source: TheTVDB      Value: 'Show Me Your Devotion'
2017-02-27 17:10:24,550 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] summary                        Type: str                   Source: TheTVDB      Value: 'Confused as to whose side tells the truth, Ruri and Alma relfects on how they've..'
2017-02-27 17:10:24,551 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] producers                      Type: SetObject           
2017-02-27 17:10:24,551 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] guest_stars                    Type: SetObject           
2017-02-27 17:10:24,551 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] directors                      Type: SetObject           
2017-02-27 17:10:24,552 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] writers                        Type: SetObject           
2017-02-27 17:10:24,552 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] thumbs                   ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/episodes/249939/4156154.jpg': ('TVDB/episodes/4156154.jpg', 1, None)}'
2017-02-27 17:10:24,553 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] duration                       Type: int                   Source: AniDB        Value: '1500000'
2017-02-27 17:10:24,553 (-bfee4c0/common         /UpdateMeta        / 420) INFO     metadata.seasons[ 1].episodes[  9].
2017-02-27 17:10:24,554 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] rating                         Type: float                 Source: AniDB        Value: '5.35'
2017-02-27 17:10:24,555 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] originally_available_at        Type: date                  Source: TheTVDB      Value: '2011-08-29'
2017-02-27 17:10:24,555 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] title                          Type: str                   Source: TheTVDB      Value: 'Will Like a Rolling Stone'
2017-02-27 17:10:24,556 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] summary                        Type: NoneType            
2017-02-27 17:10:24,556 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] producers                      Type: SetObject           
2017-02-27 17:10:24,557 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] guest_stars                    Type: SetObject           
2017-02-27 17:10:24,557 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] directors                      Type: SetObject           
2017-02-27 17:10:24,558 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] writers                        Type: SetObject           
2017-02-27 17:10:24,558 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] thumbs                   ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/episodes/249939/4159893.jpg': ('TVDB/episodes/4159893.jpg', 1, None)}'
2017-02-27 17:10:24,559 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] duration                       Type: int                   Source: AniDB        Value: '1500000'
2017-02-27 17:10:24,559 (-bfee4c0/common         /UpdateMeta        / 420) INFO     metadata.seasons[ 1].episodes[ 10].
2017-02-27 17:10:24,560 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] rating                         Type: float                 Source: AniDB        Value: '6.81'
2017-02-27 17:10:24,561 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] originally_available_at        Type: date                  Source: TheTVDB      Value: '2011-09-03'
2017-02-27 17:10:24,561 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] title                          Type: str                   Source: TheTVDB      Value: 'Aoi's Memory'
2017-02-27 17:10:24,562 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] summary                        Type: NoneType            
2017-02-27 17:10:24,562 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] producers                      Type: SetObject           
2017-02-27 17:10:24,563 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] guest_stars                    Type: SetObject           
2017-02-27 17:10:24,563 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] directors                      Type: SetObject           
2017-02-27 17:10:24,564 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] writers                        Type: SetObject           
2017-02-27 17:10:24,564 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] thumbs                   ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/episodes/249939/4163629.jpg': ('TVDB/episodes/4163629.jpg', 1, None)}'
2017-02-27 17:10:24,565 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] duration                       Type: int                   Source: AniDB        Value: '1500000'
2017-02-27 17:10:24,565 (-bfee4c0/common         /UpdateMeta        / 420) INFO     metadata.seasons[ 1].episodes[ 11].
2017-02-27 17:10:24,566 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] rating                         Type: float                 Source: AniDB        Value: '5.9'
2017-02-27 17:10:24,566 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] originally_available_at        Type: date                  Source: TheTVDB      Value: '2011-09-10'
2017-02-27 17:10:24,567 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] title                          Type: str                   Source: TheTVDB      Value: 'Blade Sharpened'
2017-02-27 17:10:24,568 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] summary                        Type: str                   Source: TheTVDB      Value: 'Ruri was taken in to custody by Kenmi. Alma, Kagami and the entire Aiba Foundati..'
2017-02-27 17:10:24,568 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] producers                      Type: SetObject           
2017-02-27 17:10:24,569 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] guest_stars                    Type: SetObject           
2017-02-27 17:10:24,569 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] directors                      Type: SetObject           
2017-02-27 17:10:24,570 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] writers                        Type: SetObject           
2017-02-27 17:10:24,570 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] thumbs                   ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/episodes/249939/4167193.jpg': ('TVDB/episodes/4167193.jpg', 1, None)}'
2017-02-27 17:10:24,571 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] duration                       Type: int                   Source: AniDB        Value: '1500000'
2017-02-27 17:10:24,571 (-bfee4c0/common         /UpdateMeta        / 420) INFO     metadata.seasons[ 1].episodes[ 12].
2017-02-27 17:10:24,572 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] rating                         Type: float                 Source: AniDB        Value: '8.17'
2017-02-27 17:10:24,572 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] originally_available_at        Type: date                  Source: TheTVDB      Value: '2011-09-17'
2017-02-27 17:10:24,573 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] title                          Type: str                   Source: TheTVDB      Value: 'Sacred Seven'
2017-02-27 17:10:24,573 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] summary                        Type: NoneType            
2017-02-27 17:10:24,574 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] producers                      Type: SetObject           
2017-02-27 17:10:24,574 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] guest_stars                    Type: SetObject           
2017-02-27 17:10:24,575 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] directors                      Type: SetObject           
2017-02-27 17:10:24,575 (-bfee4c0/common         /UpdateMeta        / 432) INFO     [#] writers                        Type: SetObject           
2017-02-27 17:10:24,576 (-bfee4c0/common         /UpdateMetaField   / 365) INFO     [=] thumbs                   ( 1)  Type: dict                  Source: TheTVDB      Value: '{'http://thetvdb.com/banners/episodes/249939/4170338.jpg': ('TVDB/episodes/4170338.jpg', 1, None)}'
2017-02-27 17:10:24,576 (-bfee4c0/common         /UpdateMetaField   / 354) INFO     [1] duration                       Type: int                   Source: AniDB        Value: '1500000'
2017-02-27 17:10:24,577 (-bfee4c0/common         /UpdateMeta        / 433) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-02-27 17:10:24,746 (-bfee4c0/model          /_serialize        / 229) DEBUG    Serializing to /volume1/Plex/Library/Application Support/Plex Media Server/Metadata/TV Shows/f/3f6355f9711435540e4844b3167d30c4633901a.bundle/Contents/com.plexapp.agents.hama/Info.xml
2017-02-27 17:10:24,751 (-bfee4c0/runtime        /return_state_data /  88) DEBUG    Sending packed state data (2032 bytes)
2017-02-27 17:10:24,752 (-bfee4c0/runtime        /handle_request    / 924) DEBUG    Response: [200] str, 16 bytes
sven-7 commented 7 years ago

I'll try it again to make sure I'm using the right beta, but the one I used was from the was from 19 hours ago from this posting.

ZeroQI commented 7 years ago

i updated this morning before lunch... Been intensively coding and correcting few issues yesterday also middle of the night.... Please let me know

KingJ commented 7 years ago

Just given the Beta version a try on my Windows 'dev' instance of PMS (1.4.2). I'm amazed just how quick the plugin runs now! The issues I encountered were;

2017-02-27 21:27:50,405 (9a68/core /log_exception / 574) CRITICAL Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://anidb-5406?lang=en' (most recent call last): File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update agent.update(obj, media, lang, **kwargs) File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code__init.py", line 96, in update def update (self, metadata, media, lang, force ): Update (metadata, media, lang, force, False) File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\init.py", line 89, in Update common.UpdateMeta(metadata, media, movie, MetaSources) File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py", line 400, in UpdateMeta UpdateMetaField(metadata, metadata, MetaSources[meta_source], Moviepriority if movie else SeriePriority, meta_field, meta_source, movie) File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py", line 365, in UpdateMetaField try: setattr(metadata, meta_field, meta_new) File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py", line 223, in metadata_download if file: status += ", Downloaded"; SaveFile(filename, file); status += "Saved locally" File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py", line 165, in SaveFile Data.Save(relativeFilename, file) File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\datakit.py", line 200, in Save return self._core.storage.save_data_item(item, data) File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\storage.py", line 226, in save_data_item self.save(self.data_item_path(itemname), data) File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\storage.py", line 81, in save f = open(tempfile, mode) File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\subsystem\ospathfix.py", line 70, in builtins_open return builtins__'_open', mode, buffering) IOError: [Errno 2] No such file or directory: u'\\?\C:\Users\Username\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.agents.hama\DataItems\MyAnimeList\images\anime\13\._22587l.jpg'

- Movie scanning crashes on line 71 of __init__.py as the log message attempts to access the seasons attribute which doesn't exist;

2017-02-27 21:30:11,927 (679c/core /log_exception / 574) CRITICAL Exception in the update function of agent named 'HamaMovies', called with guid 'com.plexapp.agents.hama://anidb-7258?lang=en' (most recent call last): File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update agent.update(obj, media, lang, **kwargs) File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code__init.py", line 102, in update def update (self, metadata, media, lang, force ): Update (metadata, media, lang, force, True) File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\init__.py", line 71, in Update Log.Info("Update() - metadata.id: '%s', Title: '%s', lang: '%s', force: '%s', movie: '%s', max(media.seasons.keys()): '%s'" % (metadata.id, metadata.title, lang, force, movie, str(max(int(x) for x in media.seasons.keys())>1))) AttributeError: 'MediaTree' object has no attribute 'seasons'



I couldn't get much further with the testing due to the crashes, but it's looking really good otherwise! 👍 
ZeroQI commented 7 years ago

@KingJ very good feedback, thanks

time import added. weird no alert on synology... movie done, small '"" if movie else' added, hardly ever test movie library to be fair...

if os.path.exists(fullpathDirectory) was true as the below was written: SaveFile() - CachePath: 'C:\Users\Username\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.agents.hama\DataItems', file: 'MyAnimeList/images/anime/13/22587l.jpg', directory(ies) were present

'\\?\C:\Users\Username\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.agents.hama\DataItems\MyAnimeList\images\anime\13\._22587l.jpg'

added "Ookami to Koushinryou" and MyAnimeList doesn't crash on my synology plex... entry added to dict: {'https://myanimelist.cdn-dena.com/images/anime/13/22587l.jpg': ('MyAnimeList/images/anime/13/22587l.jpg', 50, None), can you check if the folder indeed exist and if the file was created or if a file can be created there... Possible the issue is the filename starting with "._" which i don't get...

improved data save error handling and reporting, please try again with updated: https://github.com/ZeroQI/Hama.bundle/releases/download/Beta/Hama.bundle.zip

Also added filelist to the agent logs, found it quite practical... How do you find the new logging style ? I really worked on the log output...

You are saying it is faster ??? strange, i have no threading done yet...

Dingmatt commented 7 years ago

@ZeroQI I've noticed that the new caching process helps greatly with the speed.

ZeroQI commented 7 years ago

@Dingmatt: instead of just using as fallback, it caches all json+xml, so it make sense, that's thanks to your code...

Load and xmlfrom url got merged, GetAnimeTitleByName got fixes.... episode.Absolute_Index, what's plex use of this field? You put the priority in the Preferences ? Might steal that (again, but i did the priority structure so it's only fair) :D

Dingmatt commented 7 years ago

@ZeroQI for episode.Absolute_Index I'm not exactly sure yet but it seems to be in the objects, It might be something to do with the new episode ordering options; I'm going to play around with it to find out once I've got the new AMSA image parsing code up and running.

AMSA's always had datasource priority (it's the reason it was originally forked from HAMA lol) but it makes sense to expose it to the user so they can customize things.

sven-7 commented 7 years ago

I'm running a test now on a full refresh, with Sacred Seven.

One thing I have noticed -- for some reason a picture keeps getting put in the top directory in \Plug-in Support\Data\com.plexapp.agents.hama\DataItems\

See:

screen shot 2017-02-27 at 6 21 05 pm

Am I missing any folders?

I also had issues with Sacred Seven and Grimgar of Fantasy and Ash. I've attached full logs.

screen shot 2017-02-27 at 6 23 52 pm

logs.zip

Dingmatt commented 7 years ago

@ZeroQI @sven-7 I hope no one minds if I use this feedback to test parts of AMSA as it uses different matching from HAMA and I want to see what it churns out.

sven-7 commented 7 years ago

@Dingmatt -- No, not at all.

ZeroQI commented 7 years ago

@Dingmatt no pb. tell me if you have any comment on my code, it unfortunately grew, but you must appreciate the low number of functions and priorities managed but source. will work on DefaultPrefs.Json, to have a priority for languages and each metadata field but no difference movie/serie to keep number of options down

KingJ commented 7 years ago

@ZeroQI I was able to do some really quick testing this morning;

2017-03-01 08:14:00,770 (a820/core /log_exception / 574) CRITICAL Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://anidb-5406?lang=en' (most recent call last): File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update agent.update(obj, media, lang, **kwargs) File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code__init.py", line 96, in update def update (self, metadata, media, lang, force ): Update (metadata, media, lang, force, False) File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\init__.py", line 89, in Update common.UpdateMeta(metadata, media, movie, MetaSources) File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py", line 401, in UpdateMeta UpdateMetaField(metadata, metadata, MetaSources[meta_source], Moviepriority if movie else SeriePriority, meta_field, meta_source, movie) File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py", line 366, in UpdateMetaField try: setattr(metadata, meta_field, meta_new) File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py", line 224, in metadata_download if file: status += ", Downloaded"; SaveFile(filename, file); status += "Saved locally" File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py", line 166, in SaveFile except Exception as e: Log.Info("common.SaveFile() - Exception: %s, relativeFilename: '%s', file: '%s'" % (str(e), relativeFilename, file)) UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte

ZeroQI commented 7 years ago

Will have to install plex on windows as i don't have errors on synology For the DataSave(), the try fail, then the except fails :/. but what is the line before the try saying:

if os.path.exists(fullpathDirectory):  Log.Debug("common.SaveFile() - CachePath: '{path}', file: '{file}', directory(ies) were present".format(path=CachePath, file=relativeFilename))
  else: os.makedirs(fullpathDirectory);  Log.Debug("common.SaveFile() - CachePath: '{path}', file: '{file}', directory(ies) were absent.".format(path=CachePath, file=relativeFilename))

UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte in the except line point to UTF-16 ??? You have japanese/chinese or weird windows language version installed by any chance?

KingJ commented 7 years ago

UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte in the except line point to UTF-16 ??? You have japanese/chinese or weird windows language version installed by any chance?

Nope, this is just a pretty standard English (UK) installation of Windows 10, shouldn't be anything odd going on with language encoding - especially when writing a binary file. A quick search of the Plex forums turned up similar errors from others but no obvious fix. I should have a bit more time tonight to try and dig in to why this is happening.

Dingmatt commented 7 years ago

@ZeroQI @KingJ I've seen quite a few unicode decode errors when tweaking my own code though mainly around episode titles (damn you 'The Familiar of Zero' and your french accents), never during a save though.

sven-7 commented 7 years ago

Some more test results:

Added episode 8 to Miss Kobayashi's Dragon Maid without having episode 7. No missing episode log was created or logged. Reported this issue in #113 .

2017-03-01 13:08:13,250 (126c) :  INFO (core:349) - Starting framework core - Version: 2.6.3, Build: ab90695 (Sun Feb 19 13:13:29 UTC 2017)
2017-03-01 13:08:13,250 (126c) :  DEBUG (core:361) - Using the elevated policy
2017-03-01 13:08:13,250 (126c) :  DEBUG (core:450) - Starting runtime component.
2017-03-01 13:08:13,257 (126c) :  DEBUG (core:450) - Starting caching component.
2017-03-01 13:08:13,257 (126c) :  DEBUG (core:450) - Starting data component.
2017-03-01 13:08:13,257 (126c) :  DEBUG (core:450) - Starting networking component.
2017-03-01 13:08:13,259 (126c) :  DEBUG (networking:284) - Loaded HTTP cookies
2017-03-01 13:08:13,269 (126c) :  DEBUG (networking:452) - Setting the default network timeout to 20.0
2017-03-01 13:08:13,272 (126c) :  DEBUG (core:450) - Starting localization component.
2017-03-01 13:08:13,272 (126c) :  INFO (localization:409) - Setting the default locale to en-us
2017-03-01 13:08:13,272 (126c) :  DEBUG (core:450) - Starting messaging component.
2017-03-01 13:08:13,273 (126c) :  DEBUG (core:450) - Starting debugging component.
2017-03-01 13:08:13,273 (126c) :  DEBUG (core:450) - Starting services component.
2017-03-01 13:08:13,275 (9d0) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/system/messaging/clear_events/com.plexapp.agents.hama'
2017-03-01 13:08:13,275 (126c) :  DEBUG (core:450) - Starting myplex component.
2017-03-01 13:08:13,276 (126c) :  DEBUG (core:450) - Starting notifications component.
2017-03-01 13:08:13,441 (126c) :  DEBUG (accessor:68) - Creating a new model access point for provider com.plexapp.agents.hama in namespace 'metadata'
2017-03-01 13:08:13,448 (126c) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes'
2017-03-01 13:08:13,471 (126c) :  DEBUG (runtime:1117) - Created a thread named 'load_all_services'
2017-03-01 13:08:13,471 (dd8) :  DEBUG (services:265) - Plug-in is not daemonized - loading services from system
2017-03-01 13:08:13,473 (126c) :  DEBUG (runtime:1117) - Created a thread named 'get_server_info'
2017-03-01 13:08:13,474 (1320) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400'
2017-03-01 13:08:13,474 (dd8) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0J1bmRsZVNlcnZpY2U6QWxsU2VydmljZXM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMApyMAo_'
2017-03-01 13:08:13,474 (126c) :  DEBUG (core:150) - Finished starting framework core
2017-03-01 13:08:13,476 (126c) :  DEBUG (core:560) - Loading plug-in code
2017-03-01 13:08:13,486 (1320) :  DEBUG (core:538) - Machine identifier is 9cb7d9cba69992d51b245cb5971e75a0d917946e
2017-03-01 13:08:13,487 (1320) :  DEBUG (core:539) - Server version is 1.4.2.3400-ab906953b
2017-03-01 13:08:13,690 (126c) :  DEBUG (core:566) - Finished loading plug-in code
2017-03-01 13:08:13,897 (dd8) :  DEBUG (services:362) - Loaded services
2017-03-01 13:08:13,907 (60c) :  DEBUG (services:438) - No shared code to load
2017-03-01 13:08:14,141 (126c) :  INFO (logkit:16) - 1 - C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py
2017-03-01 13:08:14,141 (126c) :  INFO (logkit:16) - 2 - C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py
2017-03-01 13:08:15,158 (126c) :  DEBUG (logkit:13) - common.LoadFile() - Filename: 'anime-titles.xml', Directory: '' does not exists in cache
2017-03-01 13:08:15,181 (126c) :  DEBUG (networking:161) - Fetching 'http://anidb.net/api/anime-titles.xml.gz' from the HTTP cache
2017-03-01 13:08:15,203 (126c) :  DEBUG (logkit:13) - LoadFile() - url: 'http://anidb.net/api/anime-titles.xml.gz loaded
2017-03-01 13:08:15,203 (126c) :  DEBUG (logkit:13) - common.SaveFile() - CachePath: 'C:\Users\Sven\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.agents.hama\DataItems', file: 'anime-titles.xml', directory(ies) were present
2017-03-01 13:08:15,332 (126c) :  DEBUG (logkit:13) - common.LoadFile() - CacheTime: 'Tue Feb 21 13:33:57 2017', Limit: 'Wed Feb 15 13:08:15 2017', url: 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list-master.xml', Filename: 'anime-list-master.xml' loaded from cache
2017-03-01 13:08:15,384 (126c) :  DEBUG (logkit:13) - common.LoadFile() - CacheTime: 'Wed Mar  1 00:04:43 2017', Limit: 'Mon Feb 27 13:08:15 2017', url: 'https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/master/anime-list-corrections.xml', Filename: 'anime-list-corrections.xml' loaded from cache
2017-03-01 13:08:15,384 (126c) :  INFO (logkit:16) - MergeMaps() - Adding/Modifying AniDBids: '['10091', '3395', '9900', '11747', '10008', '10009', '10804', '11123', '4597', '10833', '9042', '9227', '10027', '11637', '8655', '5842']'
2017-03-01 13:08:15,397 (126c) :  DEBUG (logkit:13) - common.LoadFile() - CacheTime: 'Tue Feb 21 13:33:57 2017', Limit: 'Wed Feb 15 13:08:15 2017', url: 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-movieset-list.xml', Filename: 'anime-movieset-list.xml' loaded from cache
2017-03-01 13:08:15,400 (126c) :  DEBUG (agentkit:1115) - Creating new agent class called HamaTVAgent
2017-03-01 13:08:15,401 (126c) :  DEBUG (agentkit:933) - Updating agent information: [{'media_types': ['TV_Show'], 'accepts_from': ['com.plexapp.agents.localmedia'], 'fallback_agent': False, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'HamaTV'}]
2017-03-01 13:08:15,401 (126c) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0FnZW50U2VydmljZTpVcGRhdGVJbmZv/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQo2CmRpY3QKbGlzdApkaWN0Cmxpc3QKbGlzdApsaXN0CjIKczIzCmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hczEwCmlkZW50aWZpZXJyMQpzMTAKYWdlbnRfaW5mbzEKcjIKMTAKcjMKczExCm1lZGlhX3R5cGVzcjQKczEyCmFjY2VwdHNfZnJvbWIwczE0CmZhbGxiYWNrX2FnZW50bnMxNApjb250cmlidXRlc190b3I1CnM5Cmxhbmd1YWdlc2IxczIwCnBlcnNpc3Rfc3RvcmVkX2ZpbGVzaTAKczcKdmVyc2lvbmIxczE2CnByaW1hcnlfcHJvdmlkZXJiMXM1CnByZWZzczYKSGFtYVRWczQKbmFtZTEKczcKVFZfU2hvdzEKczI5CmNvbS5wbGV4YXBwLmFnZW50cy5sb2NhbG1lZGlhMjMKczIKZW5zMgpmcnMyCnpoczIKc3ZzMgpub3MyCmRhczIKZmlzMgpubHMyCmRlczIKaXRzMgplc3MyCnBsczIKaHVzMgplbHMyCnRyczIKcnVzMgpoZXMyCmphczIKcHRzMgpjc3MyCmtvczIKc2xzMgpocnIwCg__'
2017-03-01 13:08:15,423 (126c) :  DEBUG (agentkit:1115) - Creating new agent class called HamaMovieAgent
2017-03-01 13:08:15,424 (126c) :  DEBUG (agentkit:933) - Updating agent information: [{'media_types': ['TV_Show'], 'accepts_from': ['com.plexapp.agents.localmedia'], 'fallback_agent': False, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'HamaTV'}, {'media_types': ['Movie'], 'accepts_from': ['com.plexapp.agents.localmedia'], 'fallback_agent': False, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'HamaMovies'}]
2017-03-01 13:08:15,426 (126c) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0FnZW50U2VydmljZTpVcGRhdGVJbmZv/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxMApkaWN0Cmxpc3QKZGljdApsaXN0Cmxpc3QKbGlzdApkaWN0Cmxpc3QKbGlzdApsaXN0CjIKczIzCmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hczEwCmlkZW50aWZpZXJyMQpzMTAKYWdlbnRfaW5mbzIKcjIKcjYKMTAKcjMKczExCm1lZGlhX3R5cGVzcjQKczEyCmFjY2VwdHNfZnJvbWIwczE0CmZhbGxiYWNrX2FnZW50bnMxNApjb250cmlidXRlc190b3I1CnM5Cmxhbmd1YWdlc2IxczIwCnBlcnNpc3Rfc3RvcmVkX2ZpbGVzaTAKczcKdmVyc2lvbmIxczE2CnByaW1hcnlfcHJvdmlkZXJiMXM1CnByZWZzczYKSGFtYVRWczQKbmFtZTEKczcKVFZfU2hvdzEKczI5CmNvbS5wbGV4YXBwLmFnZW50cy5sb2NhbG1lZGlhMjMKczIKZW5zMgpmcnMyCnpoczIKc3ZzMgpub3MyCmRhczIKZmlzMgpubHMyCmRlczIKaXRzMgplc3MyCnBsczIKaHVzMgplbHMyCnRyczIKcnVzMgpoZXMyCmphczIKcHRzMgpjc3MyCmtvczIKc2xzMgpocjEwCnI3CnMxMQptZWRpYV90eXBlc3I4CnMxMgphY2NlcHRzX2Zyb21iMHMxNApmYWxsYmFja19hZ2VudG5zMTQKY29udHJpYnV0ZXNfdG9yOQpzOQpsYW5ndWFnZXNiMXMyMApwZXJzaXN0X3N0b3JlZF9maWxlc2kwCnM3CnZlcnNpb25iMXMxNgpwcmltYXJ5X3Byb3ZpZGVyYjFzNQpwcmVmc3MxMApIYW1hTW92aWVzczQKbmFtZTEKczUKTW92aWUxCnMyOQpjb20ucGxleGFwcC5hZ2VudHMubG9jYWxtZWRpYTIzCnMyCmVuczIKZnJzMgp6aHMyCnN2czIKbm9zMgpkYXMyCmZpczIKbmxzMgpkZXMyCml0czIKZXNzMgpwbHMyCmh1czIKZWxzMgp0cnMyCnJ1czIKaGVzMgpqYXMyCnB0czIKY3NzMgprb3MyCnNsczIKaHJyMAo_'
2017-03-01 13:08:15,437 (126c/logkit         /Info              /  16) INFO     =============================================================================================================================================================
2017-03-01 13:08:15,437 (126c/logkit         /Info              /  16) INFO     HTTP Anidb Metadata Agent (HAMA)v By ZeroQI (Forked from Atomicstrawberry's v0.4 - AniDB, TVDB mod agent using SdudLee XML's ###
2017-03-01 13:08:15,437 (126c/logkit         /Info              /  16) INFO     =============================================================================================================================================================
2017-03-01 13:08:15,440 (126c/preferences    /_load_prefs       / 258) DEBUG    Loaded preferences from DefaultPrefs.json
2017-03-01 13:08:15,440 (126c/preferences    /_load_user_file   / 178) DEBUG    Loaded the user preferences for com.plexapp.agents.hama
2017-03-01 13:08:15,440 (126c/logkit         /Info              /  16) INFO     Simkl.Register()
2017-03-01 13:08:15,651 (126c/logkit         /Info              /  16) INFO     Level 1 - Copy code: '1A0C4' and go to 'url': 'https://simkl.com/pin', 'expires_in': '900', 'interval': '5'
2017-03-01 13:08:15,653 (126c/core           /log_exception     / 574) CRITICAL Exception when calling function 'Start' (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 294, in call_named_function
    result = f(*args, **kwargs)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 43, in Start
    if Prefs['Simkl']:  Simkl.Register()
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\Simkl.py", line 46, in Register
    time.sleep(interval)
NameError: global name 'time' is not defined

2017-03-01 13:08:15,654 (126c/core           /start             / 611) INFO     Started plug-in
2017-03-01 13:08:15,654 (126c/socketinterface/listen            / 160) DEBUG    Starting socket server
2017-03-01 13:08:15,657 (126c/runtime        /create_thread     /1117) DEBUG    Created a thread named 'start'
2017-03-01 13:08:15,658 (126c/socketinterface/listen            / 184) INFO     Socket server started on port 60534
2017-03-01 13:08:15,660 (126c/pipeinterface  /listen            /  25) INFO     Entering run loop
2017-03-01 13:08:15,660 (126c/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/prefixes
2017-03-01 13:08:15,664 (126c/runtime        /handle_request    / 814) DEBUG    Found route matching /:/prefixes
2017-03-01 13:08:15,667 (126c/runtime        /handle_request    / 924) DEBUG    Response: [200] MediaContainer, 148 bytes
2017-03-01 13:08:15,704 (8dc/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo3NTcwMnM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQ0CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vYW5pZGItODIwNT9sYW5nPWVuczQKZ3VpZHMxMAphbmlkYi04MjA1czIKaWRyMAo_
2017-03-01 13:08:15,710 (e30/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo3NTE5MHM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQ1CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vYW5pZGItMTIwOTE%40bGFuZz1lbnM0Cmd1aWRzMTEKYW5pZGItMTIwOTFzMgppZHIwCg__
2017-03-01 13:08:15,760 (8dc/runtime        /handle_request    / 814) DEBUG    Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo3NTcwMnM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQ0CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vYW5pZGItODIwNT9sYW5nPWVuczQKZ3VpZHMxMAphbmlkYi04MjA1czIKaWRyMAo_
2017-03-01 13:08:15,762 (e30/runtime        /handle_request    / 814) DEBUG    Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo3NTE5MHM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQ1CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vYW5pZGItMTIwOTE@bGFuZz1lbnM0Cmd1aWRzMTEKYW5pZGItMTIwOTFzMgppZHIwCg__
2017-03-01 13:08:15,763 (8dc/model          /__getitem__       /  32) DEBUG    Loading model with GUID com.plexapp.agents.hama://anidb-8205?lang=en
2017-03-01 13:08:15,763 (e30/model          /__getitem__       /  32) DEBUG    Loading model with GUID com.plexapp.agents.hama://anidb-12091?lang=en
2017-03-01 13:08:15,769 (8dc/model          /_deserialize      / 234) DEBUG    Deserializing from C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\f\3f6355f9711435540e4844b3167d30c4633901a.bundle\Contents\com.plexapp.agents.hama\Info.xml
2017-03-01 13:08:15,769 (e30/model          /_deserialize      / 234) DEBUG    Deserializing from C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\0\aa23e2bc986c04c707c0c41d7a8f33eced3fea4.bundle\Contents\com.plexapp.agents.hama\Info.xml
2017-03-01 13:08:15,775 (8dc/networking     /load              / 166) DEBUG    Requesting 'http://127.0.0.1:32400/library/metadata/75702/tree'
2017-03-01 13:08:15,809 (8dc/logkit         /Info              /  16) INFO     === Update Begin ============================================================================================================Windows  i386
2017-03-01 13:08:15,809 (8dc/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 11 - Blade Sharpened.mkv
2017-03-01 13:08:15,809 (8dc/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 10 - Aoi's Memory.mkv
2017-03-01 13:08:15,809 (8dc/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 12 - Sacred Seven.mkv
2017-03-01 13:08:15,811 (8dc/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 1 - The Stone's Awakening.mkv
2017-03-01 13:08:15,811 (8dc/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 3 - The Crazy Knight.mkv
2017-03-01 13:08:15,812 (8dc/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 2 - A Bond in the Color of Ruri.mkv
2017-03-01 13:08:15,812 (8dc/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 5 - The Heart's Mirror.mkv
2017-03-01 13:08:15,812 (8dc/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 4 - School Fair of Hell.mkv
2017-03-01 13:08:15,812 (8dc/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 7 - The True Lightstone and Darkstone.mkv
2017-03-01 13:08:15,812 (8dc/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 6 - One More Night.mkv
2017-03-01 13:08:15,813 (8dc/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 9 - Will Like a Rolling Stone.mkv
2017-03-01 13:08:15,813 (8dc/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 8 - Show Me Your Devotion.mkv
2017-03-01 13:08:15,815 (8dc/logkit         /Info              /  16) INFO     Update() - metadata.id: 'anidb-8205', Title: 'None', lang: 'en', force: 'True', movie: 'False', max(media.seasons.keys()): 'False'
2017-03-01 13:08:15,815 (8dc/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-03-01 13:08:15,815 (8dc/logkit         /Info              /  16) INFO     AnimeLists.GetMetadata() - Local custom mapping - No file detected
2017-03-01 13:08:15,815 (e30/networking     /load              / 166) DEBUG    Requesting 'http://127.0.0.1:32400/library/metadata/75190/tree'
2017-03-01 13:08:15,841 (e30/logkit         /Info              /  16) INFO     === Update Begin ============================================================================================================Windows  i386
2017-03-01 13:08:15,842 (e30/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Miss Kobayashi's Dragon Maid\Miss Kobayashi's Dragon Maid - 1 - The Strongest Maid in History, Tohru! (Well, She's a Dragon).mkv
2017-03-01 13:08:15,842 (e30/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Miss Kobayashi's Dragon Maid\Miss Kobayashi's Dragon Maid - 3 - Start of a New Life! (That Doesn't Go Well, Of Course).mkv
2017-03-01 13:08:15,842 (e30/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Miss Kobayashi's Dragon Maid\Miss Kobayashi's Dragon Maid - 2 - Second Dragon, Kanna! (We're Totally Spoiling Here).mkv
2017-03-01 13:08:15,844 (e30/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Miss Kobayashi's Dragon Maid\Miss Kobayashi's Dragon Maid - 5 - Tohru's Real World Lessons! (She Thinks She Understands It Already).mkv
2017-03-01 13:08:15,844 (e30/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Miss Kobayashi's Dragon Maid\Miss Kobayashi's Dragon Maid - 4 - Kanna Goes to School! (Not That She Needs To).mkv
2017-03-01 13:08:15,845 (e30/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Miss Kobayashi's Dragon Maid\Miss Kobayashi's Dragon Maid - 6 - Home Visit! (And Homes Not Visited).mkv
2017-03-01 13:08:15,845 (e30/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Miss Kobayashi's Dragon Maid\Miss Kobayashi's Dragon Maid - 8 - New Dragon, Elma! (She's Finally Appearing, Huh).mkv
2017-03-01 13:08:15,846 (e30/logkit         /Info              /  16) INFO     Update() - metadata.id: 'anidb-12091', Title: 'Miss Kobayashi's Dragon Maid', lang: 'en', force: 'True', movie: 'False', max(media.seasons.keys()): 'False'
2017-03-01 13:08:15,848 (e30/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-03-01 13:08:15,848 (e30/logkit         /Info              /  16) INFO     AnimeLists.GetMetadata() - Local custom mapping - No file detected
2017-03-01 13:08:16,223 (8dc/logkit         /Info              /  16) INFO     AnimeLists.GetMetadata() - anidb: '8205', tvbdid: '249939', tmdbid: '', imbdid: '', defaulttvdbseason: '1', name: 'Sacred Seven'
2017-03-01 13:08:16,240 (8dc/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-03-01 13:08:16,240 (8dc/logkit         /Info              /  16) INFO     AniDB.GetMetadata() - AniDB Serie XML: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8205', file: 'AniDB/8205.xml
2017-03-01 13:08:16,243 (8dc/logkit         /Debug             /  13) DEBUG    common.LoadFile() - CacheTime: 'Tue Feb 28 17:29:05 2017', Limit: 'Wed Feb 22 13:08:16 2017', url: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8205', Filename: 'AniDB\8205.xml' loaded from cache
2017-03-01 13:08:16,256 (8dc/core           /log_exception     / 574) CRITICAL Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://anidb-8205?lang=en' (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 96, in update
    def update (self, metadata, media, lang, force ):  Update (metadata, media, lang, force,  False)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 73, in Update
    if AniDBid.isdigit():                ANNid, MALid, AniDB_dict =      AniDB.GetMetadata(metadata, media, movie, error_log, AniDBMovieSets, AniDBid, TVDBid, mappingList)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\AniDB.py", line 205, in GetMetadata
    elif epNumType == "2": missing_specials.append("s" + season + "e" + episode )
TypeError: int() argument must be a string or a number, not 'NoneType'

2017-03-01 13:08:16,265 (8dc/model          /_serialize        / 229) DEBUG    Serializing to C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\f\3f6355f9711435540e4844b3167d30c4633901a.bundle\Contents\com.plexapp.agents.hama\Info.xml
2017-03-01 13:08:16,269 (8dc/runtime        /return_state_data /  88) DEBUG    Sending packed state data (104 bytes)
2017-03-01 13:08:16,270 (8dc/runtime        /handle_request    / 924) DEBUG    Response: [200] str, 16 bytes
2017-03-01 13:08:16,323 (e30/logkit         /Info              /  16) INFO     AnimeLists.GetMetadata() - anidb: '12091', tvbdid: '318893', tmdbid: '', imbdid: '', defaulttvdbseason: '1', name: 'Kobayashi-san Chi no Maid Dragon'
2017-03-01 13:08:16,328 (e30/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-03-01 13:08:16,328 (e30/logkit         /Info              /  16) INFO     AniDB.GetMetadata() - AniDB Serie XML: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=12091', file: 'AniDB/12091.xml
2017-03-01 13:08:16,328 (e30/logkit         /Debug             /  13) DEBUG    common.LoadFile() - CacheTime: 'Wed Mar  1 12:15:24 2017', Limit: 'Wed Feb 22 13:08:16 2017', url: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=12091', Filename: 'AniDB\12091.xml' loaded from cache
2017-03-01 13:08:16,332 (e30/core           /log_exception     / 574) CRITICAL Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://anidb-12091?lang=en' (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 96, in update
    def update (self, metadata, media, lang, force ):  Update (metadata, media, lang, force,  False)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 73, in Update
    if AniDBid.isdigit():                ANNid, MALid, AniDB_dict =      AniDB.GetMetadata(metadata, media, movie, error_log, AniDBMovieSets, AniDBid, TVDBid, mappingList)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\AniDB.py", line 205, in GetMetadata
    elif epNumType == "2": missing_specials.append("s" + season + "e" + episode )
TypeError: int() argument must be a string or a number, not 'NoneType'

2017-03-01 13:08:16,388 (e30/model          /_serialize        / 229) DEBUG    Serializing to C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\0\aa23e2bc986c04c707c0c41d7a8f33eced3fea4.bundle\Contents\com.plexapp.agents.hama\Info.xml
2017-03-01 13:08:16,391 (e30/runtime        /return_state_data /  88) DEBUG    Sending packed state data (104 bytes)
2017-03-01 13:08:16,391 (e30/runtime        /handle_request    / 924) DEBUG    Response: [200] str, 16 bytes
KingJ commented 7 years ago

I've identified the cause of the UnicodeDecodeError error. There's two errors in play here, the first stack trace is from the Plex framework having problems writing the file. The second however is in how Hama is using the plex logging framework. On line 166 of common.py;

except Exception as e:  Log.Info("common.SaveFile() - Exception: %s, relativeFilename: '%s', file: '%s'" % (str(e), relativeFilename, file))

Hama is trying to output the contents of the file variable to the log. In this case however, file is the file's data and the logging framework goes crazy trying to parse the binary image data as text. I took file out of the logging statement and the UnicodeDecodeError no longer occurs. There's still a problem with writing the file but i'm still looking at the reasoning for that, at least now the exception is able to be caught and handled.


A small request on coding standards, could we use the newer standard for formatting strings? (.format instead of %s)? It helps make the code a bit more readable, especially on a string that had lots of arguments. E.g, line 166 would (without the file variable) become ;

except Exception as e:  Log.Info("common.SaveFile() - Exception: {exception}, relativeFilename: '{relativeFilename}'".format(exception=exception, relativeFilename=relativeFilename)

https://pyformat.info/ is a good comparison resource for old formatting vs. new formatting. You can still use positional arguments ({0} instead of {name}) but named arguments help the readability IMO.

Edit: Sorry, i've probably overexplained that a bit, I can see a lot of usage of .format elsewhere in the codebase.

KingJ commented 7 years ago

TheTVDB.py is missing import time as well;

2017-03-01 20:11:57,799 (8a3c/core           /log_exception     / 574) CRITICAL Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://tvdb3-114801?lang=en' (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
  File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 96, in update
    def update (self, metadata, media, lang, force ):  Update (metadata, media, lang, force,  False)
  File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 74, in Update
    if  TVDBid.isdigit():                    IMDbid, TheTVDB_dict =    TheTVDB.GetMetadata(metadata, media, movie, error_log, lang, source, TVDBid, IMDbid, mappingList['defaulttvdbseason'] if 'defaulttvdbseason' in mappingList else "")
  File "C:\Users\Username\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\TheTVDB.py", line 169, in GetMetadata
    else:                       episode_missing.append     (numbering)
NameError: global name 'time' is not defined
KingJ commented 7 years ago

Should GetSingleOne be a default enabled preference? After enabling all the metadata sources I was wondering why nothing seemed to be downloading until I found that setting 😄 .

The errors for MyAnimeList are caused by the folders not existing. Although the agent checks that the fullpathDirectory exists and creates if not, this only extends to DataItems for me. MAL files are then attempted to be stored in MyAnimeList\images\anime\x\filename.jpg, where x is an integer. After manually the folder hierarchy, MAL images were successfully downloaded. Seems like the check will need to be extended to fullpathDirectory and the folders that are part of the filename?

Example of where the folders are present, and where not (I had made the 6 folder, but not the 10 folder);

2017-03-01 22:31:24,802 (bd90/networking     /load              / 166) DEBUG    Requesting 'https://myanimelist.cdn-dena.com/images/anime/6/55233l.jpg'
2017-03-01 22:31:24,891 (bd90/networking     /load              / 198) DEBUG    Not caching 'https://myanimelist.cdn-dena.com/images/anime/6/55233l.jpg' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2017-03-01 22:31:24,891 (bd90/logkit         /Debug             /  13) DEBUG    fullpathDirectory: 'C:\Users\Username\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.agents.hama\DataItems'
2017-03-01 22:31:24,892 (bd90/logkit         /Debug             /  13) DEBUG    common.SaveFile() - CachePath: 'C:\Users\Username\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.agents.hama\DataItems', file: 'MyAnimeList/images/anime/6/55233l.jpg', directory(ies) were present
2017-03-01 22:31:24,900 (bd90/logkit         /Info              /  16) INFO     url: 'https://myanimelist.cdn-dena.com/images/anime/6/55233l.jpg', num: '50', filename: 'MyAnimeList/images/anime/6/55233l.jpg', DownloadedSaved locally
2017-03-01 22:31:24,917 (bd90/networking     /load              / 166) DEBUG    Requesting 'https://myanimelist.cdn-dena.com/images/anime/10/43249l.jpg'
2017-03-01 22:31:25,181 (bd90/networking     /load              / 198) DEBUG    Not caching 'https://myanimelist.cdn-dena.com/images/anime/10/43249l.jpg' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2017-03-01 22:31:25,183 (bd90/logkit         /Debug             /  13) DEBUG    fullpathDirectory: 'C:\Users\Username\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.agents.hama\DataItems'
2017-03-01 22:31:25,183 (bd90/logkit         /Debug             /  13) DEBUG    common.SaveFile() - CachePath: 'C:\Users\Username\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.agents.hama\DataItems', file: 'MyAnimeList/images/anime/10/43249l.jpg', directory(ies) were present
2017-03-01 22:31:25,183 (bd90/core           /log_exception     / 574) CRITICAL Exception writing to C:\Users\Username\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.agents.hama\DataItems\MyAnimeList\images\anime\10\43249l.jpg (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\storage.py", line 81, in save
    f = open(tempfile, mode)
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\subsystem\ospathfix.py", line 70, in builtins_open
    return __builtins__['_open'](longpathify(uni(filename)), mode, buffering)
IOError: [Errno 2] No such file or directory: u'\\\\?\\C:\\Users\\Username\\AppData\\Local\\Plex Media Server\\Plug-in Support\\Data\\com.plexapp.agents.hama\\DataItems\\MyAnimeList\\images\\anime\\10\\._43249l.jpg'
sven-7 commented 7 years ago

I added those folders as well, but getting errors nonetheless.

2017-03-01 22:03:59,828 (1178/logkit         /Info              /  16) INFO     === Search Begin ============================================================================================================
2017-03-01 22:03:59,828 (1178/logkit         /Info              /  16) INFO     --- AniDB.Search() - Begin --------------------------------------------------------------------------------------------------
2017-03-01 22:03:59,829 (1178/logkit         /Info              /  16) INFO     Title: 'Sacred Seven', name: 'None', filename: 'Z%3A%5CAnime%20Series%5CSacred%20Seven%5CSacred%20Seven%20-%2012%20-%20Sacred%20Seven%2Emkv', manual: 'False', year: 'None'
2017-03-01 22:03:59,926 (1178/logkit         /Info              /  16) INFO     cleanse_title: 'giỏ trái cây' <type 'str'>, new_func_title: 'giỏ trái cây' <type 'str'>, title: 'Giỏ Trái Cây' <type 'unicode'>
2017-03-01 22:03:59,964 (1178/logkit         /Info              /  16) INFO     cleanse_title: 'ওয়ান পিস্' <type 'str'>, new_func_title: 'ওয়ান পিস্' <type 'str'>, title: 'ওয়ান পিস্' <type 'unicode'>
2017-03-01 22:04:00,539 (1178/logkit         /Info              /  16) INFO     cleanse_title: 'cậu bé bút chì' <type 'str'>, new_func_title: 'cậu bé bút chì' <type 'str'>, title: 'Cậu bé bút chì' <type 'unicode'>
2017-03-01 22:04:02,247 (1178/logkit         /Info              /  16) INFO     cleanse_title: 'קיבַּה' <type 'str'>, new_func_title: 'קיבַּה' <type 'str'>, title: 'קיבַּה' <type 'unicode'>
2017-03-01 22:04:03,641 (1178/logkit         /Info              /  16) INFO     AniDB - score: '100', id: '  8205', title: 'Sacred Seven' 
2017-03-01 22:04:03,828 (1178/logkit         /Info              /  16) INFO     AniDB - score: ' 35', id: '  8760', title: 'Sacred Seven' 
2017-03-01 22:04:04,664 (1178/logkit         /Info              /  16) INFO     cleanse_title: 'モルモランド' <type 'str'>, new_func_title: 'モルモランド' <type 'str'>, title: 'モルモランド' <type 'unicode'>
2017-03-01 22:04:04,874 (1178/logkit         /Info              /  16) INFO     cleanse_title: 'シックス ハート プリンセス' <type 'str'>, new_func_title: 'シックス ハート プリンセス' <type 'str'>, title: 'シックス ハート プリンセス' <type 'unicode'>
2017-03-01 22:04:04,917 (1178/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-03-01 22:04:04,927 (1178/runtime        /return_state_data /  88) DEBUG    Sending packed state data (104 bytes)
2017-03-01 22:04:04,927 (1178/runtime        /handle_request    / 924) DEBUG    Response: [200] str, 1016 bytes
2017-03-01 22:04:04,986 (11d4/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo3NTc2MXM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQ0CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vYW5pZGItODIwNT9sYW5nPWVuczQKZ3VpZHMxMAphbmlkYi04MjA1czIKaWRyMAo_
2017-03-01 22:04:04,987 (11d4/runtime        /parse_state_data  /  49) DEBUG    Received packed state data (80 bytes)
2017-03-01 22:04:04,987 (11d4/runtime        /handle_request    / 814) DEBUG    Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo3NTc2MXM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQ0CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vYW5pZGItODIwNT9sYW5nPWVuczQKZ3VpZHMxMAphbmlkYi04MjA1czIKaWRyMAo_
2017-03-01 22:04:04,989 (11d4/model          /__getitem__       /  32) DEBUG    Loading model with GUID com.plexapp.agents.hama://anidb-8205?lang=en
2017-03-01 22:04:04,992 (11d4/model          /_deserialize      / 234) DEBUG    Deserializing from C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\f\3f6355f9711435540e4844b3167d30c4633901a.bundle\Contents\com.plexapp.agents.hama\Info.xml
2017-03-01 22:04:04,993 (11d4/networking     /load              / 166) DEBUG    Requesting 'http://127.0.0.1:32400/library/metadata/75761/tree'
2017-03-01 22:04:05,003 (11d4/logkit         /Info              /  16) INFO     === Update Begin ============================================================================================================Windows  i386
2017-03-01 22:04:05,003 (11d4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 11 - Blade Sharpened.mkv
2017-03-01 22:04:05,003 (11d4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 10 - Aoi's Memory.mkv
2017-03-01 22:04:05,003 (11d4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 12 - Sacred Seven.mkv
2017-03-01 22:04:05,003 (11d4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 1 - The Stone's Awakening.mkv
2017-03-01 22:04:05,005 (11d4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 3 - The Crazy Knight.mkv
2017-03-01 22:04:05,005 (11d4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 2 - A Bond in the Color of Ruri.mkv
2017-03-01 22:04:05,005 (11d4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 5 - The Heart's Mirror.mkv
2017-03-01 22:04:05,005 (11d4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 4 - School Fair of Hell.mkv
2017-03-01 22:04:05,005 (11d4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 7 - The True Lightstone and Darkstone.mkv
2017-03-01 22:04:05,005 (11d4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 6 - One More Night.mkv
2017-03-01 22:04:05,006 (11d4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 9 - Will Like a Rolling Stone.mkv
2017-03-01 22:04:05,006 (11d4/logkit         /Info              /  16) INFO     Update() - Z:\Anime Series\Sacred Seven\Sacred Seven - 8 - Show Me Your Devotion.mkv
2017-03-01 22:04:05,006 (11d4/logkit         /Info              /  16) INFO     Update() - metadata.id: 'anidb-8205', Title: 'None', lang: 'en', force: 'True', movie: 'False', max(media.seasons.keys()): 'False'
2017-03-01 22:04:05,006 (11d4/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-03-01 22:04:05,006 (11d4/logkit         /Info              /  16) INFO     AnimeLists.GetMetadata() - Local custom mapping - No file detected
2017-03-01 22:04:05,130 (11d4/logkit         /Info              /  16) INFO     AnimeLists.GetMetadata() - anidb: '8205', tvbdid: '249939', tmdbid: '', imbdid: '', defaulttvdbseason: '1', name: 'Sacred Seven'
2017-03-01 22:04:05,134 (11d4/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-03-01 22:04:05,134 (11d4/logkit         /Info              /  16) INFO     AniDB.GetMetadata() - AniDB Serie XML: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8205', file: 'AniDB/8205.xml
2017-03-01 22:04:05,137 (11d4/logkit         /Debug             /  13) DEBUG    common.LoadFile() - CacheTime: 'Tue Feb 28 17:29:05 2017', Limit: 'Wed Feb 22 22:04:05 2017', url: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8205', Filename: 'AniDB\8205.xml' loaded from cache
2017-03-01 22:04:05,148 (11d4/core           /log_exception     / 574) CRITICAL Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://anidb-8205?lang=en' (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 96, in update
    def update (self, metadata, media, lang, force ):  Update (metadata, media, lang, force,  False)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 73, in Update
    if AniDBid.isdigit():                ANNid, MALid, AniDB_dict =      AniDB.GetMetadata(metadata, media, movie, error_log, AniDBMovieSets, AniDBid, TVDBid, mappingList)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\AniDB.py", line 205, in GetMetadata
    elif epNumType == "2": missing_specials.append("s" + season + "e" + episode )
TypeError: int() argument must be a string or a number, not 'NoneType'

2017-03-01 22:04:05,151 (11d4/model          /_serialize        / 229) DEBUG    Serializing to C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\f\3f6355f9711435540e4844b3167d30c4633901a.bundle\Contents\com.plexapp.agents.hama\Info.xml
2017-03-01 22:04:05,154 (11d4/runtime        /return_state_data /  88) DEBUG    Sending packed state data (104 bytes)
2017-03-01 22:04:05,154 (11d4/runtime        /handle_request    / 924) DEBUG    Response: [200] str, 16 bytes
ZeroQI commented 7 years ago

Hi all sorry for lack of updates, coding non stop in my free time, implemented all priority settings in the Prefs file. all test ok on tvetvdb force id serie... Testing on anidb id series at last...

Re-uploaded new version under same name: https://github.com/ZeroQI/Hama.bundle/releases/download/Beta/Hama.bundle.zip

If you know how to read list from metadata (genre, collections) as right now, have to rewrite the info at every scan

sven-7 commented 7 years ago

Will test shortly.

Also -- noticed the HAMA settings menu in Plex is drastically different now.

screen shot 2017-03-02 at 1 10 40 pm

ZeroQI commented 7 years ago

Well so is the agent code underneath it all. It build separate Dict per source then update all in one go, which allowed the cool logging style... I tried to limit the options and that's the only i found that keep the variables down, didn't fancy 40+ priority fields there. Do not enable simkl yet. If enabled, you have to check logs to create a token, then haven't coded the rest... Re-uploaded one just now (sorry sven-7) which show all fields, populated or not (and priority list if not), should make troubleshooting easier. https://github.com/ZeroQI/Hama.bundle/releases/download/Beta/Hama.bundle.zip

sven-7 commented 7 years ago

Still having no luck. It's not just Sacred Seven -- it's any new show I'm adding that was not in there before.

2017-03-02 15:05:28,091 (11a8) :  INFO (core:349) - Starting framework core - Version: 2.6.3, Build: ab90695 (Sun Feb 19 13:13:29 UTC 2017)
2017-03-02 15:05:28,091 (11a8) :  DEBUG (core:361) - Using the elevated policy
2017-03-02 15:05:28,092 (11a8) :  DEBUG (core:450) - Starting runtime component.
2017-03-02 15:05:28,095 (11a8) :  DEBUG (core:450) - Starting caching component.
2017-03-02 15:05:28,095 (11a8) :  DEBUG (core:450) - Starting data component.
2017-03-02 15:05:28,095 (11a8) :  DEBUG (core:450) - Starting networking component.
2017-03-02 15:05:28,095 (11a8) :  DEBUG (networking:284) - Loaded HTTP cookies
2017-03-02 15:05:28,096 (11a8) :  DEBUG (networking:452) - Setting the default network timeout to 20.0
2017-03-02 15:05:28,098 (11a8) :  DEBUG (core:450) - Starting localization component.
2017-03-02 15:05:28,098 (11a8) :  INFO (localization:409) - Setting the default locale to en-us
2017-03-02 15:05:28,098 (11a8) :  DEBUG (core:450) - Starting messaging component.
2017-03-02 15:05:28,098 (11a8) :  DEBUG (core:450) - Starting debugging component.
2017-03-02 15:05:28,098 (11a8) :  DEBUG (core:450) - Starting services component.
2017-03-02 15:05:28,098 (11a8) :  DEBUG (core:450) - Starting myplex component.
2017-03-02 15:05:28,099 (11dc) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/system/messaging/clear_events/com.plexapp.agents.hama'
2017-03-02 15:05:28,099 (11a8) :  DEBUG (core:450) - Starting notifications component.
2017-03-02 15:05:28,226 (11a8) :  DEBUG (accessor:68) - Creating a new model access point for provider com.plexapp.agents.hama in namespace 'metadata'
2017-03-02 15:05:28,232 (11a8) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes'
2017-03-02 15:05:28,263 (11a8) :  DEBUG (runtime:1117) - Created a thread named 'load_all_services'
2017-03-02 15:05:28,263 (11ec) :  DEBUG (services:265) - Plug-in is not daemonized - loading services from system
2017-03-02 15:05:28,265 (11a8) :  DEBUG (runtime:1117) - Created a thread named 'get_server_info'
2017-03-02 15:05:28,265 (11a8) :  DEBUG (core:150) - Finished starting framework core
2017-03-02 15:05:28,266 (11a8) :  DEBUG (core:560) - Loading plug-in code
2017-03-02 15:05:28,266 (11ec) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0J1bmRsZVNlcnZpY2U6QWxsU2VydmljZXM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMApyMAo_'
2017-03-02 15:05:28,266 (11f4) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400'
2017-03-02 15:05:28,279 (11f4) :  DEBUG (core:538) - Machine identifier is 9cb7d9cba69992d51b245cb5971e75a0d917946e
2017-03-02 15:05:28,279 (11f4) :  DEBUG (core:539) - Server version is 1.4.2.3400-ab906953b
2017-03-02 15:05:28,354 (11a8) :  DEBUG (core:566) - Finished loading plug-in code
2017-03-02 15:05:28,609 (11ec) :  DEBUG (services:362) - Loaded services
2017-03-02 15:05:28,619 (11f0) :  DEBUG (services:438) - No shared code to load
2017-03-02 15:05:29,677 (11a8) :  DEBUG (logkit:13) - common.LoadFile() - Filename: 'anime-titles.xml', Directory: '' does not exists in cache
2017-03-02 15:05:29,703 (11a8) :  DEBUG (networking:161) - Fetching 'http://anidb.net/api/anime-titles.xml.gz' from the HTTP cache
2017-03-02 15:05:29,710 (11a8) :  DEBUG (logkit:13) - LoadFile() - url: 'http://anidb.net/api/anime-titles.xml.gz loaded
2017-03-02 15:05:29,710 (11a8) :  DEBUG (logkit:13) - common.SaveFile() - CachePath: 'C:\Users\Sven\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.agents.hama\DataItems', file: 'anime-titles.xml', directory(ies) were present
2017-03-02 15:05:29,845 (11a8) :  DEBUG (logkit:13) - common.LoadFile() - CacheTime: 'Tue Feb 21 13:33:57 2017', Limit: 'Thu Feb 16 15:05:29 2017', url: 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list-master.xml', Filename: 'anime-list-master.xml' loaded from cache
2017-03-02 15:05:29,895 (11a8) :  DEBUG (logkit:13) - common.LoadFile() - CacheTime: 'Wed Mar  1 00:04:43 2017', Limit: 'Tue Feb 28 15:05:29 2017', url: 'https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/master/anime-list-corrections.xml', Filename: 'anime-list-corrections.xml' loaded from cache
2017-03-02 15:05:29,895 (11a8) :  INFO (logkit:16) - MergeMaps() - Adding/Modifying AniDBids: '['10091', '3395', '9900', '11747', '10008', '10009', '10804', '11123', '4597', '10833', '9042', '9227', '10027', '11637', '8655', '5842']'
2017-03-02 15:05:29,910 (11a8) :  DEBUG (logkit:13) - common.LoadFile() - CacheTime: 'Tue Feb 21 13:33:57 2017', Limit: 'Thu Feb 16 15:05:29 2017', url: 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-movieset-list.xml', Filename: 'anime-movieset-list.xml' loaded from cache
2017-03-02 15:05:29,913 (11a8) :  DEBUG (agentkit:1115) - Creating new agent class called HamaTVAgent
2017-03-02 15:05:29,914 (11a8) :  DEBUG (agentkit:933) - Updating agent information: [{'media_types': ['TV_Show'], 'accepts_from': ['com.plexapp.agents.localmedia'], 'fallback_agent': False, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'HamaTV'}]
2017-03-02 15:05:29,915 (11a8) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0FnZW50U2VydmljZTpVcGRhdGVJbmZv/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQo2CmRpY3QKbGlzdApkaWN0Cmxpc3QKbGlzdApsaXN0CjIKczIzCmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hczEwCmlkZW50aWZpZXJyMQpzMTAKYWdlbnRfaW5mbzEKcjIKMTAKcjMKczExCm1lZGlhX3R5cGVzcjQKczEyCmFjY2VwdHNfZnJvbWIwczE0CmZhbGxiYWNrX2FnZW50bnMxNApjb250cmlidXRlc190b3I1CnM5Cmxhbmd1YWdlc2IxczIwCnBlcnNpc3Rfc3RvcmVkX2ZpbGVzaTAKczcKdmVyc2lvbmIxczE2CnByaW1hcnlfcHJvdmlkZXJiMXM1CnByZWZzczYKSGFtYVRWczQKbmFtZTEKczcKVFZfU2hvdzEKczI5CmNvbS5wbGV4YXBwLmFnZW50cy5sb2NhbG1lZGlhMjMKczIKZW5zMgpmcnMyCnpoczIKc3ZzMgpub3MyCmRhczIKZmlzMgpubHMyCmRlczIKaXRzMgplc3MyCnBsczIKaHVzMgplbHMyCnRyczIKcnVzMgpoZXMyCmphczIKcHRzMgpjc3MyCmtvczIKc2xzMgpocnIwCg__'
2017-03-02 15:05:29,927 (11a8) :  DEBUG (agentkit:1115) - Creating new agent class called HamaMovieAgent
2017-03-02 15:05:29,928 (11a8) :  DEBUG (agentkit:933) - Updating agent information: [{'media_types': ['TV_Show'], 'accepts_from': ['com.plexapp.agents.localmedia'], 'fallback_agent': False, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'HamaTV'}, {'media_types': ['Movie'], 'accepts_from': ['com.plexapp.agents.localmedia'], 'fallback_agent': False, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'HamaMovies'}]
2017-03-02 15:05:29,930 (11a8) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0FnZW50U2VydmljZTpVcGRhdGVJbmZv/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxMApkaWN0Cmxpc3QKZGljdApsaXN0Cmxpc3QKbGlzdApkaWN0Cmxpc3QKbGlzdApsaXN0CjIKczIzCmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hczEwCmlkZW50aWZpZXJyMQpzMTAKYWdlbnRfaW5mbzIKcjIKcjYKMTAKcjMKczExCm1lZGlhX3R5cGVzcjQKczEyCmFjY2VwdHNfZnJvbWIwczE0CmZhbGxiYWNrX2FnZW50bnMxNApjb250cmlidXRlc190b3I1CnM5Cmxhbmd1YWdlc2IxczIwCnBlcnNpc3Rfc3RvcmVkX2ZpbGVzaTAKczcKdmVyc2lvbmIxczE2CnByaW1hcnlfcHJvdmlkZXJiMXM1CnByZWZzczYKSGFtYVRWczQKbmFtZTEKczcKVFZfU2hvdzEKczI5CmNvbS5wbGV4YXBwLmFnZW50cy5sb2NhbG1lZGlhMjMKczIKZW5zMgpmcnMyCnpoczIKc3ZzMgpub3MyCmRhczIKZmlzMgpubHMyCmRlczIKaXRzMgplc3MyCnBsczIKaHVzMgplbHMyCnRyczIKcnVzMgpoZXMyCmphczIKcHRzMgpjc3MyCmtvczIKc2xzMgpocjEwCnI3CnMxMQptZWRpYV90eXBlc3I4CnMxMgphY2NlcHRzX2Zyb21iMHMxNApmYWxsYmFja19hZ2VudG5zMTQKY29udHJpYnV0ZXNfdG9yOQpzOQpsYW5ndWFnZXNiMXMyMApwZXJzaXN0X3N0b3JlZF9maWxlc2kwCnM3CnZlcnNpb25iMXMxNgpwcmltYXJ5X3Byb3ZpZGVyYjFzNQpwcmVmc3MxMApIYW1hTW92aWVzczQKbmFtZTEKczUKTW92aWUxCnMyOQpjb20ucGxleGFwcC5hZ2VudHMubG9jYWxtZWRpYTIzCnMyCmVuczIKZnJzMgp6aHMyCnN2czIKbm9zMgpkYXMyCmZpczIKbmxzMgpkZXMyCml0czIKZXNzMgpwbHMyCmh1czIKZWxzMgp0cnMyCnJ1czIKaGVzMgpqYXMyCnB0czIKY3NzMgprb3MyCnNsczIKaHJyMAo_'
2017-03-02 15:05:29,941 (11a8/logkit         /Info              /  16) INFO     =============================================================================================================================================================
2017-03-02 15:05:29,941 (11a8/logkit         /Info              /  16) INFO     HTTP Anidb Metadata Agent (HAMA)v By ZeroQI (Forked from Atomicstrawberry's v0.4 - AniDB, TVDB mod agent using SdudLee XML's ###
2017-03-02 15:05:29,943 (11a8/logkit         /Info              /  16) INFO     =============================================================================================================================================================
2017-03-02 15:05:29,944 (11a8/preferences    /_load_prefs       / 258) DEBUG    Loaded preferences from DefaultPrefs.json
2017-03-02 15:05:29,947 (11a8/preferences    /_load_user_file   / 178) DEBUG    Loaded the user preferences for com.plexapp.agents.hama
2017-03-02 15:05:29,947 (11a8/logkit         /Info              /  16) INFO     Simkl.Register()
2017-03-02 15:05:30,255 (11a8/logkit         /Info              /  16) INFO     Level 1 - Copy code: '846DD' and go to 'url': 'https://simkl.com/pin', 'expires_in': '900', 'interval': '5'
2017-03-02 15:05:35,319 (11a8/core           /log_exception     / 574) CRITICAL Exception when calling function 'Start' (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 294, in call_named_function
    result = f(*args, **kwargs)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 43, in Start
    if Prefs['Simkl']:  Simkl.Register()
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\Simkl.py", line 51, in Register
    elif r["result"] == "KO":
NameError: global name 'r' is not defined

2017-03-02 15:05:35,321 (11a8/core           /start             / 611) INFO     Started plug-in
2017-03-02 15:05:35,322 (11a8/socketinterface/listen            / 160) DEBUG    Starting socket server
2017-03-02 15:05:35,325 (11a8/runtime        /create_thread     /1117) DEBUG    Created a thread named 'start'
2017-03-02 15:05:35,326 (11a8/socketinterface/listen            / 184) INFO     Socket server started on port 49420
2017-03-02 15:05:35,326 (11a8/pipeinterface  /listen            /  25) INFO     Entering run loop
2017-03-02 15:05:35,328 (11a8/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/prefixes
2017-03-02 15:05:35,332 (11a8/runtime        /handle_request    / 814) DEBUG    Found route matching /:/prefixes
2017-03-02 15:05:35,335 (11a8/runtime        /handle_request    / 924) DEBUG    Response: [200] MediaContainer, 148 bytes
2017-03-02 15:05:35,345 (122c/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/plugins/com.plexapp.agents.hama/prefs
2017-03-02 15:05:35,375 (122c/runtime        /handle_request    / 814) DEBUG    Found route matching /:/plugins/com.plexapp.agents.hama/prefs
2017-03-02 15:05:35,397 (122c/runtime        /return_state_data /  88) DEBUG    Sending packed state data (104 bytes)
2017-03-02 15:05:35,397 (122c/runtime        /handle_request    / 924) DEBUG    Response: [200] MediaContainer, 5385 bytes
2017-03-02 15:05:35,482 (1254/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/plugins/com.plexapp.agents.hama/prefs
2017-03-02 15:05:35,483 (1254/runtime        /handle_request    / 814) DEBUG    Found route matching /:/plugins/com.plexapp.agents.hama/prefs
2017-03-02 15:05:35,506 (1254/runtime        /return_state_data /  88) DEBUG    Sending packed state data (104 bytes)
2017-03-02 15:05:35,506 (1254/runtime        /handle_request    / 924) DEBUG    Response: [200] MediaContainer, 5385 bytes
2017-03-02 15:06:17,151 (1074/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo2CnMyCmVuczQKbGFuZ2IwczYKbWFudWFsYjFzNwpwcmltYXJ5aTAKczcKdmVyc2lvbnIxCnM2Cmt3YXJnc3M3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZTExCnMxNgo4OWExY2Q3MjgyM2ExMWNkczE3Cm9wZW5TdWJ0aXRsZXNIYXNoczIKMTJzNwplcGlzb2RlbnM0Cm5hbWVzMQoxczgKZXBpc29kaWNzMTIKU2FjcmVkIFNldmVuczQKc2hvd3MxCjFzNgpzZWFzb25uczQKeWVhcnM5MQpCJTNBJTVDQW5pbWUlMjBTZXJpZXMlNUNTYWNyZWQlMjBTZXZlbiU1Q1NhY3JlZCUyMFNldmVuJTIwLSUyMDEyJTIwLSUyMFNhY3JlZCUyMFNldmVuJTJFbWt2czgKZmlsZW5hbWVzNDAKMTIzZmZmNWIxNjQ0MTE3ZmM1ZTQwMTgyMjVhYzY5ZDlkOTFlZGVhMXM4CnBsZXhIYXNoczIKLTFzOApkdXJhdGlvbnM1Cjc1Nzg5czIKaWRyMAo_
2017-03-02 15:06:17,151 (1074/runtime        /handle_request    / 814) DEBUG    Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo2CnMyCmVuczQKbGFuZ2IwczYKbWFudWFsYjFzNwpwcmltYXJ5aTAKczcKdmVyc2lvbnIxCnM2Cmt3YXJnc3M3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZTExCnMxNgo4OWExY2Q3MjgyM2ExMWNkczE3Cm9wZW5TdWJ0aXRsZXNIYXNoczIKMTJzNwplcGlzb2RlbnM0Cm5hbWVzMQoxczgKZXBpc29kaWNzMTIKU2FjcmVkIFNldmVuczQKc2hvd3MxCjFzNgpzZWFzb25uczQKeWVhcnM5MQpCJTNBJTVDQW5pbWUlMjBTZXJpZXMlNUNTYWNyZWQlMjBTZXZlbiU1Q1NhY3JlZCUyMFNldmVuJTIwLSUyMDEyJTIwLSUyMFNhY3JlZCUyMFNldmVuJTJFbWt2czgKZmlsZW5hbWVzNDAKMTIzZmZmNWIxNjQ0MTE3ZmM1ZTQwMTgyMjVhYzY5ZDlkOTFlZGVhMXM4CnBsZXhIYXNoczIKLTFzOApkdXJhdGlvbnM1Cjc1Nzg5czIKaWRyMAo_
2017-03-02 15:06:17,151 (1074/agentkit       /_search           / 957) INFO     Searching for matches for {'openSubtitlesHash': '89a1cd72823a11cd', 'episode': '12', 'name': None, 'episodic': '1', 'show': 'Sacred Seven', 'season': '1', 'plexHash': '123fff5b1644117fc5e4018225ac69d9d91edea1', 'filename': 'B%3A%5CAnime%20Series%5CSacred%20Seven%5CSacred%20Seven%20-%2012%20-%20Sacred%20Seven%2Emkv', 'year': None, 'duration': '-1', 'id': '75789'}
2017-03-02 15:06:17,153 (1074/networking     /load              / 166) DEBUG    Requesting 'http://127.0.0.1:32400/library/metadata/75789/tree'
2017-03-02 15:06:17,186 (1074/logkit         /Info              /  16) INFO     === Search Begin ============================================================================================================
2017-03-02 15:06:17,186 (1074/logkit         /Info              /  16) INFO     --- AniDB.Search() - Begin --------------------------------------------------------------------------------------------------
2017-03-02 15:06:17,186 (1074/logkit         /Info              /  16) INFO     Title: 'Sacred Seven', name: 'None', filename: 'B%3A%5CAnime%20Series%5CSacred%20Seven%5CSacred%20Seven%20-%2012%20-%20Sacred%20Seven%2Emkv', manual: 'False', year: 'None'
2017-03-02 15:06:20,446 (1074/logkit         /Info              /  16) INFO     AniDB - score: '100', id: '  8205', title: 'Sacred Seven' 
2017-03-02 15:06:20,589 (1074/logkit         /Info              /  16) INFO     AniDB - score: ' 35', id: '  8760', title: 'Sacred Seven' 
2017-03-02 15:06:21,493 (1074/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-03-02 15:06:21,503 (1074/runtime        /return_state_data /  88) DEBUG    Sending packed state data (104 bytes)
2017-03-02 15:06:21,503 (1074/runtime        /handle_request    / 924) DEBUG    Response: [200] str, 1016 bytes
2017-03-02 15:06:21,546 (1098/runtime        /handle_request    / 717) DEBUG    Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo3NTc4OXM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQ0CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vYW5pZGItODIwNT9sYW5nPWVuczQKZ3VpZHMxMAphbmlkYi04MjA1czIKaWRyMAo_
2017-03-02 15:06:21,546 (1098/runtime        /handle_request    / 814) DEBUG    Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo3NTc4OXM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQ0CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vYW5pZGItODIwNT9sYW5nPWVuczQKZ3VpZHMxMAphbmlkYi04MjA1czIKaWRyMAo_
2017-03-02 15:06:21,548 (1098/model          /__getitem__       /  32) DEBUG    Loading model with GUID com.plexapp.agents.hama://anidb-8205?lang=en
2017-03-02 15:06:21,551 (1098/model          /_read             / 205) ERROR    Cannot read model from C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\f\3f6355f9711435540e4844b3167d30c4633901a.bundle\Contents\com.plexapp.agents.hama
2017-03-02 15:06:21,551 (1098/networking     /load              / 166) DEBUG    Requesting 'http://127.0.0.1:32400/library/metadata/75789/tree'
2017-03-02 15:06:21,561 (1098/logkit         /Info              /  16) INFO     === Update Begin ============================================================================================================Windows  i386
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - B:\Anime Series\Sacred Seven\Sacred Seven - 11 - Blade Sharpened.mkv
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - B:\Anime Series\Sacred Seven\Sacred Seven - 10 - Aoi's Memory.mkv
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - B:\Anime Series\Sacred Seven\Sacred Seven - 12 - Sacred Seven.mkv
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - B:\Anime Series\Sacred Seven\Sacred Seven - 1 - The Stone's Awakening.mkv
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - B:\Anime Series\Sacred Seven\Sacred Seven - 3 - The Crazy Knight.mkv
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - B:\Anime Series\Sacred Seven\Sacred Seven - 2 - A Bond in the Color of Ruri.mkv
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - B:\Anime Series\Sacred Seven\Sacred Seven - 5 - The Heart's Mirror.mkv
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - B:\Anime Series\Sacred Seven\Sacred Seven - 4 - School Fair of Hell.mkv
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - B:\Anime Series\Sacred Seven\Sacred Seven - 7 - The True Lightstone and Darkstone.mkv
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - B:\Anime Series\Sacred Seven\Sacred Seven - 6 - One More Night.mkv
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - B:\Anime Series\Sacred Seven\Sacred Seven - 9 - Will Like a Rolling Stone.mkv
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - B:\Anime Series\Sacred Seven\Sacred Seven - 8 - Show Me Your Devotion.mkv
2017-03-02 15:06:21,562 (1098/logkit         /Info              /  16) INFO     Update() - metadata.id: 'anidb-8205', Title: 'None', lang: 'en', force: 'True', movie: 'False', max(media.seasons.keys()): 'False'
2017-03-02 15:06:21,563 (1098/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-03-02 15:06:21,563 (1098/logkit         /Info              /  16) INFO     AnimeLists.GetMetadata() - Local custom mapping - No file detected
2017-03-02 15:06:21,680 (1098/logkit         /Info              /  16) INFO     AnimeLists.GetMetadata() - anidb: '8205', tvbdid: '249939', tmdbid: '', imbdid: '', defaulttvdbseason: '1', name: 'Sacred Seven'
2017-03-02 15:06:21,684 (1098/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-03-02 15:06:21,684 (1098/logkit         /Info              /  16) INFO     AniDB.GetMetadata() - AniDB Serie XML: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8205', file: 'AniDB/8205.xml
2017-03-02 15:06:21,687 (1098/logkit         /Debug             /  13) DEBUG    common.LoadFile() - CacheTime: 'Tue Feb 28 17:29:05 2017', Limit: 'Thu Feb 23 15:06:21 2017', url: 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=8205', Filename: 'AniDB\8205.xml' loaded from cache
2017-03-02 15:06:21,688 (1098/logkit         /Info              /  16) INFO     AniDB.GetMetadata() - title: 'Sacred Seven', original_title: Sacred Seven
2017-03-02 15:06:21,690 (1098/logkit         /Info              /  16) INFO     AniDB.GetMetadata() - summary empty: 'False'
2017-03-02 15:06:21,690 (1098/logkit         /Info              /  16) INFO     AniDB.GetMetadata() - Fields: 'summary'
2017-03-02 15:06:21,696 (1098/logkit         /Info              /  16) INFO     AniDB.GetMetadata() - summary: '2011-07-03'
2017-03-02 15:06:21,697 (1098/core           /log_exception     / 574) CRITICAL Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://anidb-8205?lang=en' (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 96, in update
    def update (self, metadata, media, lang, force ):  Update (metadata, media, lang, force,  False)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 73, in Update
    if AniDBid.isdigit():                ANNid, MALid, AniDB_dict =      AniDB.GetMetadata(metadata, media, movie, error_log, AniDBMovieSets, AniDBid, TVDBid, mappingList)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\AniDB.py", line 274, in GetMetadata
    if numEpisodes: metadata.duration = int(totalDuration) / int(numEpisodes) #if movie getting scrapped as episode number by scanner...
TypeError: int() argument must be a string or a number, not 'NoneType'

2017-03-02 15:06:21,700 (1098/model          /_serialize        / 229) DEBUG    Serializing to C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\f\3f6355f9711435540e4844b3167d30c4633901a.bundle\Contents\com.plexapp.agents.hama\Info.xml
2017-03-02 15:06:21,703 (1098/runtime        /return_state_data /  88) DEBUG    Sending packed state data (104 bytes)
2017-03-02 15:06:21,703 (1098/runtime        /handle_request    / 924) DEBUG    Response: [200] str, 16 bytes
KingJ commented 7 years ago

Wow, lots of new settings to play with! 😄

Looks like I made a mistake on the formatting code I posted - common.py line 161, should be exception=e instead of exception=exception. Sorry about that!

If you know how to read list from metadata (genre, collections) as right now, have to rewrite the info at every scan

I've never tried to extract data from Plex's metadata objects before, but it looks like they use the SetObject class. You can view the class definition for this on your PMS install - it's located in Resources\Plug-ins-03e4cfa35\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\attributes.py, line 390 (on PMS 1.4.3). It looks like the contents might be accessible via the internal _items variable?

Dingmatt commented 7 years ago

@KingJ Not likely, the security sand-boxing that Plex uses for the agents don't allow access to variables with underscores.

We might be able to get around it using a 'resource' but I'll be surprised.

KingJ commented 7 years ago

@Dingmatt That's unfortunate, ah well.

ZeroQI commented 7 years ago

@sven-7 Please do not enable simkl yet. not only you need to use logs for pin code, but it doesn't accomplish anything and crashes for now, and need to sort other bugs first.

That should solve writing issue in the meantime.

def SaveFile(filename="", file="", relativeDirectory=""):  #Thanks Dingmatt for folder creation ability
  relativeFilename            = os.path.join (relativeDirectory, filename) 
  relativeDirectory, filename = os.path.split(relativeFilename) #if os.sep in filename:
  fullpathDirectory           = os.path.abspath(os.path.join(CachePath, relativeDirectory))
  if os.path.exists(fullpathDirectory):  Log.Debug("common.SaveFile() - CachePath: '{path}', file: '{file}', directory present".format(path=CachePath, file=relativeFilename))
  else: os.makedirs(fullpathDirectory);  Log.Debug("common.SaveFile() - CachePath: '{path}', file: '{file}', directory absent.".format(path=CachePath, file=relativeFilename))
  try:                    Data.Save(relativeFilename, file)
  except Exception as e:  Log.Info("common.SaveFile() - Exception: {exception}, relativeFilename: '{relativeFilename}'".format(exception=e, relativeFilename=relativeFilename)

So main bug is an "int" issue after "AniDB.GetMetadata() - summary: '2011-07-03'" i know where to look now.... replace if int(tag.get('weight')) >= (int(Prefs['MinimumWeight'])): with: (respect number of leading spaces, 2 per indentation)

if tag.get('weight') and Prefs['MinimumWeight'] and int(tag.get('weight')) >= (int(Prefs['MinimumWeight'])):
sven-7 commented 7 years ago

@ZeroQI -- Sacred Seven is working for me after updating the AniDB.GetMetadata(). Let me know if you want any kind of logs. I tried adding another new show and that worked as well, where it was not before. Thanks!

sven-7 commented 7 years ago

Tried adding a tvdb3 show and it didn't quite work.

2017-03-03 09:05:32,992 (aa4/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-03-03 09:05:32,992 (aa4/logkit         /Info              /  16) INFO     OMDb.GetMetadata() - background, Poster - imdbid: ''
2017-03-03 09:05:32,992 (aa4/logkit         /Info              /  16) INFO     -------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-03-03 09:05:32,992 (aa4/logkit         /Info              /  16) INFO     FanartTv.GetMetadata() - movie:'False', TVDBid: '79895', imdbid:'', tmdbid: '', season: '0', num: '100'
2017-03-03 09:05:33,007 (aa4/core           /log_exception     / 574) CRITICAL Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://tvdb3-79895?lang=en' (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 96, in update
    def update (self, metadata, media, lang, force ):  Update (metadata, media, lang, force,  False)
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 78, in Update
    FanartTV_dict    =    FanartTV.GetMetadata(metadata,        movie, TVDBid, IMDbid, TMDbid)  ### fanart.tv - Background, Poster and Banner - Using IMDbid ###
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\FanartTV.py", line 19, in GetMetadata
    if GetMeta('FanartTV', 'posters') or GetMeta('FanartTV', 'fanarts') or GetMeta('FanartTV', 'banners'):  # No need to re-check "Prefs['FanartTV']" afterwards
  File "C:\Users\Sven\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\common.py", line 52, in GetMeta
    def GetMeta         (source="", field=""            ):  return Prefs[field] and not (Prefs['GetSingleOne'] and metadata_count[field]) and (not source or source in Prefs[field])
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 108, in <lambda>
    _getitem_           = lambda x, y: x.__getitem__(y),
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\runtimekit.py", line 498, in __getitem__
    return self._sandbox.preferences.get()[name]
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ab906953b\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\preferences.py", line 332, in __getitem__
    raise KeyError("No preference named '%s' found." % name)
KeyError: "No preference named 'fanarts' found."

2017-03-03 09:05:33,007 (aa4/model          /_serialize        / 229) DEBUG    Serializing to C:\Users\Sven\AppData\Local\Plex Media Server\Metadata\TV Shows\1\e8cf6596d8b394e0adc5fada10c80399edf11d9.bundle\Contents\com.plexapp.agents.hama\Info.xml
2017-03-03 09:05:33,007 (aa4/runtime        /return_state_data /  88) DEBUG    Sending packed state data (1064 bytes)
2017-03-03 09:05:33,007 (aa4/runtime        /handle_request    / 924) DEBUG    Response: [200] str, 16 bytes
ZeroQI commented 7 years ago

@sven-7 Excellent news! Was tricky since the error line has nothing to do with the error... A lot changed in prefs so will try to search all of them to spot leftovers not changed... Change: GetMeta('FanartTV', 'fanarts') With: GetMeta('FanartTV', 'art') Going through the code as we speak Should i get rid of option GetSingleOne ? It is meant to download one poster, one artwork, etc to load minimal files

uploaded https://github.com/ZeroQI/Hama.bundle/releases/download/Beta/Hama.bundle.2017-03-04.zip still WIP but simpler modules with a function to write to imbricated dict not created yet... Let me know any issue, and will correct found .find function on lists for eps (writers, etc..) but cannot use it, even without arguments tells me i gave 2 instead of 1...

sven-7 commented 7 years ago

@ZeroQI no -- I like the idea of GetSingleOne. Isn't that what was put in to help update episodes that are uploaded early and might need a few more hours before data from AnidB or TheTVDB populates?

I've also noticed several show's changed languages on me for their titles (e.g. "March Comes in like . Lion" is now "Sangatsu no Lion").

I've also seen a few episode titles not downloading properly, but they seem to be TVDB related, perhaps. Have the TVDB modes been affected by this chance?

When I entered the entire series of Gintama in, only the first season populated data and the others did not. That was in TVDB3.

KingJ commented 7 years ago

I think it's worth leaving GetSingleOne in, but not making it enabled by default.