Comments (5)
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.
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.
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.
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.
Created pull request #36
from hama.bundle.
Related Issues (20)
- Missing Genre entries HOT 3
- Adding to TrueNAS SCALE containers HOT 4
- Japanese Summaries HOT 2
- Make Discover Credits functionality compatible with HAMA HOT 1
- Locked (edited) fields are overwritten when applying anidb mapping HOT 5
- "Refresh Metadata" removes customizations HOT 10
- Not finding the newer series HOT 9
- Newly added episodes of a specific series no longer receive metadata HOT 9
- One Piece [tvdb4-81797] is not downloading any metadata. HOT 2
- Naruto Arcs not being correctly named, I think my tvdb4.mapping file is being ignored and is using the online xml file? HOT 7
- ASS + Hama not correctly identifying Show HOT 9
- Hama Parsing Errors degrading server performance HOT 5
- Movies broken into "episodes" with AniDB HOT 7
- Two shows refuse to load/fetch metadata even after doing a plex dance. Had metadata prior to losing it. HOT 22
- Anime named with year (Trash Guide) causing metadata to not be found HOT 13
- Support new style of subtitle metadata hi, sdh, cc HOT 1
- One Piece not loading metadata HOT 1
- Dr. Stone: Ryuusui keeps getting a high score with other Dr. Stone Titles
- Naming Scheme "Show Title (year)" (according to Anidb) is not being recognized properly
- Suicide Squad Isekai is pulling the Japanese episode summaries from TVDB HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hama.bundle.