josh-gaby / python-plexmovieagentmapper Goto Github PK
View Code? Open in Web Editor NEWMap between the new Plex Movie Agent guids and IMDB/TMDB/TVDB ids
License: BSD 3-Clause "New" or "Revised" License
Map between the new Plex Movie Agent guids and IMDB/TMDB/TVDB ids
License: BSD 3-Clause "New" or "Revised" License
Describe the bug
When running the example below it errors out about list index out of rage
import plexmovieagentmapper
plex_db_path = '/opt/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db'
test_plex_guid = 'plex://movie/5d7770937a53e9001e7a6381 '
test_imdb_id = 'tt8503618'
test_tmdb_id = '556574'
plex_mapper = plexmovieagentmapper.mapper.PlexMovieAgentMapper(plex_db_path)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/cloudbox/.local/lib/python3.6/site-packages/plexmovieagentmapper/mapper.py", line 27, in __init__
self._imdb_hash, self._tmdb_hash, self._tvdb_hash, self._plex_hash, self._details_hash = self._generate_matching_hash()
File "/home/cloudbox/.local/lib/python3.6/site-packages/plexmovieagentmapper/mapper.py", line 258, in _generate_matching_hash
row_id = re.split(r'^(\d+)', row['guid'].split('tvdb://')[1])[1]
IndexError: list index out of range
To Reproduce
Running the same command against another Plex server/database works just fine as you can see from the expected behavior below
Expected behavior
Test retrieving external agent id from Plex guid:
>>> # Retrieve an IMDB id from the Plex GUID
>>> imdb_id = plex_mapper.get_imdb_from_plex_guid(test_plex_guid)
>>> print(u"IMDB id from Plex guid {} -> {}".format(test_plex_guid, imdb_id))
IMDB id from Plex guid plex://movie/5d7770937a53e9001e7a6381 -> tt8503618
Additional context
I do have extra Agents installed: XBMCnfoMovieImporter, HamaMovies, MyAnimeList.net Agent but not sure if that would be causing this issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.