[13] move sort back to right after collection

pull/811/head
meisnate12 3 years ago
parent 7db7a44e4c
commit c20e6d618c

@ -6,12 +6,12 @@ on:
jobs:
release:
commit-notification:
runs-on: ubuntu-latest
steps:
- name: Send Discord Release Notification
- name: Send Discord Commit Notification
uses: meisnate12/discord-notifications@master
with:
webhook_id: ${{ secrets.DEVELOP_WEBHOOK_ID }}
@ -19,4 +19,4 @@ jobs:
title: Plex Meta Manager Develop Push
commits: "true"
username: PMM Develop
avatar_url: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager/master/.github/pmm.png
avatar_url: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager/develop/.github/pmm.png

@ -6,7 +6,7 @@ on:
jobs:
release:
release-notification:
runs-on: ubuntu-latest
steps:

@ -7,7 +7,7 @@ on:
jobs:
docker-develop:
docker-version:
runs-on: ubuntu-latest
steps:

@ -1 +1 @@
1.16.2-develop12
1.16.2-develop13

@ -373,9 +373,9 @@ class Cache:
"imdb_rating = ?, imdb_votes = ?, metacritic_rating = ?, type = ?, series_id = ?, " \
"season_num = ?, episode_num = ?, expiration_date = ? WHERE imdb_id = ?"
cursor.execute(update_sql, (
omdb.title, omdb.year, omdb.released.strftime("%d %b %Y"), omdb.content_rating, omdb.genres_str,
omdb.imdb_rating, omdb.imdb_votes, omdb.metacritic_rating, omdb.type, omdb.series_id, omdb.season_num,
omdb.episode_num, expiration_date.strftime("%Y-%m-%d"), omdb.imdb_id))
omdb.title, omdb.year, omdb.released.strftime("%d %b %Y") if omdb.released else None, omdb.content_rating,
omdb.genres_str, omdb.imdb_rating, omdb.imdb_votes, omdb.metacritic_rating, omdb.type, omdb.series_id,
omdb.season_num, omdb.episode_num, expiration_date.strftime("%Y-%m-%d"), omdb.imdb_id))
def query_mdb(self, key_id, expiration):
mdb_dict = {}
@ -422,10 +422,11 @@ class Cache:
"trakt_rating = ?, tomatoes_rating = ?, tomatoesaudience_rating = ?, tmdb_rating = ?, " \
"letterboxd_rating = ?, certification = ?, commonsense = ?, expiration_date = ? WHERE key_id = ?"
cursor.execute(update_sql, (
mdb.title, mdb.year, mdb.released.strftime("%Y-%m-%d"), mdb.type, mdb.imdbid, mdb.traktid, mdb.tmdbid,
mdb.score, mdb.imdb_rating, mdb.metacritic_rating, mdb.metacriticuser_rating, mdb.trakt_rating,
mdb.tomatoes_rating, mdb.tomatoesaudience_rating, mdb.tmdb_rating, mdb.letterboxd_rating,
mdb.content_rating, mdb.commonsense, expiration_date.strftime("%Y-%m-%d"), key_id
mdb.title, mdb.year, mdb.released.strftime("%Y-%m-%d") if mdb.released else None, mdb.type,
mdb.imdbid, mdb.traktid, mdb.tmdbid, mdb.score, mdb.imdb_rating, mdb.metacritic_rating,
mdb.metacriticuser_rating, mdb.trakt_rating, mdb.tomatoes_rating, mdb.tomatoesaudience_rating,
mdb.tmdb_rating, mdb.letterboxd_rating, mdb.content_rating, mdb.commonsense,
expiration_date.strftime("%Y-%m-%d"), key_id
))
def query_tmdb_movie(self, tmdb_id, expiration):

@ -28,7 +28,6 @@ class Library(ABC):
self.movie_rating_key_map = {}
self.show_rating_key_map = {}
self.run_again = []
self.run_sort = []
self.overlays = []
self.type = ""
self.config = config

@ -277,15 +277,6 @@ def update_libraries(config):
logger.remove_library_handler(library.mapping_name)
run_collection(config, library, metadata, collections_to_run)
logger.re_add_library_handler(library.mapping_name)
if library.run_sort:
logger.info("")
logger.separator(f"Sorting {library.name} Library's Collections", space=False, border=False)
logger.info("")
for builder in library.run_sort:
logger.info("")
logger.separator(f"Sorting {builder.name} Collection", space=False, border=False)
logger.info("")
builder.sort_collection()
if not config.library_first and library.library_operation and not config.test_mode and not collection_only:
library_operations(config, library)
@ -671,7 +662,7 @@ def library_operations(config, library):
if omdb_item and library.mass_content_rating_update == "omdb":
new_rating = omdb_item.content_rating
elif mdb_item and library.mass_content_rating_update == "mdb":
new_rating = mdb_item.certification if mdb_item.certification else None
new_rating = mdb_item.content_rating if mdb_item.content_rating else None
elif mdb_item and library.mass_content_rating_update == "mdb_commonsense":
new_rating = mdb_item.commonsense if mdb_item.commonsense else None
else:
@ -995,8 +986,7 @@ def run_collection(config, library, metadata, requested_collections):
if builder.item_details:
builder.update_item_details()
if builder.custom_sort:
library.run_sort.append(builder)
# builder.sort_collection()
builder.sort_collection()
builder.send_notifications()

Loading…
Cancel
Save