Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

2.4.0 Filter/Subfilter Overall, tmdb_director, and tmdb_writer #76

Merged
merged 36 commits into from
Nov 4, 2020

Conversation

meisnate12
Copy link

@meisnate12 meisnate12 commented Oct 30, 2020

[2.4.0] - 2020-11-03

Added

Changed

Fixed

  • collection_order was in the code as collection_sort
  • Upgrade PlexAPI dependency to 4.2.0

app/plex_tools.py Outdated Show resolved Hide resolved
app/trakt_tools.py Outdated Show resolved Hide resolved
app/plex_tools.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@@ -1,5 +1,5 @@
# Remove
PyYAML==5.1.2
PyYAML==5.3.1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should just phase out PyYAML altogether in favor of raumel.yaml to avoid two dependencies for similar functionality

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where do we use PyYAML?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, @mza921 it looks like you may have introduced ruamel.yaml? Is there a preference over PyYAML? I don't have an opinion, but we should standardize on one throughout the project I think.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use ruamel.yaml for updating the config file during initial Trakt authorization. Research had led me to this. I prefer it over PyYAML but didn't bother to update the other modules since I mostly worked on Trakt integration.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's default to ruamel.yaml then and remove PyYAML. It looks like it's only used in a couple of places:

@meisnate12
Copy link
Author

keep this open for now i found a silent breaking bug

@mza921
Copy link
Owner

mza921 commented Nov 1, 2020

  1. Yes, let's change subfilters
  2. Yes, change Plex filters to search. Will users now have to specify plex_search as a list type or is it implied?
collections:
  Dave Chappelle:
    plex_search:
      - actor: Dave Chappelle
  1. Just use filters. Good point about global_filters being misleading, since these are scoped at the collection level after all list types are combined.

While I think these are the best way forward, they do break compatibility with existing config files. We need to make sure that the interactive mode also works with these changes.

@meisnate12
Copy link
Author

So I'm thinking I'll be able to have it not break the old configs but it will instead give a warning for any attribute deprecated saying that it will be run as the proper attribute

I hadn't thought about plex_search being a whole category but I'm not mad at it we could make everything under one search AND together and then multiple plex_searches OR together and take out the and. Completely

@meisnate12
Copy link
Author

Also I don't think I've ever used interactive mode lol but I'll start testing it as well

@meisnate12
Copy link
Author

ok introducing plex_search let me know what yall think?

@meisnate12
Copy link
Author

Oh this version should work with any version of the config i put checks in for all the old attributes

README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
config/config.yml.template Outdated Show resolved Hide resolved
Copy link
Owner

@mza921 mza921 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the updates.

@meisnate12
Copy link
Author

no problem I like this script and want to see it improved plus learning python in the process is a great bonus

Btw just push your changes for the new movie Agent and ill get this pull rebased on them the same day so this can go out shortly after

- `director` (Gets every movie with the specified director) (Movie libraries only)
- `tmdb_director` (Gets every movie with the specified director as well as the added TMDb [metadata](#tmdb-people-list-type)) (Movie libraries only)
- `genre` (Gets every movie/show with the specified genre)
- `studio` (Gets every movie/show with the specified studio)
- `year` (Gets every movie/show with the specified year)
- `year` (Gets every movie/show with the specified year) (Put a `-` between two years for a range i.e. `year: 1990-1999` or end with `NOW` to go till current i.e. `year: 2000-NOW`)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep undocumented support for decade?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well i took out decade in favor of the year range i added just do year: 1990-1999 i can add it back in if needed but i figured the range would be less confusing and not bog down the user with another option plus the range isn't limited to 10 years either

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you want me to add decade back or is year range ok?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to keep it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok ill add it back silently

# Conflicts:
#	CHANGELOG.md
#	README.md
@meisnate12 meisnate12 changed the title 2.3.0 Filter/Subfilter Overall, tmdb_director, and tmdb_writer 2.4.0 Filter/Subfilter Overall, tmdb_director, and tmdb_writer Nov 3, 2020
@meisnate12
Copy link
Author

@mza921 my pull is now rebased on 2.3.0 and i upgraded my release to 2.4.0

CHANGELOG.md Outdated
## [2.3.0] - 2020-11-02
## [2.4.0] - 2020-11-03
### Added
- Added `plex_search` to AND searches together
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused about this. So if plex_search does an AND, how do I do an OR? How would this README example work:

collections:
  90s Movies:
    plex_search:
      year:
        - 1990
        - 1991
        - 1992
        - 1993
        - 1994
        - 1995
        - 1996
        - 1997
        - 1998
        - 1999

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it ANDs different attributes and ORs multiples of the same attribute I can try and clarify that in the readme. The program will also tell you exactly how it's searching so for your example it would look like this:

| Processing Plex Search: year(1990 OR 1991 OR 1992 OR 1993 OR 1994 OR 1995 OR 1996 OR 1997 OR 1998 OR 1999)

it will show each AND on the subsequent lines

if you want to AND the same attribute you have to use subfilters

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Nice addition to report the actual query.

@mza921
Copy link
Owner

mza921 commented Nov 4, 2020

Can you rebase on 2.3.1? Then we're good to go.

@meisnate12
Copy link
Author

can do give me a minute

# Conflicts:
#	CHANGELOG.md
#	README.md
#	app/plex_auto_collections.py
@meisnate12
Copy link
Author

ok were good to go i also updated the changelog to include issue and pull numbers for easier tracking

@mza921 mza921 merged commit f992003 into mza921:master Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants