Configuration - mdhiggins/PlexAutoSkip GitHub Wiki

Configuration Options for config.ini

Below are the list of options available in config.ini

Location

./config/config.ini

Sample

./setup/config.ini.sample

Copy and rename the sample to the root folder or a default config will be created on first launch

Plex.tv

Key Type Default Description
username str Plex.tv username
password str Plex.tv password (do not need to specify if including a token)
token str Plex.tv token (do not need to specify if including a password)
servername str Plex server name

If you're using 2FA for your Plex.tv account, leave the password blank and use a token for authentication

Server

Only needs to be set if not using Plex.tv credentials, may still need token depending on your security configuration

Key Type Default Description
address str Address to your server, either URL or IP address without preceding protocol
ssl bool True Use SSL
port int 32400 Plex server port

Security

Key Type Default Description
ignore-certs bool False Option to ignore SSL certifications, should be used only for testing

Skip

Key Type Default Description
mode str skip Mode options include skip and volume. Skip will seek to the end of the marker range, volume will adjust the volume for the duration of the marker range on players that support volume adjustment (support is fairly limited via the Plex setVolume api command)
tags csv intro, commercial, advertisement, credits Marker/Chapter tags to be skipped, leave default unless you are customizing chapters on your video files. You may add c: or m: as a prefix to a tag to selectively apply it only to chapters or markers respectively
types csv movie, episode Media types to monitor
ignored-libraries csv Libraries that should be ignored, specify library name case insensitive
last-chapter float 0.0 Option to skip the last chapter (usually credits) of a media file. 0.0 disables the feature. Valid range 0.0 - 1.0 which is the percentage of playback where the last chapter must fall to be included. 0.9 is a good starting point to ensure last chapter falls at the end of playback
unwatched bool True Auto skip on unwatched content
first-episode-series custom Watched Auto skip in the first episode of a series aka S01E01 See custom options below
first-episode-season custom Always Auto skip in the first episode of a season aka S**E01 See custom options below
first-safe-tags csv Tags that will not be impacted (will be skipped) by the first-episode-series and first-episode-season options. For example, you can still skip credits in these scenarios while allowing the intro play by adding "credits" to this option
last-episode-series custom Watched Auto skip in the last episode of a series See custom options below
last-episode-season custom Always Auto skip in the last episode of a season See custom options below
last-safe-tags csv Tags that will not be impacted (will be skipped) by the last-episode-series and last-episode-season options. For example, you can still skip credits in these scenarios while allowing the intro play by adding "credits" to this option
next bool False If media has reached its end or if the skip target is the end of the media, skip to the next item to avoid the "Up Next" interface

Valid Custom Values

  • Never - Will never auto skip any content for episode
  • Watched - Will only auto skip if episode has been marked as 'watched/played'
  • Always - Will always auto skip regardless of episode 'watched/played' status

Offsets

Adjustable offsets to calibrate the autoskip feature

Key Type Default Description
start int 2000 Offset start time in milliseconds. Auto skip will occur this much time after 'Skip Intro' button appears during playback
end int 1000 Offset end time in milliseconds. Auto skip will jump ahead to the end of the maker plus this much time
command int 500 Duration in ms to sleep between sending commands during the skip next feature. Some delay is needed to allow UI to catch up on most clients
tags csv intro Marker tags to apply offsets, only applied to markers so do not use the prefixes here. Plex does not seem to require offsets to credits in the same way it does intros

Binge

When you start binging content, allow certain tags to avoid auto skipping for the first few episodes and then resume auto skipping. A binge session is limited to a specific user and player combination, and optionally to a specific show. Does not apply non 'episode' content.

Key Type Default Description
ignore-skip-for int 0 Number of episodes to ignore the skip tags at the start of binge, 0 disables this feature
safe-tags csv List of tags that will still be skipped even at the start of a binge
same-show-only bool False Only apply a binge if the episodes are from the same show
skip-next-max int 0 Using the binge monitor, set a maximum number of skip nexts to be triggered if this feature is enabled, 0 to skip until content runs out

Volume

For use the with volume mode setting

Key Type Default Description
low int 0 Low volume range 0-100
high int 100 High volume range 0-100

Configuration Options for custom.json

Below are the list of options available in custom.json. A general use case sample can be seen here. You can include multiple custom.json files if you wish to keep your custom definitions organized, any files in the config folder ending in *.json will be scanned.

If you wish to convert your custom.json files to ratingKey vs GUID formats you can run custom_audit.py -g to convert to GUID and custom_audit.py -rk to convert to ratingKey. custom_audit.py also contains extra functionality, use custom_audit.py --help to see available options.

