Skip to content

Commit

Permalink
add DisableMaleActors setting
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtyRacer1337 committed Dec 23, 2024
1 parent e53f748 commit dcc4a2b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public PluginConfiguration()

this.DisableMediaAutoIdentify = false;
this.DisableActorsAutoIdentify = false;
this.DisableMaleActors = false;

this.ScenesImage = ScenesImageStyle.Poster;

Expand Down Expand Up @@ -140,6 +141,8 @@ public PluginConfiguration()

public bool DisableActorsAutoIdentify { get; set; }

public bool DisableMaleActors { get; set; }

public ScenesImageStyle ScenesImage { get; set; }

public bool AddDisambiguation { get; set; }
Expand Down
8 changes: 8 additions & 0 deletions Jellyfin.Plugin.ThePornDB/Configuration/configPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ <h1>ThePornDB</h1>
<span>Disable Actors Auto Identify</span>
</label>
</div>
<div class="checkboxContainer checkboxContainer-withDescripton">
<label class="emby-checkbox-label">
<input id="DisableMaleActors" name="DisableMaleActors" type="checkbox" is="emby-checkbox" />
<span>Disable Male Actors</span>
</label>
</div>
<div class="selectContainer">
<label class="selectLabel" for="ScenesImage">Scenes Image Option</label>
<select is="emby-select" id="ScenesImage" name="ScenesImage" class="emby-select-withcolor emby-select">
Expand Down Expand Up @@ -177,6 +183,7 @@ <h1>ThePornDB</h1>
$('#UnmatchedTag').val(config.UnmatchedTag).change();
$('#DisableMediaAutoIdentify').prop('checked', config.DisableMediaAutoIdentify)
$('#DisableActorsAutoIdentify').prop('checked', config.DisableActorsAutoIdentify);
$('#DisableMaleActors').prop('checked', config.DisableMaleActors);
$('#ScenesImage').val(config.ScenesImage).change();
$('#ActorsRole').val(config.ActorsRole).change();
$('#ActorsImage').val(config.ActorsImage).change();
Expand Down Expand Up @@ -205,6 +212,7 @@ <h1>ThePornDB</h1>
config.UnmatchedTag = $('#UnmatchedTag').val();
config.DisableMediaAutoIdentify = $('#DisableMediaAutoIdentify').prop('checked');
config.DisableActorsAutoIdentify = $('#DisableActorsAutoIdentify').prop('checked');
config.DisableMaleActors = $('#DisableMaleActors').prop('checked');
config.ScenesImage = $('#ScenesImage').val();
config.ActorsRole = $('#ActorsRole').val();
config.ActorsImage = $('#ActorsImage').val();
Expand Down
5 changes: 5 additions & 0 deletions Jellyfin.Plugin.ThePornDB/Providers/MetadataAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ public static async Task<MetadataResult<Movie>> SceneUpdate(string sceneID, Canc
actor.Role = role;
}

if (Plugin.Instance.Configuration.DisableMaleActors && string.Equals(gender, "male", StringComparison.OrdinalIgnoreCase))
{
continue;
}

result.People.Add(actor);
}

Expand Down

0 comments on commit dcc4a2b

Please sign in to comment.