Code Monkey home page Code Monkey logo

metadata.themoviedb.org.python's Introduction

Kodi Logo

websitedocscommunityadd-ons

License Documentation PRs Welcome Contributions Welcome Build Commits

Welcome to Kodi Home Theater Software!

Kodi is an award-winning free and open source software media player and entertainment hub for digital media. Available as a native application for Android, Linux, BSD, macOS, iOS, tvOS and Windows operating systems, Kodi runs on most common processor architectures.

Created in 2003 by a group of like minded programmers, Kodi is a non-profit project run by the XBMC Foundation and developed by volunteers located around the world. More than 500 software developers have contributed to Kodi to date, and 100-plus translators have worked to expand its reach, making it available in more than 70 languages.

While Kodi functions very well as a standard media player application for your computer, it has been designed to be the perfect companion for your HTPC. With its beautiful interface and powerful skinning engine, Kodi feels very natural to use from the couch with a remote control and is the ideal solution for your home theater.

Give your media the love it deserves

Kodi can be used to play almost all popular audio and video formats around. It was designed for network playback, so you can stream your multimedia from anywhere in the house or directly from the internet using practically any protocol available.

Point Kodi to your media and watch it scan and automagically create a personalized library complete with box covers, descriptions, and fanart. There are playlist and slideshow functions, a weather forecast feature and many audio visualizations. Once installed, your computer or HTPC will become a fully functional multimedia jukebox.

Kodi

Getting Started

Kodi's developers work hard to make it support a large range of devices and operating systems. We provide final as well as development builds. To get started, head over to the downloads section and simply select the platform that you want to install it on. A quick start guide to help you get acquainted with Kodi is available in our wiki.

How to Contribute

Kodi is created by users for users and we welcome every contribution. There are no highly paid developers or poorly paid support personnel on the phones ready to take your call. There are only users who have seen a problem and done their best to fix it. This means Kodi will always need the contributions of users like you. How can you get involved?

  • Coding: Developers can help Kodi by fixing a bug, adding new features, making our technology smaller and faster and making development easier for others. Kodi's codebase consists mainly of C++ with small parts written in a variety of coding languages. Our add-ons mainly consist of python and XML. For more information, please have a look at our contributing guide.
  • Helping users: Our support process relies on enthusiastic contributors like you to help others get the most out of Kodi. The #1 priority is always answering questions in our support forums. Everyday new people discover Kodi, and everyday they are virtually guaranteed to have questions.
  • Localization: Translate Kodi, add-ons, skins etc. into your native language.
  • Add-ons: Add-ons are what make Kodi the most extensible and customizable entertainment hub available. Get started building an add-on.
  • Documentation: Kodi's wiki pages are the hub for information about Kodi and surrounding ecosystem. Help make our documentation better by writing new content or correcting existing material.

Not enough free time? No problem! There are other ways to help Kodi.

  • Spread the word: Share Kodi with the world! Tell your friends and family about how Kodi creates an amazing entertainment experience. Stay up to date on the latest stories about Kodi reading our news section, follow us on Twitter and Facebook, or star Kodi's repo if you want to follow development.
  • Donate: We are always happy to receive a donation. Donations are typically used for travel to attend conferences, any necessary paperwork and legal fees, and the yearly XBMC Foundation Developers Conference, where a great deal of coding and planning for the following year occurs. Donations may also be used to purchase necessary hardware and licenses for developers, along with t-shirts, stickers, and other accessories for conferences.
  • Buy Kodi merchandise: Purchasing Kodi gear helps just as much as a donation, and you get something in return! Checkout our store for Kodi branded gear. We regularly add new products so check back often.

Building

Kodi uses CMake as its building system but instructions are highly dependent on your operating system and target platform. Fortunately we've got you covered.

Acknowledgements

Kodi couldn't exist without

  • All the contributors. Big or small a change, it does make a difference.
  • All the developers that write the fantastic software and libraries that Kodi uses. We stand on the shoulders of giants.
  • Our fantastic community for the never ending support, inspiration, feedback, and for keeping us on our toes when we screw up!
  • Our sponsors. Without them, keeping a huge project like this alive would be next to impossible.

License

Kodi is GPLv2 licensed. You may use, distribute and copy it under the license terms.

metadata.themoviedb.org.python's People

Contributors

apo86 avatar gade01 avatar malaterre avatar mkaflowski avatar pkscout avatar razzeee avatar rmrector avatar sundermann avatar taxigps avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metadata.themoviedb.org.python's Issues

Feature request: override season/episode placement with .nfo file

TMDB currently identifies all of the Doctor Who special episodes as belonging to "Season 0" and there are over 200 of them. Although these specials are technically considered to be unaffiliated with a particular season of Doctor Who, many of them were aired in a particular order and it is expected to watch them before or after a particular season.

For example, the Doctor Who special episode "Resolution" is considered S00E156, but I think it should be considered S11E11. Sure, officially S11 only had 10 episodes, but you're supposed to watch Resolution after you finish S11, so marking it as S11E11 would place the episode with the rest of S11 and make it easier to find.

Therefore, I would like a way to override the season/episode placement with an .nfo file. I was hoping that this S00E156.nfo file would do the trick, but it appears that metadata.themoviedb.org.python ignores .nfo files:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<episodedetails>
    <title>Resolution</title>
    <showtitle>Doctor Who (2005)</showtitle>
    <uniqueid type="tmdb">57243</uniqueid>
    <season>0</season>
    <episode>156</episode>
    <displayseason>11</displayseason>
    <displayepisode>11</displayepisode>
    <original_filename>S00E156.mkv</original_filename>
</episodedetails>

SSL Certificate Verication Failed Error on Xbox with v19 nightlie (v19 not released yet on Xbox)

Currently this addon does not work on Xbox due SSL certificates verification issue:

SSL_CERTIFICATE_VERIFICATION_ERROR

