pakt 0.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pakt/__init__.py +3 -0
- pakt/__main__.py +6 -0
- pakt/assets/icon.png +0 -0
- pakt/assets/icon.svg +10 -0
- pakt/assets/logo.png +0 -0
- pakt/cli.py +814 -0
- pakt/config.py +222 -0
- pakt/models.py +109 -0
- pakt/plex.py +758 -0
- pakt/scheduler.py +153 -0
- pakt/sync.py +1490 -0
- pakt/trakt.py +575 -0
- pakt/tray.py +137 -0
- pakt/web/__init__.py +5 -0
- pakt/web/app.py +991 -0
- pakt/web/templates/index.html +2327 -0
- pakt-0.2.1.dist-info/METADATA +207 -0
- pakt-0.2.1.dist-info/RECORD +20 -0
- pakt-0.2.1.dist-info/WHEEL +4 -0
- pakt-0.2.1.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pakt
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Fast, efficient Plex-Trakt sync using batch API operations
|
|
5
|
+
Project-URL: Repository, https://github.com/MikeSiLVO/pakt
|
|
6
|
+
Author: MikeSiLVO
|
|
7
|
+
License: MIT
|
|
8
|
+
Keywords: media,plex,scrobble,sync,trakt
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Multimedia :: Video
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Requires-Dist: aiosqlite>=0.19.0
|
|
19
|
+
Requires-Dist: apscheduler>=3.10.0
|
|
20
|
+
Requires-Dist: click>=8.1.0
|
|
21
|
+
Requires-Dist: fastapi>=0.110.0
|
|
22
|
+
Requires-Dist: httpx>=0.27.0
|
|
23
|
+
Requires-Dist: jinja2>=3.1.0
|
|
24
|
+
Requires-Dist: plexapi>=4.15.0
|
|
25
|
+
Requires-Dist: pydantic-settings>=2.0.0
|
|
26
|
+
Requires-Dist: pydantic>=2.0.0
|
|
27
|
+
Requires-Dist: rich>=13.0.0
|
|
28
|
+
Requires-Dist: uvicorn>=0.27.0
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: ruff>=0.3.0; extra == 'dev'
|
|
33
|
+
Provides-Extra: tray
|
|
34
|
+
Requires-Dist: pillow>=10.0.0; extra == 'tray'
|
|
35
|
+
Requires-Dist: pystray>=0.19.0; extra == 'tray'
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
# <img src="src/pakt/assets/icon.png" width="32" alt=""> Pakt
|
|
39
|
+
|
|
40
|
+
Sync watched status, ratings, and collections between Plex and Trakt.
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install pakt
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
With system tray support (Windows):
|
|
49
|
+
```bash
|
|
50
|
+
pip install pakt[tray]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Quick Start
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pakt setup # Interactive setup wizard (links Plex via PIN)
|
|
57
|
+
pakt sync # Run sync
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Commands
|
|
61
|
+
|
|
62
|
+
### Setup & Authentication
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pakt setup # Link Plex account via PIN authentication
|
|
66
|
+
pakt setup --token # Manual token entry instead of PIN
|
|
67
|
+
pakt login # Authenticate with Trakt
|
|
68
|
+
pakt logout # Clear Trakt authentication
|
|
69
|
+
pakt status # Show configuration status
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Server Management
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pakt servers discover # List available Plex servers from your account
|
|
76
|
+
pakt servers list # Show configured servers
|
|
77
|
+
pakt servers add NAME # Add server from discovered list
|
|
78
|
+
pakt servers add NAME --url URL --token TOKEN # Add server manually
|
|
79
|
+
pakt servers remove NAME
|
|
80
|
+
pakt servers enable NAME
|
|
81
|
+
pakt servers disable NAME
|
|
82
|
+
pakt servers test NAME # Test server connection
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Sync
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pakt sync # Sync all enabled servers
|
|
89
|
+
pakt sync --server NAME # Sync specific server(s) only
|
|
90
|
+
pakt sync -s NAME -s NAME2 # Sync multiple specific servers
|
|
91
|
+
pakt sync --dry-run # Preview without making changes
|
|
92
|
+
pakt sync --verbose # Show detailed item list
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Libraries
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
pakt libraries # Show library selection for default server
|
|
99
|
+
pakt libraries --all # Sync all libraries (clear selection)
|
|
100
|
+
pakt libraries -m "Movies" # Select specific movie library
|
|
101
|
+
pakt libraries -s "TV Shows" # Select specific show library
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Web Interface
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
pakt serve # Start web UI at localhost:8080
|
|
108
|
+
pakt serve --host 0.0.0.0 # Listen on all interfaces
|
|
109
|
+
pakt serve --port 9000 # Use custom port
|
|
110
|
+
pakt serve --tray # With system tray icon (Windows)
|
|
111
|
+
pakt serve --no-tray # Without system tray (default)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Maintenance
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
pakt clear-cache # Clear Trakt API cache
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Web Interface
|
|
121
|
+
|
|
122
|
+
Start the web UI:
|
|
123
|
+
```bash
|
|
124
|
+
pakt serve
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Open http://localhost:8080 in your browser.
|
|
128
|
+
|
|
129
|
+
### Views
|
|
130
|
+
|
|
131
|
+
**Sync** - Run manual syncs with real-time progress and console output. Use "Dry Run" to preview changes without applying them. Enable "Verbose" to see individual items being synced.
|
|
132
|
+
|
|
133
|
+
**Stats** - Shows connection status for Trakt and all configured Plex servers, library counts, and last sync results.
|
|
134
|
+
|
|
135
|
+
**Settings** - Configure sync options, manage servers, and set up scheduling.
|
|
136
|
+
|
|
137
|
+
### Sync Options
|
|
138
|
+
|
|
139
|
+
Options are organized by direction:
|
|
140
|
+
- **Plex → Trakt**: Watched, Ratings, Collection, Watchlist
|
|
141
|
+
- **Trakt → Plex**: Watched, Ratings, Watchlist
|
|
142
|
+
|
|
143
|
+
Global defaults can be overridden per-server in the Server Settings section.
|
|
144
|
+
|
|
145
|
+
### Scheduled Sync
|
|
146
|
+
|
|
147
|
+
Enable automatic syncing at a set interval (in hours).
|
|
148
|
+
|
|
149
|
+
**Important**: The scheduler only runs while the web server is running. If you stop `pakt serve`, scheduled syncs will not occur. For persistent scheduling, run the server in the background (see Background Mode below).
|
|
150
|
+
|
|
151
|
+
### Server Settings
|
|
152
|
+
|
|
153
|
+
Each Plex server has independent configuration:
|
|
154
|
+
- **Libraries**: Select which movie/show libraries to sync (empty = all)
|
|
155
|
+
- **Sync Options**: Override global defaults with per-server settings (Global/On/Off)
|
|
156
|
+
|
|
157
|
+
## Background Mode (Windows)
|
|
158
|
+
|
|
159
|
+
Run without a console window:
|
|
160
|
+
```bash
|
|
161
|
+
pythonw -m pakt serve --tray
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## What Gets Synced
|
|
165
|
+
|
|
166
|
+
| Data | Plex → Trakt | Trakt → Plex |
|
|
167
|
+
|------|:------------:|:------------:|
|
|
168
|
+
| Watched status | ✓ | ✓ |
|
|
169
|
+
| Ratings | ✓ | ✓ |
|
|
170
|
+
| Collection | ✓ | - |
|
|
171
|
+
| Watchlist | ✓ | ✓ |
|
|
172
|
+
|
|
173
|
+
Collection sync includes media info (resolution, HDR, audio codec).
|
|
174
|
+
|
|
175
|
+
## Multi-Server Support
|
|
176
|
+
|
|
177
|
+
Pakt supports syncing multiple Plex servers to a single Trakt account:
|
|
178
|
+
|
|
179
|
+
1. Run `pakt setup` to link your Plex account via PIN
|
|
180
|
+
2. Select which servers to enable
|
|
181
|
+
3. Run `pakt sync` to sync all enabled servers
|
|
182
|
+
|
|
183
|
+
Each server can have:
|
|
184
|
+
- Independent library selection
|
|
185
|
+
- Per-server sync option overrides
|
|
186
|
+
|
|
187
|
+
Servers are synced sequentially. Items that exist on multiple servers are deduplicated by external ID.
|
|
188
|
+
|
|
189
|
+
## Configuration
|
|
190
|
+
|
|
191
|
+
Config location:
|
|
192
|
+
- Windows: `%APPDATA%\pakt`
|
|
193
|
+
- Linux/macOS: `~/.config/pakt`
|
|
194
|
+
|
|
195
|
+
All configuration is stored in `config.json`.
|
|
196
|
+
|
|
197
|
+
## Trakt Account Limits
|
|
198
|
+
|
|
199
|
+
Free Trakt accounts have a 100-item limit on collections and watchlists. Pakt will warn you if you hit these limits. Upgrade to [Trakt VIP](https://trakt.tv/vip) for unlimited.
|
|
200
|
+
|
|
201
|
+
## Changelog
|
|
202
|
+
|
|
203
|
+
See [CHANGELOG.md](https://github.com/MikeSiLVO/Pakt/blob/main/CHANGELOG.md) for release history.
|
|
204
|
+
|
|
205
|
+
## License
|
|
206
|
+
|
|
207
|
+
MIT
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
pakt/__init__.py,sha256=nuasBvijRvMDfBOa85FF4g2t7kNeQCaRSV2ZP0aFiLE,69
|
|
2
|
+
pakt/__main__.py,sha256=J2r2dxyQ49nhOam7RwnqlIq34JMbfpru01hg0y1Gv5M,104
|
|
3
|
+
pakt/cli.py,sha256=wF1S_di74ITGOYeKMo9klfC-ZaPEkRvLgmcPpg9oJ0s,28802
|
|
4
|
+
pakt/config.py,sha256=YGyNsaPzHfCtqDgjuBINdP56UCisBkaSoTFpZHptqVI,7951
|
|
5
|
+
pakt/models.py,sha256=4evZe4peSW6RuOtayNdFrdphFyGgzZhzM6bGpz9ugXw,2585
|
|
6
|
+
pakt/plex.py,sha256=ufSQdzY3f1obswGl1nyAxbSDaS-08ckHYpS4xavPkuk,25419
|
|
7
|
+
pakt/scheduler.py,sha256=eBe6HP6V1wjq6ZbHw9hKm2io9UGyXKlRDVI67toqk8A,4906
|
|
8
|
+
pakt/sync.py,sha256=cjkx-LBg4TceQq_vBx0lbI2vAfdXXlniRIcf88MRI3w,68432
|
|
9
|
+
pakt/trakt.py,sha256=JxvVSFVyaMwfrsmu3DVdmEyt5iSLaAsRre-dqjgdo78,20704
|
|
10
|
+
pakt/tray.py,sha256=5n1iCWSQMJbfpglkWCQjBKjylSDUeSOL009ZZyZdXRo,4094
|
|
11
|
+
pakt/assets/icon.png,sha256=iBXkfNnZVen-X7Iqqa_B7NQ9GwmRT7k8C6g4GOzRR3Y,84818
|
|
12
|
+
pakt/assets/icon.svg,sha256=DkinJ03voTA8rlOXAk9X1LWKQLwl9lpo0dhqmp5uYWY,485
|
|
13
|
+
pakt/assets/logo.png,sha256=q4aHff43yFojUsZV9Z3XMPC0neEIQPKq_K8a7Q7LpJI,231182
|
|
14
|
+
pakt/web/__init__.py,sha256=_fq2p0e1KUf0-RzG-DeyUyDirKE5NEbfa7s3Vu7IgWI,93
|
|
15
|
+
pakt/web/app.py,sha256=XJBvxUgyN3PVvVyL8cQNsO0k9tRLKJX1sXJ0W9-FEnw,37909
|
|
16
|
+
pakt/web/templates/index.html,sha256=vdHCM7H7-phqCkYxxQasFlUXNom08HsK0yWWNh9MK7g,101020
|
|
17
|
+
pakt-0.2.1.dist-info/METADATA,sha256=TfK2MOg-al7z-LpD6Nl_PhP2P4JJQR8-YH-d5WWKEe4,5985
|
|
18
|
+
pakt-0.2.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
19
|
+
pakt-0.2.1.dist-info/entry_points.txt,sha256=vrz89MRpichODPxwJFActjpscMXX7AUcsSJZ5Rxinis,39
|
|
20
|
+
pakt-0.2.1.dist-info/RECORD,,
|