Git Product home page Git Product logo

python-plexmovieagentmapper's People

Contributors

josh-gaby avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

python-plexmovieagentmapper's Issues

IndexError: list index out of range

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.

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.