On Xbox and probably other systems that do not have access to the "trusted root store" from OS it is necessary to specify a valid path to the CA cert bundle. It is the same issue that has been solved recently for CurlFile.cpp (xbmc/xbmc#19665 | xbmc/xbmc#19861) that now also needs to be addressed for addons (Python 3). Supposedly Python 2 did not check the validity of the certificates by default and therefore this problem did not exist before.

Fortunately it seems pretty easy to fix:

import ssl and create default context with:

CONTEXT = ssl.create_default_context()

use load_verify_locations() and pass relative path to kodi build-in CA certs bundle

CONTEXT.load_verify_locations(cafile='system/certs/cacert.pem')

Use SSL context in ulropen

response = urlopen(req, context=CONTEXT)

I simulated Xbox behavior with MSYS2 on Windows 10 and this code that emulates api_utils.py from this addon:

 try:
	import ssl
	from urllib2 import Request, urlopen
	from urllib2 import URLError
except ImportError:
	import ssl
	from urllib.request import Request, urlopen
	from urllib.error import URLError

HEADERS = {}
theerror = ''

CONTEXT = ssl.create_default_context()
CONTEXT.load_verify_locations(cafile='certs/cacert.pem')

req = Request('https://www.google.com', headers=HEADERS)

try:
	response = urlopen(req, context=CONTEXT)
except URLError as e:
	if hasattr(e, 'reason'):
		theerror = {'error': 'failed to reach the remote site\nReason: {}'.format(e.reason)}
	elif hasattr(e, 'code'):
		theerror = {'error': 'remote site unable to fulfill the request\nError code: {}'.format(e.code)}
	print(theerror)

resp = response.read()

print (resp)

urlopen without SSL context fails with same error that addon on Xbox (because MSYS2 also does not have access by default to trusted CA store).

Once added SSL context lines is fixed and prints correct URL response.

At the moment I have not wanted to push a PR because I think the people who habitually maintain Kodi addons will do it better (my knowledge of Python is pretty basic).

Maybe some more checking would also be missing here: for example running the code as it is currently and add SSL context only if the request fails with an SSL related error. The reason is that in Windows 10 as it is now it is already fine because the SSL certificates of the OS are used which is probably better because they will always be more up-to-date.

trying to load setting definitions from old format...

In Kodi v19, I have been seeing the following message for a little while. Do you know why it happens?
What settings are in the old format?

DEBUG <general>: VideoInfoScanner: Skipping dir 'F:\HTPC Movies from TV\Hunt (2020)\' due to no change
DEBUG <CAddonSettings[metadata.themoviedb.org.python]>: trying to load setting definitions from old format...

The rating name should be changed from "tmdb" to "themoviedb"

Ratings for TheMovieDB are scraped as follows using Universal Movie scraper and TheMovieDB XML scraper

<rating name="themoviedb" max="10">
    <value>7.700000</value>
    <votes>12873</votes>
</rating>

This Python scraper saves the rating as

<rating name="tmdb" max="10">
            <value>5.200000</value>
            <votes>5200</votes>
        </rating>

The rating name should be changed from "tmdb" to "themoviedb"

From the forums

Fanart language seems to be ignored

I have set "pl" langague but I enabled fanart and set "en". For movies like "Meet the Fockers" I get "pl" poster. Why?
Does it should be?:
"en" (fanart) -> "pl" (tmdb)
and for "pl" set in fanart:
"pl" (fanart) -> "en" (fanart as fallback in the new version) -> "pl" (tmdb)

He can't find some posters for movies

Hello,

For some time, when I search for movies or series, the addon does not find the poster. But it is there.

For example : Smurfs: The Lost Village

image

Maybe there is a problem with TMDB?

Sincerely

Duplicate or triplicate movie entries from one file on filesystem

I am getting multiple entries on some movies, but not others, even though there is only one copy/version of a given file on the filesystem, on Kodi 10.0.0

2021-09-19 13:14:50.453 T:1119     INFO <general>: CAddonMgr::FindAddons: metadata.common.themoviedb.org v3.2.17 installed
2021-09-19 13:14:50.453 T:1119     INFO <general>: CAddonMgr::FindAddons: metadata.generic.albums v1.0.14 installed
2021-09-19 13:14:50.453 T:1119     INFO <general>: CAddonMgr::FindAddons: metadata.generic.artists v1.0.14 installed
2021-09-19 13:14:50.454 T:1119     INFO <general>: CAddonMgr::FindAddons: metadata.local v1.0.1 installed
2021-09-19 13:14:50.454 T:1119     INFO <general>: CAddonMgr::FindAddons: metadata.themoviedb.org v5.2.6 installed
2021-09-19 13:14:50.454 T:1119     INFO <general>: CAddonMgr::FindAddons: metadata.themoviedb.org.python v1.4.0+matrix.1 installed
2021-09-19 13:14:50.454 T:1119     INFO <general>: CAddonMgr::FindAddons: metadata.tvshows.themoviedb.org v3.5.13 installed
2021-09-19 13:14:50.454 T:1119     INFO <general>: CAddonMgr::FindAddons: metadata.tvshows.themoviedb.org.python v1.4.7 installed
...
2021-09-19 14:31:23.817 T:2359     INFO <general>: [metadata.themoviedb.org.python]: Find movie with title 'Wanderers' from year 'None'
2021-09-19 14:31:23.978 T:2359     INFO <general>: CPythonInvoker(73, /storage/.kodi/addons/metadata.themoviedb.org.python/python/scraper.py): script successfully run
2021-09-19 14:31:23.979 T:2359     INFO <general>: initializing python engine.
2021-09-19 14:31:24.410 T:2359     INFO <general>: CPythonInvoker(73, /storage/.kodi/addons/metadata.themoviedb.org.python/python/scraper.py): script successfully run
2021-09-19 14:31:25.025 T:2359     INFO <general>: initializing python engine.
2021-09-19 14:31:25.035 T:2359     INFO <general>: [metadata.themoviedb.org.python]: Find movie with title 'Wanderers' from year 'None'
2021-09-19 14:31:25.079 T:2359     INFO <general>: CPythonInvoker(73, /storage/.kodi/addons/metadata.themoviedb.org.python/python/scraper.py): script successfully run

Python 2 - Exact movie title matches not working well with Unicode titles

There is a function is_best in tmdb.py that is looking for exact title matches in order to boost them to the top of the results list (because TMDB itself fails to do so):

def is_best(item): return item['title'].lower() == title and ( not year or item.get('release_date', '').startswith(year))

This does not work well with unicode titles. As far as I can tell because one of the strings in the comparison is not correctly encoded.

For example scraping the German title "Verschwörung" ("The Girl in the Spider's Web") with the release year 2018 added and search language de-DE, returns "Die UFO-Verschwörung" and "Die Damaskus Verschwörung" (both of which also released in 2018) higher than the exact match.

In my attempts to get it to work, I ended up with:

def is_best(item): return item['title'].lower().encode('utf-8') == title and ( not year or item.get('release_date', '').startswith(year))

And with this, the exact match is correctly returned at the top of the list.
I'm not sure if this is a "good" fix and I have not tested this beyond the one title. I would appreciate it if someone who knows what they're doing could have a look.
Thanks!

UnboundLocalError: local variable 'search_results' referenced before assignment

2021-10-19 21:25:35.008 T:2991     INFO <general>: [metadata.themoviedb.org.python]: Find movie with title 'Fabricated City' from year 'None'
2021-10-19 21:25:35.010 T:2991    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'UnboundLocalError'>
                                                   Error Contents: local variable 'search_results' referenced before assignment
                                                   Traceback (most recent call last):
                                                     File "/home/osmc/.kodi/addons/metadata.themoviedb.org.python/python/scraper.py", line 185, in <module>
                                                       run()
                                                     File "/home/osmc/.kodi/addons/metadata.themoviedb.org.python/python/scraper.py", line 172, in run
                                                       search_for_movie(params["title"], params.get("year"), params['handle'], settings)
                                                     File "/home/osmc/.kodi/addons/metadata.themoviedb.org.python/python/scraper.py", line 40, in search_for_movie
                                                       if not search_results:
                                                   UnboundLocalError: local variable 'search_results' referenced before assignment
                                                   -->End of Python script error report<--

2021-10-19 21:25:35.421 T:2991  WARNING <general>: CPythonInvoker(9, /home/osmc/.kodi/addons/metadata.themoviedb.org.python/python/scraper.py): the python script "/home/osmc/.kodi/addons/metadata.themoviedb.org.python/python/scraper.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon9xbmcaddon5AddonE
2021-10-19 21:25:35.421 T:2991     INFO <general>: Python interpreter stopped
2021-10-19 21:25:35.433 T:2979    ERROR <general>: GetDirectory - Error getting plugin://metadata.themoviedb.org.python/?action=find&pathSettings=%7b%22RatingS%22%3a%22TMDb%22%2c%22add_tags%22%3atrue%2c%22certprefix%22%3a%22Rated%20%22%2c%22enable_fanarttv_artwork%22%3afalse%2c%22fanart%22%3atrue%2c%22fanarttv_clientkey%22%3a%22%22%2c%22fanarttv_language%22%3a%22en%22%2c%22imdbanyway%22%3atrue%2c%22keeporiginaltitle%22%3afalse%2c%22landscape%22%3atrue%2c%22language%22%3a%22de-DE%22%2c%22lastUpdated%22%3a%220%22%2c%22multiple_studios%22%3atrue%2c%22originalUrl%22%3a%22%22%2c%22previewUrl%22%3a%22%22%2c%22searchlanguage%22%3a%22en-US%22%2c%22tmdbcertcountry%22%3a%22de%22%2c%22trailer%22%3afalse%2c%22traktanyway%22%3afalse%7d&title=Fabricated%20City

Pretty sure #101 is responsible for this.

Folder name not used for search?

Hello again..

I found another kind of issue in the log files that I don't really understand.

  • If a folder contains a dvd image (*.ifo files, etc.), the scraper automatically takes the folder name to search for the movie.
  • If a folder contains a packed dvd image (*.iso file), the scraper takes only the file name of the iso file for the seach. If this fails, it is not performing a search using the folder name but skips the movie entirely.

It seems to me that the scaper is making things a bit too easy for himself ;)

