Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Select only specific libraries #67

Open
hacktek opened this issue Oct 24, 2023 · 1 comment
Open

Select only specific libraries #67

hacktek opened this issue Oct 24, 2023 · 1 comment

Comments

@hacktek
Copy link

hacktek commented Oct 24, 2023

Is your feature request related to a problem? Please describe.

Kinda. For combined servers (cloud storage and local storage libraries), it makes sense to create local only libraries and then point the script to only operate on those.

Describe the solution you'd like

A configuration option that limits the script's operations to a set of plex library IDs.

Describe alternatives you've considered

None, my library is very large, so operating the script on all of it is impossible (would take way too long and it would process items that it should not act upon anyways). Pointing it specifically to local libraries would speed up the process since those would be much smaller.

@hacktek
Copy link
Author

hacktek commented Nov 6, 2023

Seems like somewhat of a trivial change in get_media

def __get_media(self, section_type,section_ids):
    sections = self.__get_sections_by_type(section_type)
    media_list = []
    print(sections)
    for section in sections:
        if section.key in section_ids:
            for media in section.all():
                media_list.append(media)
    return media_list

section_ids is simply a list of IDs for a particular section_type, so the specific list from the configuration file would be sent when calling get_expired_media for either "movie" or "show" section_type.

I can create a PR if you want although I did notice an issue. It appears that Plex does not sync watch status across libraries, so if a movie is marked watched on Library "A" (id 1 for example) and the script only runs on Library "B" (id 2), then the script will consider the item unwatched. Not sure if there's a mechanism to mark watch status across libraries.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant