Cleanup
parent
58337bd38c
commit
4870ff9e7a
68
README.md
68
README.md
|
|
@ -1,6 +1,6 @@
|
|||
# JellyPlex-Watched
|
||||
|
||||
[](https://www.codacy.com/gh/luigi311/JellyPlex-Watched/dashboard?utm_source=github.com&utm_medium=referral&utm_content=luigi311/JellyPlex-Watched&utm_campaign=Badge_Grade)
|
||||
[](https://www.codacy.com/gh/luigi311/JellyPlex-Watched/dashboard?utm_source=github.com\&utm_medium=referral\&utm_content=luigi311/JellyPlex-Watched\&utm_campaign=Badge_Grade)
|
||||
|
||||
Sync watched between jellyfin and plex locally
|
||||
|
||||
|
|
@ -11,31 +11,34 @@ Keep in sync all your users watched history between jellyfin and plex servers lo
|
|||
## Features
|
||||
|
||||
### Plex
|
||||
- [x] Match via Filenames
|
||||
- [x] Match via provider ids
|
||||
- [x] Map usersnames
|
||||
- [x] Use single login
|
||||
- [x] One Way/Multi Way sync
|
||||
- [x] Sync Watched
|
||||
- [x] Sync Inprogress
|
||||
|
||||
* \[x] Match via Filenames
|
||||
* \[x] Match via provider ids
|
||||
* \[x] Map usersnames
|
||||
* \[x] Use single login
|
||||
* \[x] One Way/Multi Way sync
|
||||
* \[x] Sync Watched
|
||||
* \[x] Sync Inprogress
|
||||
|
||||
### Jellyfin
|
||||
- [x] Match via Filenames
|
||||
- [x] Match via provider ids
|
||||
- [x] Map usersnames
|
||||
- [x] Use single login
|
||||
- [x] One Way/Multi Way sync
|
||||
- [x] Sync Watched
|
||||
- [ ] Sync Inprogress
|
||||
|
||||
* \[x] Match via Filenames
|
||||
* \[x] Match via provider ids
|
||||
* \[x] Map usersnames
|
||||
* \[x] Use single login
|
||||
* \[x] One Way/Multi Way sync
|
||||
* \[x] Sync Watched
|
||||
* \[ ] Sync Inprogress
|
||||
|
||||
### Emby
|
||||
- [ ] Match via Filenames
|
||||
- [ ] Match via provider ids
|
||||
- [ ] Map usersnames
|
||||
- [ ] Use single login
|
||||
- [ ] One Way/Multi Way sync
|
||||
- [ ] Sync Watched
|
||||
- [ ] Sync Inprogress
|
||||
|
||||
* \[ ] Match via Filenames
|
||||
* \[ ] Match via provider ids
|
||||
* \[ ] Map usersnames
|
||||
* \[ ] Use single login
|
||||
* \[ ] One Way/Multi Way sync
|
||||
* \[ ] Sync Watched
|
||||
* \[ ] Sync Inprogress
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
@ -51,6 +54,9 @@ DEBUG = "False"
|
|||
## Debugging level, "info" is default, "debug" is more verbose
|
||||
DEBUG_LEVEL = "info"
|
||||
|
||||
## If set to true then the script will only run once and then exit
|
||||
RUN_ONLY_ONCE = "False"
|
||||
|
||||
## How often to run the script in seconds
|
||||
SLEEP_DURATION = "3600"
|
||||
|
||||
|
|
@ -121,17 +127,17 @@ JELLYFIN_TOKEN = "SuperSecretToken, SuperSecretToken2"
|
|||
|
||||
### Baremetal
|
||||
|
||||
- Setup virtualenv of your choice
|
||||
* Setup virtualenv of your choice
|
||||
|
||||
- Install dependencies
|
||||
* Install dependencies
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
- Create a .env file similar to .env.sample, uncomment whitelist and blacklist if needed, fill in baseurls and tokens
|
||||
* Create a .env file similar to .env.sample, uncomment whitelist and blacklist if needed, fill in baseurls and tokens
|
||||
|
||||
- Run
|
||||
* Run
|
||||
|
||||
```bash
|
||||
python main.py
|
||||
|
|
@ -139,13 +145,13 @@ JELLYFIN_TOKEN = "SuperSecretToken, SuperSecretToken2"
|
|||
|
||||
### Docker
|
||||
|
||||
- Build docker image
|
||||
* Build docker image
|
||||
|
||||
```bash
|
||||
docker build -t jellyplex-watched .
|
||||
```
|
||||
|
||||
- or use pre-built image
|
||||
* or use pre-built image
|
||||
|
||||
```bash
|
||||
docker pull luigi311/jellyplex-watched:latest
|
||||
|
|
@ -153,7 +159,7 @@ JELLYFIN_TOKEN = "SuperSecretToken, SuperSecretToken2"
|
|||
|
||||
#### With variables
|
||||
|
||||
- Run
|
||||
* Run
|
||||
|
||||
```bash
|
||||
docker run --rm -it -e PLEX_TOKEN='SuperSecretToken' luigi311/jellyplex-watched:latest
|
||||
|
|
@ -161,9 +167,9 @@ JELLYFIN_TOKEN = "SuperSecretToken, SuperSecretToken2"
|
|||
|
||||
#### With .env
|
||||
|
||||
- Create a .env file similar to .env.sample and set the variables to match your setup
|
||||
* Create a .env file similar to .env.sample and set the variables to match your setup
|
||||
|
||||
- Run
|
||||
* Run
|
||||
|
||||
```bash
|
||||
docker run --rm -it -v "$(pwd)/.env:/app/.env" luigi311/jellyplex-watched:latest
|
||||
|
|
|
|||
|
|
@ -591,8 +591,8 @@ class Jellyfin:
|
|||
break
|
||||
|
||||
if movie_status:
|
||||
if movie_status["completed"]:
|
||||
jellyfin_video_id = jellyfin_video["Id"]
|
||||
if movie_status["completed"]:
|
||||
msg = f"{jellyfin_video['Name']} as watched for {user_name} in {library} for Jellyfin"
|
||||
if not dryrun:
|
||||
logger(f"Marking {msg}", 0)
|
||||
|
|
@ -605,7 +605,6 @@ class Jellyfin:
|
|||
logger(f"Dryrun {msg}", 0)
|
||||
else:
|
||||
# TODO add support for partially watched movies
|
||||
jellyfin_video_id = jellyfin_video["Id"]
|
||||
msg = f"{jellyfin_video['Name']} as partially watched for {floor(movie_status['time'] / 60_000)} minutes for {user_name} in {library} for Jellyfin"
|
||||
if not dryrun:
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -174,10 +174,8 @@ def episode_title_dict(user_list: dict):
|
|||
for show in user_list:
|
||||
for season in user_list[show]:
|
||||
for episode in user_list[show][season]:
|
||||
|
||||
# Iterate through the keys and values in each episode
|
||||
for episode_key, episode_value in episode.items():
|
||||
|
||||
# If the key is not "status", add the key to episode_output_dict if it doesn't exist
|
||||
if episode_key != "status":
|
||||
if episode_key.lower() not in episode_output_dict:
|
||||
|
|
|
|||
Loading…
Reference in New Issue