Skip to content

Commit

Permalink
Fix issue where Movie format does not have info.database assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
nattadasu committed Dec 8, 2024
1 parent a3ff119 commit 4673be0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions modules/common_movie.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
@./medianame.groovy
{" ("}{y}{")"}
{
def db_name = any { info.database } { "IMDb" }
def db_name = id == tmdbid ? "TheMovieDB" : "IMDb"
def db_map = [
"TheMovieDB": "tmdbid",
"TheTVDB::Movie": "tvdbid",
"IMDb": "imdbid"
]
def db_src = db_map[db_name]
Expand Down
2 changes: 1 addition & 1 deletion modules/medianame.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// Replace title from short_title if series_id matches "series" from filebot
// Otherwise, use the original name
def db_name = any { info.database } { "IMDb" }
def db_name = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" }
def fixed_id = db_name == "IMDb" ? "tt${id}" : id
def name_ = n
short_title.each {
Expand Down
2 changes: 1 addition & 1 deletion modules/r18_checker.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[236530, tmdb_tv] // How I Attended an All-Guy's Mixer, 2024
]

def db_name = any { info.database } { "IMDb" }
def db_name = any { info.database } { id == tmdbid ? "TheMovieDB" : "IMDb" }
def fixed_id = db_name == "IMDb" ? "tt${id}" : id

// REQUIRES USER TO SET ADDITIONAL PROPERTY ON FILEBOT
Expand Down

0 comments on commit 4673be0

Please sign in to comment.