# plex-copy

> CLI for copying transcoded files from Plex Optimised Versions

Latest version **0.0.1** (published 2020-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install plex-copy
pnpm add plex-copy
yarn add plex-copy
bun add plex-copy
```

Provides the command `plex-copy`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-03-01 |
| First published | 2020-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 24.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ryc O'Chet |
| Maintainers | rycochet |

## Links

- npm: https://www.npmjs.com/package/plex-copy
- Repository: https://github.com/Rycochet/plex-copy
- Homepage: https://github.com/Rycochet/plex-copy#readme
- Issues: https://github.com/Rycochet/plex-copy/issues
- npm.io page: https://npm.io/package/plex-copy

## Dependencies (10)

- [chalk](https://npm.io/package/chalk.md) ~3.0.0
- [yargs](https://npm.io/package/yargs.md) ~15.2.0
- [uniqid](https://npm.io/package/uniqid.md) ~5.2.0
- [chokidar](https://npm.io/package/chokidar.md) ~3.3.1
- [fs-extra](https://npm.io/package/fs-extra.md) ~8.1.0
- [fast-glob](https://npm.io/package/fast-glob.md) ~3.2.2
- [pluralize](https://npm.io/package/pluralize.md) ~8.0.0
- [typescript](https://npm.io/package/typescript.md) ~3.8.3
- [@types/uniqid](https://npm.io/package/@types/uniqid.md) ~4.1.3
- [@types/pluralize](https://npm.io/package/@types/pluralize.md) ~0.0.29

## Recent versions

- 0.0.1 (latest) — 2020-03-01

## README

# plex-copy

CLI for copying transcoded files from Plex Optimised Versions

## Requirements

- NodeJS / Docker
- TV Show Folders must be named `TV Show (1980)` style. The brackets and their contents are ignored.

## Running directly

```console
$ npx plex-copy --help
Usage: plex-copy [OPTION]... PATHS...
Copy all Plex Optimised Versions to the correct directories, replacing originals.
Supply one or more source PATHS to check. If these are glob patterns then they
will be expanded (and dot prefixed folders ignored).

Options:
  --copy-subtitles  also copy subtitles (forced will always be copied)     [boolean] [default: true]
  --delete-empty    delete empty folders                                   [boolean] [default: true]
  --dry-run         do everything except actually change the filesystem   [boolean] [default: false]
  --interval        run every X minutes                                        [number] [default: 0]
  --verbose         show details on all operations                         [boolean] [default: true]
  --watch           watch for changes and automatically run               [boolean] [default: false]
  --help            Show help                                                              [boolean]
  --version         Show version number                                                    [boolean]
```

This will delete the original file, but not the optimised version. The next time Plex scans the source files it will do that automatically. It only deletes the file after the new one has been successfully copied over.

If the new file has already been copied then this will ignore it (and report "`Skipped "xyz/s01e23.mp4"`")

Simply supply it with a path to a Plex library folder.

## Docker / Docker-compose

There is a [docker image available](https://hub.docker.com/repository/docker/rycochet/plex-copy), which can be used to automatically run while next to your Plex docker image. You can change the `command:` value to any set of arguments, the default is shown below. You can pass any folder for the paths to check, but `/data/` is suggested for consistency.

You should set the `UID` and `GID` to be used to ensure that this runs as the same user as Plex, otherwise it may have permissions issues when trying to delete files.

```yaml
services:
  plex-copy:
    container_name: plex-copy
    image: rycochet/plex-copy:latest
    restart: unless-stopped
    # user: "1000:1000" # Set this to the same UID and GID as Plex
    volumes:
      - "/Multimedia/Anime:/data/Anime"
      - "/Multimedia/TV Shows:/data/TV Shows"
    # command: "/data/* --delete-empty --watch --interval 60" # Default arguments passed to docker image
```

## License

* The MIT License.
* See [LICENSE.md](./LICENSE.md) for details.

---
_Source: https://npm.io/package/plex-copy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
