mnamer icon indicating copy to clipboard operation
mnamer copied to clipboard

Crash when using TMDB as provider for episode renaming

Open Sanrax opened this issue 2 years ago • 7 comments

I'm trying to rename an episode file , which works fine when the provider is set to tvdb. However, I would like to use tmdb for episodes too. (TMDB isn't just for movies) After setting the provider for episode files to tmdb, mnamer crashes. TMDB does work fine when used for movie files. For example, it processed "The Fifth Element.mp4" with tmdb fine. It only crashes when used for episode files.

Crash log below -

============================== CRASH REPORT BEGIN ==============================

--------------------------------- environment ----------------------------------

  • date = 2021-10-05
  • platform = Linux-4.19.0-17-amd64-x86_64-with-debian-10.10
  • arguments = ['./']
  • cache location = /home/user/.cache/mnamer-py3.7.sql
  • python version = 3.7.3
  • mnamer version = 2.5.4
  • appdirs version = 1.4.4
  • guessit version = 3.2.0
  • requests version = 2.21.0
  • requests cache version = 0.5.2
  • teletype version = 1.1.0

--------------------------------- stack trace ----------------------------------

Traceback (most recent call last): File "/home/user/.local/lib/python3.7/site-packages/mnamer/main.py", line 23, in main frontend.launch() File "/home/user/.local/lib/python3.7/site-packages/mnamer/frontends.py", line 80, in launch self._process_targets() File "/home/user/.local/lib/python3.7/site-packages/mnamer/frontends.py", line 97, in _process_targets matches = target.query() File "/home/user/.local/lib/python3.7/site-packages/mnamer/target.py", line 233, in query for idx, result in enumerate(results, start=1): File "/home/user/.local/lib/python3.7/site-packages/mnamer/providers.py", line 147, in search if query.id_tmdb: AttributeError: 'MetadataEpisode' object has no attribute 'id_tmdb'

=============================== CRASH REPORT END ===============================

Sanrax avatar Oct 05 '21 21:10 Sanrax

Currently it has integration support with TVDb and TvMaze for television episodes and TMDb and OMDb for movies.

Your desired functionality doesn't even seem to be implemented.

With TVDb's API changes, monetisation and all around shenanigans they are doing, I'd encourage the developers to think about implementing TMDb for series as well. Other projects like Jellyfin already ditched TVDb as the default database and are using TMDb instead.

ereinstein avatar Oct 07 '21 03:10 ereinstein

Other projects like Jellyfin already ditched TVDb as the default database and are using TMDb instead.

Yup, exactly why I was trying this, I wanted the provider for mnamer to match with what my Jellyfin setup is using, which is TMDB. So, I guess this is more of a feature request than a bug report then.

Sanrax avatar Oct 07 '21 03:10 Sanrax

@ereinstein Yea, TVDb is has been threatening to make API changes for a while now. Under the proposed scheme either the project or end users need to pay for use. I reached out to TVDb a few months ago to try and get an API key for testing to implement the user-pin scheme to give mnamer users the option of using that but they wouldn't. So TLDR if they cut TVDB v3 access then I'm dropping TVDb support.

jkwill87 avatar Oct 23 '21 03:10 jkwill87

Yea, TVDb is has been threatening to make API changes for a while now. Under the proposed scheme either the project or end users need to pay for use. I reached out to TVDb a few months ago to try and get an API key for testing to implement the user-pin scheme to give mnamer users the option of using that but they wouldn't. So TLDR if they cut TVDB v3 access then I'm dropping TVDb support.

I see. In that case, do you think that you may add TMDB support for episodes in the future? I would really appreciate it.

Sanrax avatar Oct 23 '21 03:10 Sanrax

@Sanrax

Currently it has integration support with TVDb and TvMaze for television episodes and TMDb and OMDb for movies.

mnamer does not currently support using TMDb to process episode files. I'm not against it but it doesn't seem pressing given that it already has TvMaze support as an alternative provider. I get that it can support episode files but is there a reason that mnamer should add support for it?

jkwill87 avatar Oct 23 '21 03:10 jkwill87

Either way, it should probably not crash the application so I'll tag this as a bug in the meantime.

jkwill87 avatar Oct 23 '21 03:10 jkwill87

Thanks for this wonderful tool @jkwill87. I've come across this issue because neither TVMaze nor TVDB have the episodes for the series I want to clean up in the language I need. Only TMDB provides the episode list in the language I'd need. So, before I found this issue, I too tried to get mnamer to use TMDB for episodes.

devhell avatar Jul 30 '23 14:07 devhell