I added an examle here: log.txt
The file structure is here:
grafik

When searching the folder name "Die Tribute von Panem (2) - Catching fire" TMDB succeeds. But when searching only the file name "tribute catching fire disc1" it fails.


I think this problem applies to many other cases as well, i.e. when the file in the folder is just named "Disc1.iso" or something...

Request to handle TMDB ID´s in file names

It would be great to be able to parse the TMDB ID in the file name. As it is for now the search function is tmdb/12345, which you cant name a file with, because of the "/".

As it is only one line of code i made a pull request. Don´t know if this will be an issue somewhere else, but for me it is working.

[Request] Option to lower images resolution

Hi there, I think that would be great if we had the option to lower the quality from the scrapped images, as there are a lot of tv boxes that has only 8gb internal storage as mibox.
I believe that would be very simple to implement just change the /original/ in the url image of tmdb to /w500/ or other resolutions

Thanks in advance

The Movie Database does no longer update TV Show

Version number: 3.5.14
Kodi/repository version: 18.2

Logging Output:

2023-07-04 17:10:18.337 T:1764786912   DEBUG: CAddonSettings[metadata.tvshows.themoviedb.org]: loading setting definitions
2023-07-04 17:10:18.337 T:1764786912   DEBUG: CAddonSettings[metadata.tvshows.themoviedb.org]: trying to load setting definitions from old format...
2023-07-04 17:10:18.338 T:1764786912   DEBUG: CAddonSettings[metadata.tvshows.themoviedb.org]: loading setting values
2023-07-04 17:10:18.588 T:1764786912   DEBUG: VideoInfoScanner: Rescanning dir '/media/daniels/TOSHIBA EXT/Videos/Serien/Krimi/White Collar (2009)/' due to change (40a75b0610d1ff22f5cdfd8f00d0abf5 != 6ddc18f29fd9f47617dda430de5f70e4)
2023-07-04 17:10:18.598 T:1764786912   DEBUG: VideoInfoScanner: Found episode match /media/daniels/TOSHIBA EXT/Videos/Serien/Krimi/White Collar (2009)/Staffel-01/S01E01 - Agent Mit Spitzbube.mp4 (s1e1) [s([0-9]+)[ ._x-]*e([0-9]+(?:(?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
…
2023-07-04 17:10:18.628 T:1764786912   DEBUG: VideoInfoScanner: Found episode match /media/daniels/TOSHIBA EXT/Videos/Serien/Krimi/White Collar (2009)/Staffel-06/S06E03 - Wie In Alten Zeiten.mp4 (s6e3) [s([0-9]+)[ ._x-]*e([0-9]+(?:(?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
2023-07-04 17:10:18.628 T:1764786912   DEBUG: VideoInfoScanner: Found episode match /media/daniels/TOSHIBA EXT/Videos/Serien/Krimi/White Collar (2009)/Staffel-06/S06E04 - Im Krieg Und In Der Liebe.mp4 (s6e4) [s([0-9]+)[ ._x-]*e([0-9]+(?:(?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
2023-07-04 17:10:18.628 T:1764786912   DEBUG: VideoInfoScanner: Found episode match /media/daniels/TOSHIBA EXT/Videos/Serien/Krimi/White Collar (2009)/Staffel-06/S06E05 - Der Maulwurf.mp4 (s6e5) [s([0-9]+)[ ._x-]*e([0-9]+(?:(?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
2023-07-04 17:10:18.810 T:1764786912   DEBUG: GetEpisodeList: Searching 'https://api.themoviedb.org/3/tv/21510?api_key=***&language=de-DE&append_to_response=content_ratings,credits,external_ids,images&include_image_language=de-DE,en,null' using The Movie Database scraper (file: '/home/daniels/.kodi/addons/metadata.tvshows.themoviedb.org', content: 'tvshows', version: '3.5.14')
2023-07-04 17:10:18.843 T:1764786912   DEBUG: CurlFile::Open(0x5e343768) https://api.themoviedb.org/3/tv/21510?api_key=***&language=de-DE&append_to_response=content_ratings,credits,external_ids,images&include_image_language=de-DE,en,null
2023-07-04 17:10:18.852 T:1764786912   DEBUG: Get: Using "UTF-8" charset for "https://api.themoviedb.org/3/tv/21510?api_key=***&language=de-DE&append_to_response=content_ratings,credits,external_ids,images&include_image_language=de-DE,en,null"
2023-07-04 17:10:18.857 T:1764786912   DEBUG: scraper: GetEpisodeList returned <episodeguide></episodeguide>
2023-07-04 17:10:18.858 T:1764786912 WARNING: No information found for item '/media/daniels/TOSHIBA EXT/Videos/Serien/Krimi/White Collar (2009)/', it won't be added to the library.

I've replaced the api key with asterisks.

ä,ö,ü - umlaute interpretation wrong when searching TMDB?

Hi!

While browsing the log files I ran into a problem I hadn't thought of before: I live in Germany and while we have the same Latin alphabet as the English language, we got a few extra letters, most important Ä, Ö, Ü (and ä, ö, ü).

Kodi and this scaper addon are totally fine with that, but TMDB is a bit pesky about them - and eats them only if they are formatted in a certain way. See here: TMDB Forum

This means with the current search formatting of this addon, films with names containing ä, ö, ü will not be found.

I added an example Log.txt as an attachment.

It should have found this TMDB movie, which is found when pasting the name detected by this addon ("Der Hundereinjährige der die Rechnung nicht bezahlte und verschwand") into the online search bar of TMDB. So I'm pretty sure the problem is in the formatting of the API call...

Language codes

TheMovieDB seems to now have issue with two character language codes and Travis Bell has requested we update to using four character language codes.

Initially reported on the forum here... https://forum.kodi.tv/showthread.php?tid=339672&pid=2972074#pid2972074 and subsequently confirmed by me and others members.

This is a problem... fr
Resolved by using this... fr-FR

Conversation at TheMovieDB can be found here...
https://www.themoviedb.org/talk/5f423cce6a34480036b64034?page=1#5f5e96643123450038603e07

Thanks for the reminder @rmrector

@pkscout Affects TV Shows as well.

Error Type: <type 'exceptions.AttributeError'>

Using the tmdb/188412 method to scrape a movie, the scraper errors on some movies.

Log can be found here... https://paste.kodi.tv/ezonoqegob.kodi
A successful scrape can be found on line 1032
Failed scrape can be found on line 1497

The second item is designated as an Adult movie on TMDB.

Using a Parsing NFO file also fails,, whereas this would work with the XML version of the scraper.

The failed scrape results in a completely empty movie entry

failed

Set Information not scraped

Just noticed today that when I scraped Doctor Strange in the Multiverse of Madness (2022) into my library, no Set data was scraped.

The two movies are part of a Set... https://www.themoviedb.org/collection/618529-doctor-strange-collection
The API response provides Set data... API

But no Set data is added to the library, or visible in the exported NFO file.
Also no Set artwork is downloaded either from fanart.tv or TMDB.

Log... https://paste.kodi.tv/iwiweterub.kodi

I then tried scraping Spider-Man No Way Home (2021) and no Set data was scraped there either.

Artwork Settings

Now that new settings for artwork have been merged into v19 allowing a user to select None, Custom, Basic and Maximum artwork levels, is it necessary to keep artwork settings in scrapers also?

I note that the music scrapers by ronie have done away with artwork settings, instead relying on the new Kodi artwork settings to determine which artwork is used.

It would be more streamlined to have a single step to set artwork, rather than the two step system we have now of 1. Scrapers and
2. advancedsettings.xml / the new artwork settings.

Do not traverse inside .ISO files and ignore VIDEO_TS/*.VOB files inside .ISO

It appears that Kodi 19 mounts .ISO files automatically and the scarper traverses inside .ISO files and finds a bunch of .VOB files that it tries to look up at TMDB. This is very slow and it never has a chance of doing anything useful. There can be many .VOB files inside an .ISO, multiply that with a bunch of .ISO files and every library update can take a long time.

Example of a failed lookup:
'archive://nfs%3a%2f%2f192.168....%2fnas%2f...%20(1989).ISO/VIDEO_TS/VTS_14_4.VOB'

2021-03-27 11:30:59.466 T:13782    INFO <general>: [metadata.themoviedb.org.python]: Find movie with title 'VTS_14_4' from year 'None'
2021-03-27 11:30:59.467 T:13782   DEBUG <general>: using title of vts_14_4 to find movie
2021-03-27 11:30:59.467 T:13782   DEBUG <general>: Calling URL "https://api.themoviedb.org/3/search/movie?api_key=...&language=en-US&query=vts_14_4"
2021-03-27 11:30:59.671 T:13782   DEBUG <CAddonSettings[metadata.themoviedb.org.python]>: trying to load setting definitions from old format...
2021-03-27 11:30:59.674 T:13782    INFO <general>: CPythonInvoker(2, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/metadata.themoviedb.org.python/python/scraper.py): script successfully run
2021-03-27 11:30:59.674 T:13759 WARNING <general>: No information found for item 'archive://nfs%3a%2f%2f192.168....%2fnas%2f...%20(1989).ISO/VIDEO_TS/VTS_14_4.VOB', it won't be added to the library.

This is a single .ISO file on the filesystem but something in Kodi mounts it as an archive.

Instead, for .ISO files it should try to look up the title based on the .ISO file name and stop. It should recognize patterns such as archive://*.ISO/VIDEO_TS/*.VOB and ignore them by default, these never lead to anything useful.

Support for include_adult query parameter

Currently the scraper does not find adult content on TMBD.

The TMDB API has an include_adult query parameters, which defaults to false. It would be nice to have a setting include_adult to support this functionality.

Actors - feature request

Recently I have been undertaking a clean up of my library- deleting movies, rescraping others to update their data.

I noticed that out of 660 movies and 170 tv shows, I have a little over 38,500 actors listed in the database. I feel this is an incredible amount of actors.

Out of 38,500 actors, 14,760 (39%) do not have images. Most of these are the uncredited extras or one-time actors, and this is very noticeable when flicking through the movie information page, with all the blank actors images.
Out of the remaining, who knows how many have broken artwork links from the many artwork purges at TMDB, which will become apparent when I next rebuild my library.

My requests, which involve a couple of extra settings...

  1. When scraping actors data, if the actor has no artwork URL, discard that actor
  2. Option to limit the number of actors scraped per movie/tv show- 5, 10 or 20 or a user configured amount.

Maybe @pkscout and @romanvm could consider this for their scrapers also

It would also be nice to sort out that actors issue (is it a json-rpc problem?) so that artwork dump can also download actors images to the .actors folder

Thanks.

Problem with pt-br language

The setings.xml file describes the Brazilian Portuguese language as pt-br, however the correct one is pt-BR. The lowercase string is returning the same results as (pt) portuguese of portugal.

Please change from pt-br to pt-BR.

Selected language ignored for Posters

A member has reported that scraping movies in German always returns an English poster. Two examples he provided are...

https://www.themoviedb.org/movie/12495-das-singende-klingende-b-umchen
https://www.themoviedb.org/movie/8703-t-i-o-ky-pro-popelku

I confirmed that when setting the scraper language to de-DE, the English poster is scraped, even though German posters exist.

In the API return, the primary poster with "en" language is listed first, then the language specific posters follow.
It seems the scraper picks the first poster out of the list, ignoring the language.
https://api.themoviedb.org/3/movie/12495?include_image_language=de%2Cen%2Cnull&api_key=f090bb54758cabf231fb605d3e3e0468&append_to_response=trailers%2Cimages%2Creleases%2Ccasts%2Ckeywords&language=de-DE

Scraping starts at line 1040... https://paste.kodi.tv/oveyatomax.kodi

Posters not scraped in selected language

The XML scraper has been experiencing issues for the last few weeks, and I have been recommending users to switch over to this Python scraper so they can continue scraping.

Unfortunately I have a steady stream of complaints that the users keep getting English posters instead of posters in their selected language.

Is there any chance this can be fixed? IIRC I think I raised this a couple of months ago.

If you need an example to test,
https://www.themoviedb.org/movie/625568-unhinged/images/posters?image_language=fr

Missing Documentation?

Hi all,

I am using this addon in KODI - and I'm a big fan of it!
Unfortunately some of my movies and series stayed undetected. Since not being an absoulte beginner to programming I decided to take a look at the code to figure out why it doesn't like them.

But I'm somehow stuck understanding the codebase because I can not find any documentation on the addon or code itself. Is there really nothing documented?

I am particularly interested in how the (movie) source Paths are searched through and how it parses film names from these folders to search for it on tMDB.

Best regards
Luke

Set as default movie scraper

@rmrector

Could your scraper please be set as the default movie scraper for v19.

I have used it for well over a year now and it is robust and works extremely well.

The current XML scrapers have many bugs and are essentially unmaintained. We should be offering users the best we have.

(The Music library has already switched over to the Python version of scrapers as default.)

Scraper not available in v19 Matrix

After a recent update to a more recent v19 nightly, the version of this scraper installed via zip is no longer compatible and disabled.

The scraper is not available in the v19 repository.

Please make this scraper available for v19.

Allow interchange of and / ampersand (&)

The scraper will not match and with & (ampersand) unless TMDB has both as alternate titles. Not all file systems allow or handle ampersands in file names properly, so it'd b e great if the scraper could match them. Example:

Cats and Dogs (2001).mkv

will not match TMDB because the actual title is "Cats & Dogs (2001)", but if you update TMDB with an alternate title of "Cats and Dogs" then the scraper will work. This is cumbersome maintenance on the TMDB side - would be better if TMDB would just look at "Cats and Dogs" and match it to "Cats & Dogs" by regex. thanks!

[Request] Option to disable Season titles

I am using Titan Bingie Mod and i have some shows that use the Season titles rather than the numbers and by doing this it places the seasons out of order, if it was in the correct order it wouldnt be an issue for me but it is. Can you consider adding an option to just use regular season numbers rather than season titles when scraping and adding metadata for TV shows?

Error Type: <type 'exceptions.ValueError'>

Discovered this by accident, and I don't think it will affect many people though. I can replicate it, but cannot replicate with other scrapers.

Line 1089... https://paste.kodi.tv/sumarilibe.kodi

Steps to replicate...

  1. Go to Videos>Files>Source>Movie.
  2. Select i to scrape that single movie
  3. Once scraped remain in Videos>files and call up the Context menu on the same movie
  4. Select Change content and change the scraper to Universal Movie Scraper (you are changing the scraper for the movie, not the source)
  5. Use i to call up the Information page for the already scraped same movie then select Refresh.
  6. Ignore local info and pick the correct movie from the list
  7. Scraping fails.
  8. Checking the log, it seems that the Python scraper still remains active, even though the scraper was changed to another one.

IMDB Ratings

IMDB ratings are no longer scraped. I expect this is due to the changes at IMDB

[FEATURE] sorttitle support

Hi,

Would be very nice to have sorttitle support. Use case:

  • I want to have full titles included, that means <my_country_title> and <original title>
  • tmdb scraper fill both title and originaltitle fields
  • my skin GUI supports dynamic switching of title formats

Due Kodi's inability to sort list according original title, only "workaround" is use sorttitle, which could be set up to originaltitle or title, depending on user's scraper setup.

Are you OK with adding option to choose, which title will be used for sorting by sorttitle? In case, that "Keep original name" would be disabled (ie. scraper scraps and keep both titles), that option would be active and let user choose, which title use to sort list (when using SortByTitle on list).

Fetch second page of search results

In my experience TMDB is not always great at ordering results. At least for German titles - I don't know how valid this statement is for languages.
I've come accross several examples where searching for title+year did not produce the desired match in the first page of results.

Two examples:

  1. https://api.themoviedb.org/3/search/movie?api_key=KEY&language=de-DE&query=Es&page=2&year=2017 (Original movie title "IT" - the one with the clown)
    Note this query is already for page 2. It returns one and a half pages of various Spanish, French and English movies (none of which are exact title matches) before the actual result.

  2. https://api.themoviedb.org/3/search/movie?api_key=KEY&language=de-DE&query=Still&page=2&year=2016 (Original movie title "Hush")
    Again, page 2 of results. Here page 1 also includes an exact title match - which in my case is the wrong one and judging by the popularity score I'm probably not alone in that.

So far I've not encountered any titles with a desired result on page 3 or beyond, but it might be possible.

It's a niche problem and I know that you can search by IDMB ID to circumvent this issue, but fetching a second page of movie search results is definitely more convenient in those cases. It has a better shot at an exact tile match and even if not gives the user more options to select from when doing a manual search.

A very simple implementation might look like this:
apo86@0bc61fd
apo86@0e76a74

Of course I don't know if there are any API usage restrictions / rate limits that might make this approach unfeasible. Or if the performance hit is unacceptable.

Any thoughts?

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.