Git Product home page Git Product logo

Comments (5)

EndOfLine369 avatar EndOfLine369 commented on September 27, 2024

Looks like the TMDB section probably also needs it added in. (not tested)

        if 'vote_average' in tmdb_json and tmdb_json['vote_average'] and 'vote_count' in tmdb_json and tmdb_json['vote_count'] > 3: metadata.rating = tmdb_json['vote_average']
        if 'genres'       in tmdb_json and tmdb_json['genres']!=[]:
          metadata.genres.clear()
          for genre in tmdb_json['genres']: metadata.genres.add(genre['name'].strip()) #metadata.genres = tmdb_json['genres'] ???
        if 'production_companies' in tmdb_json and len(tmdb_json['production_companies']) > 0:  # Studio.
          index, company = tmdb_json['production_companies'][0]['id'],""

from hama.bundle.

EndOfLine369 avatar EndOfLine369 commented on September 27, 2024

Looks like the metadata.collections is also not being cleared. But do you know what (if any) duplication issues that would cause? That clear is also easily added in as shown below. (not tested)

          metadata.studio = company
        if 'belongs_to_collection' in tmdb_json and tmdb_json['belongs_to_collection']:
          metadata.collections.clear()
          metadata.collections.add(tmdb_json['belongs_to_collection']['name'].replace(' Collection',''))
        if movie:
          if tmdb_json['tagline']:  metadata.tagline = tmdb_json['tagline']
    for relatedAnime in anime.xpath('/anime/relatedanime/anime'):  related_anime_list.append(relatedAnime.get('id'));
    metadata.collections.clear()
    for element in AniDB_collection_tree.iter("anime") if AniDB_collection_tree else []:
      if element.get('anidbid') in related_anime_list + anidbid_table + [metadata.id.split('-')[1]] :
        set         = element.getparent()
        title, main = self.getAniDBTitle(set.xpath('titles')[0], SERIE_LANGUAGE_PRIORITY)
        metadata.collections.add(title) #metadata.collections.clear()
        Log.Debug("anidbCollectionMapping() - anidbid '%s' is part of movie collection: %s', related_anime_list: '%s', " % (metadata.id.split('-')[1], title, str(related_anime_list)))

from hama.bundle.

EndOfLine369 avatar EndOfLine369 commented on September 27, 2024

When it comes to the 'set.clear()' calls, it is non-consistent if they will always be called or if only called when data is pulled to replace it's current contents. I have no problem with this but just thought i'd point this out. You can find them in the code by just searching for ".add" .

from hama.bundle.

ZeroQI avatar ZeroQI commented on September 27, 2024

I believe we shouldn't update the plex database for no reason so if i found soe metadata, i check the values in database, and if different i erase it and update it if it is a list, or i just update otherwise
I also add a "*" in the logs at the end of the line if i got results but they are already in the database. This make logs reading precise and easy.

Will have a look at code tomorrow and check, and thanks for the many improvements

from hama.bundle.

EndOfLine369 avatar EndOfLine369 commented on September 27, 2024

Created pull request #36

from hama.bundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.