jkwill87 / mnamer

media file renaming and organizing tool
https://pypi.org/project/mnamer
MIT License
776 stars 66 forks source link

Crash when using TMDB as provider for episode renaming #165

Open Sanrax opened 2 years ago

Sanrax commented 2 years ago

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 ----------------------------------

--------------------------------- 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 ===============================

ereinstein commented 2 years ago

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.

Sanrax commented 2 years ago

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.

jkwill87 commented 2 years ago

@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.

Sanrax commented 2 years ago

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.

jkwill87 commented 2 years ago

@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 commented 2 years ago

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

devhell commented 1 year ago

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.