l3uddz / plex_dupefinder

Find and delete duplicate files in Plex
GNU General Public License v3.0
304 stars 54 forks source link

plexapi.exceptions.NotFound: Invalid library section: TV #28

Closed xenDE closed 4 years ago

xenDE commented 4 years ago

Describe the bug on start it stops with error:

# plex_dupefinder

       _                 _                   __ _           _
 _ __ | | _____  __   __| |_   _ _ __   ___ / _(_)_ __   __| | ___ _ __
| '_ \| |/ _ \ \/ /  / _` | | | | '_ \ / _ \ |_| | '_ \ / _` |/ _ \ '__|
| |_) | |  __/>  <  | (_| | |_| | |_) |  __/  _| | | | | (_| |  __/ |
| .__/|_|\___/_/\_\  \__,_|\__,_| .__/ \___|_| |_|_| |_|\__,_|\___|_|
|_|                             |_|

#########################################################################
# Author:   l3uddz                                                      #
# URL:      https://github.com/l3uddz/plex_dupefinder                   #
# --                                                                    #
#         Part of the Cloudbox project: https://cloudbox.works          #
#########################################################################
#                   GNU General Public License v3.0                     #
#########################################################################

Initialized
Finding dupes...
Traceback (most recent call last):
  File "/usr/local/bin/plex_dupefinder", line 344, in <module>
    dupes = get_dupes(section, section_type)
  File "/usr/local/bin/plex_dupefinder", line 51, in get_dupes
    dupes = plex.library.section(plex_section_name).search(duplicate=True, libtype=sec_type)
  File "/usr/local/lib/python3.5/dist-packages/plexapi/library.py", line 55, in section
    raise NotFound('Invalid library section: %s' % title)
plexapi.exceptions.NotFound: Invalid library section: TV

To Reproduce Steps to reproduce the behavior: fresh install under debian 9 described in readme.md

System Information

MASTER cloned, debian 9 f0a79ce

Additional context i have Movie and TV Libs

desimaniac commented 4 years ago

Can you paste the relevant section in your config?

desimaniac commented 4 years ago

Just tested - it's working for me.

Make sure your section in config is called PLEX_LIBRARIES. It's not PLEX_SECTIONS anymore. And options are either 1 or 2.

Might have it be smart enough to figure that out automatically in the future.

xenDE commented 4 years ago

thanks, i forget to edit the PLEX_LIBRARIES.

user# sudo su
root# su plex
plex# /usr/lib/plexmediaserver/Plex\ Media\ Scanner -l
…list ob sections…

and added the movie and series Libs in config.

now it works.

thewriteway commented 2 years ago

For windows the fix is as follows: create a config.json from the sample and edit the following section to reflect the names in your own Plex Environment:

 "PLEX_LIBRARIES": [
    "My Movies",
    "My TV Shows"
  ],