https://github.com/mdhiggins/PlexAutoSkip/wiki/Sample-custom.json

Location

./config/custom.json

Sample

./setup/custom.json.sample

markers dict

Where to find content identifiers

Set your main key as your content identifier for the content (GUID, ratingKey, parentRatingKey, or grandparentRatingKey can be used), followed by an array containing dicts with the following 2 parameters

marker dict

Key Type Description
start int Start time of skip in milliseconds. Can be set to a negative value to skip relative to the end of the media
end int End time of skip in milliseconds (where it will seek to). Can be negative to skip relative to the end of the media or 0 to skip to the end
cascade bool Optional boolean to declare if this marker should cascade onward if a better/more precise match is found. For example, you can define a marker for an entire show but choose to have it be overwritten if a marker for an individual episode is found
mode str Optional value to specify a mode, either skip or volume for a custom marker, otherwise will default to the global setting

ratingKey Example

    "markers": {
        "234": [
            {
                "start": 20000,
                "end": 40000,
                "cascade": false,
                "mode": "volume"
            },
            {
                "start": -20000,
                "end": 0,
                "cascade": false,
                "mode": "skip"
            }
        ],
        "12345": []
    }

GUID Example

    "markers": {
        "tmdb://32726": [
            {
                "start": 20000,
                "end": 40000,
                "cascade": false,
                "mode": "volume"
            },
            {
                "start": -20000,
                "end": 0,
                "cascade": false,
                "mode": "skip"
            }
        ],
        "tmdb://32726.4.21": []
    }

offsets dict

Where to find content identifiers

Set your main key as a content identifier for the content (GUID, ratingKey, parentRatingKey, or grandparentRatingKey can be used as well), followed by a dict with the following 2 parameters. The more specific key will take priority (individual custom parameters for episode will override custom parameters for a whole show, for example)

offset dict

Key Type Description
start int Custom offset start time in milliseconds. Auto skip will occur this much time after 'Skip Intro' button appears during playback
end int Custom offset end time in milliseconds. Auto skip will jump ahead to the end of the maker plus this much time
command int Custom command delay between sending commands during the skip next function. 500ms default, can adjust on a per player basis. Use player name or machineIdentifier as key

ratingKey Example

    "offsets": {
        "234": {
            "start": 3000,
            "end": 20000
        }
    }

GUID Example

    "offsets": {
        "tmdb://32726": {
            "start": 3000,
            "end": 20000
        }
    }

tags dict

Where to find content identifiers

Set your main key as a content identifier for the content (GUID, ratingKey, parentRatingKey, or grandparentRatingKey can be used as well), followed by an array of tags for markers/chapters to skip. Will override the tags specified in config.ini for this specified media

ratingKey Example

    "tags": {
        "234": ["intro", "outro"]
    }

GUID Example

    "tags": {
        "tmdb://32726": ["intro", "outro"]
    }

allowed dict

Where to find content identifiers

Leave all options blank to allow all. Setting any of the allowed parameters will block all content/users not on the lists

Key Type Description
users array List of plex.tv usernames allowed to use the autoskip feature
clients array List of client names (case sensitive) allowed to use the autoskip feature
keys array List of content identifiers allowed to use the autoskip feature, you can include GUID, ratingKey, parentRatingKeys to allow a season, or grandparentRatingKeys to allow an entire show
skip-next array List of client names (case sensitive) allowed to use the skip-next feature

blocked dict

Where to find content identifiers

Key Type Description
users array List of plex.tv usernames blocked from using the autoskip feature
clients array List of client names (case sensitive) blocked from using the autoskip feature
keys array List of content identifiers blocked from using the autoskip feature, you can include GUID, ratingKey, parentRatingKeys to blcok a season, or grandparentRatingKeys to block an entire show
skip-next array List of client names (case sensitive) blocked from using the skip-next feature

clients dict

In general you should not need to override the client IP address/port unless you are experiencing errors with GDM discovery based seeking and the fallback methods also fail (the script will attempt to fall back to IP based seeking dynamically when GDM fails); this is for edge case scenarios where this is incorrectly detected or ports have been remapped for some reason

Key Value Description
client name str client address url Key value pairs of your client name and custom address. Example address is http://192.168.0.10:32500

Example

    "clients": {
        "SHIELD": "http://10.0.1.51:32500"
    }

mode dict

Set custom modes for different content, either skip or volume

Key Value Description
ratingKey/GUID/name str mode str Key value pairs and desired mode. Key can be a ratingKey (or parent/grandparent), GUID, or client name to override the global mode setting to either skip or volume

Example

    "mode": {
        "tmdb://32726": "skip",
        "234": "volume",
        "SHIELD": "volume"
    }