Giter Site home page Giter Site logo

jacobwgillespie / plex-sync Goto Github PK

View Code? Open in Web Editor NEW
301.0 28.0 36.0 164 KB

:clapper: Command line utility for synchronizing Plex Media Server watched / seen status between multiple servers

Home Page: https://www.npmjs.com/package/plex-sync

License: Other

JavaScript 70.31% Python 29.69%
plex sync cli

plex-sync's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plex-sync's Issues

Support Dynamic DNS like in Docker Package

Hi,

I recently built a docker package that uses a config file with dynamic DNS hosts for synchronization:

HUB: https://hub.docker.com/r/nowsci/plex-sync/
SRC: https://github.com/Fmstrat/plex-sync

Could the dynamic host work be implemented directly? Basically I just grab the cert information to pull the CN that should be used for the connection (with curl) and then use that.

I also plan on adding log parsing for tokens in the docker container if you're not planning on doing that.

‘node’: No such file or directory

Hello! Fisrt off, thank you so much for making this! I've been looking for something like this for a while. I have 3 servers I need to sync, as If i take one down for maint, i can have the user use one of the other 2 without any issues.

I have installed as per instructinos, but when i try and run, i get:
/usr/bin/env: ‘node’: No such file or directory

And that's it...any ideas?

Users sync

Trying to sync the view status of 2 users on the same server

DRY_RUN=1 plex-sync [email protected]/2,r [email protected]/2,w

and I always get

TypeError: Cannot read property '$' of undefined
    at _callee2$ (/usr/local/lib/node_modules/plex-sync/lib/plex.js:110:57)
    at tryCatch (/usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:64:40)
    at Generator.invoke [as _invoke] (/usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:355:22)
    at Generator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:116:21)
    at step (/usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
    at process._tickCallback (internal/process/next_tick.js:109:7)

Any ideas what could be wrong ?

Fails to start with module error.

I have tried to install this on three different computers to make sure it was not something in my environment, two macs and inside the stock node linux dockerhub image (docker pull node) and all three returned the same result when trying to run plex-sync after installing:


module.js:442
    throw err;
    ^

Error: Cannot find module '../lib/index'
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/plex-sync/bin/plex-sync:2:1)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)

I am using node v6.3.1 and npm v3.10.3

Is there anything I should need to do to get past this error besides the following?
npm install -g plex-sync

Error: Unexpected close tag

After updating the software by running "npm install -g plex-sync" on a working machine, I am now getting the following errors.

Progress: | Elapsed: 0.0s | 100% Error: Unexpected close tag Line: 5 Column: 7 Char: > at error (/usr/local/lib/node_modules/plex-sync/node_modules/sax/lib/sax.js:667:10) at strictFail (/usr/local/lib/node_modules/plex-sync/node_modules/sax/lib/sax.js:693:7) at closeTag (/usr/local/lib/node_modules/plex-sync/node_modules/sax/lib/sax.js:887:9) at SAXParser.write (/usr/local/lib/node_modules/plex-sync/node_modules/sax/lib/sax.js:1452:13) at Parser.exports.Parser.Parser.parseString (/usr/local/lib/node_modules/plex-sync/node_modules/xml2js/lib/xml2js.js:508:31) at Parser.parseString (/usr/local/lib/node_modules/plex-sync/node_modules/xml2js/lib/xml2js.js:7:59) at exports.parseString (/usr/local/lib/node_modules/plex-sync/node_modules/xml2js/lib/xml2js.js:540:19) at /usr/local/lib/node_modules/plex-sync/lib/plex.js:42:29 at F (/usr/local/lib/node_modules/plex-sync/node_modules/core-js/library/modules/_export.js:35:28) at parseXML (/usr/local/lib/node_modules/plex-sync/lib/plex.js:41:10) (node:4974) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Unexpected close tag Line: 5 Column: 7 Char: > (node:4974) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Just unable to setup a cronjob

Hi All!!

Could someone please assist me with setting up a crontab for this? I am able to run the commands directly and via a bash script works fine too.

Just something via cron isn't working for macOS.

I have the following setup:
CRON = 0 * * * * bash ~/cronjob-plex.sh

Permission of cronjob-plex.sh = -rw-r--r--@ 1 USERNAME staff 354 May 4 17:15 cronjob-plex.sh

BODY of cronjob-plex.sh =
——————————

#!/bin/bash

PLEX_TOKEN=T0k3n MATCH_TYPE=fuzzy /usr/local/bin/plex-sync 10.20.30.41/1 10.20.30.42/1

——————————

Thanks,
Pravin

feature request: uni-directional sync

This software is brilliant, the solution I've been looking for, for quite a while.

Though is one feature I'd like:
I'd like to be able to merely mirror my viewstate from server01 to servers02 and following...

An in-range update of update-notifier is breaking the build 🚨

The dependency update-notifier was updated from 2.5.0 to 2.6.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

update-notifier is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 10 commits.

  • 622ee5f 2.6.0
  • ad8ed1b Suggest yarn when installed with yarn (#132)
  • 5f06620 Exit the update check process if it does not respond after 30s (#156)
  • 79e89ad Fix failing test (#155)
  • c8faa84 Add distTag option (#151)
  • 14632e4 Add failing test for #153 (#154)
  • aafd8a0 Require Node.js 8
  • 0d49f51 Add Tidelift mention in the readme
  • 8df01b3 Fix docs position of shouldNotifyInNpmScript (#143)
  • d371834 Docs: isGlobal option does not default to true (#142)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Request: Synchronize "current" watched status

Right now, plex-sync defaults to "watched" if the view count exists and/or is greater than 0:

https://github.com/jacobwgillespie/plex-sync/blob/master/src/plex.js#L85

However, I think it would be better to actually query the current watched status. For instance, if I mark something unwatched, have that status sync over. I'm not sure this is even possible the way Plex updates the XML file, but figured I would bring it up in case you know something I don't.

Windows 10 Dry_Run is not a recognized command

I am trying to use this tool for the first time and wish to do a dry run to test it out.

I installed nodejs 6.x and it included adding npm to the my path envronment.

I then installed plex-sync using npm in the way described in your readme but had to remove the '$' at the beginning as it was not recognised.

Now i am tying to do my first dry run using:
DRY_RUN=1 plex-sync http://1234567890.ams.plex.services:80/2 192.168.1.8/2

but i get the error:

'DRY_RUN' is not recognized as an internal or external command,
operable program or batch file.

Sorry i know its going to be a simple solve but I have not used programs like this before

Unknown Error

Trying to sync between my old server (Shield TV) and new server (Plex Cloud Server). I get the following error:

plex-sync [email protected]:32400/1,r https://[email protected]:80/1,w

/usr/local/lib/node_modules/plex-sync/lib/ui.js:56
    read: modeString.includes('r'),
                     ^
TypeError: Object rw has no method 'includes'
    at parseCLIArg (/usr/local/lib/node_modules/plex-sync/lib/ui.js:56:22)
    at Array.map (native)
    at Object.<anonymous> (/usr/local/lib/node_modules/plex-sync/lib/index.js:48:37)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/plex-sync/bin/plex-sync:2:1)

I'm at a total loss.

Doesn't sync TV Shows

I have a problem where it will sync movies but not tv episodes. I tried both match types and neither worked for TV Shows

Seems to fail to sync status of "unavailable" media

Not sure if this is a Plex API limitation or something happening in the code here. Haven't identified anything obvious though.

Eg, I archived a show off my server to an external drive and it is currently unavailable. It is available on another server of mine. The sync does not marked episodes as watched on the server where the show is available. This is very disappointing.

TypeError: Cannot read property 'row' of undefined

Attempting to sync two plex servers, running the command on a CentOS 7 server. I received the following error:

DRY_RUN=1 plex-sync 192.168.2.230/1,r 192.168.2.235/1,w
Reading data from 192.168.2.230:32400, 192.168.2.235:32400...
TypeError: Cannot read property 'row' of undefined
    at ProgressBar.terminate (/usr/lib/node_modules/plex-sync/node_modules/ascii-progress/index.js:439:34)
    at ProgressBar.snoop (/usr/lib/node_modules/plex-sync/node_modules/ascii-progress/index.js:420:10)
    at ProgressBar.tick (/usr/lib/node_modules/plex-sync/node_modules/ascii-progress/index.js:159:8)
    at /usr/lib/node_modules/plex-sync/lib/ui.js:35:14
    at Array.map (native)
    at progressMap (/usr/lib/node_modules/plex-sync/lib/ui.js:34:38)
    at _callee$ (/usr/lib/node_modules/plex-sync/lib/index.js:68:48)
    at tryCatch (/usr/lib/node_modules/plex-sync/node_modules/regenerator-runtime/runtime.js:62:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/plex-sync/node_modules/regenerator-runtime/runtime.js:336:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/lib/node_modules/plex-sync/node_modules/regenerator-runtime/runtime.js:95:21)

Running Plex version 1.2.2.2857 for Windows on 192.168.2.230 and Plex DVR beta version 1.2.0.2838 for CentOS on 192.168.2.235

Sync watched media with PlexCloud Server

Hi everyone,

I have PlexCloud Beta, and I want to sync my watched media to that server. How could I do that? I can see my token, Library ID, but the URL seems to be a redirection.

Does anybody knows how to know my real URL? Or plexsync has any feature to do that?

Thanks in advance

Error message occurring after "Sync Completed"

The following error message appears after running a one-way sync (reading from one server for a specific library and writing to another server) and receiving a "Sync Completed" message:

(node:5131) UnhandledPromiseRejectionWarning: FetchError: request to https://192.168.1.10:32400/:/scrobble?identifier=com.plexapp.plugins.library&key=22030&X-Plex-Token=[Plex Token] failed, reason: connect ECONNREFUSED 192.168.1.10:32400
at ClientRequest. (/usr/lib/node_modules/plex-sync/node_modules/node-fetch/index.js:133:11)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
at emitErrorNT (internal/streams/destroy.js:64:8)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:5131) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 50)

An in-range update of eslint-config-airbnb-base is breaking the build 🚨

Version 11.1.1 of eslint-config-airbnb-base just got published.

Branch Build failing 🚨
Dependency eslint-config-airbnb-base
Current Version 11.1.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-config-airbnb-base is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details
Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Synchronize In Progress Media

It would be nice to sync the progress through content being watched, not just the "watched" or "not watched" status. In other words, this would sync all the "in progress" media.

native promise missing, set Fetch.Promise to your favorite alternative

I'm trying to run this on a Raspberry Pi 3 without much luck.

I had to hack ui.js to get things to a certain point but then got the above error.

I'm not a node js user/dev so I may be missing something obvious?

The changes I made were:

  var modeString = matches[9] || 'rw';
  var mode = {
    read: (modeString.indexOf("r") > -1),
    write: (modeString.indexOf("w") > -1)
  };

Error: native promise missing, set Fetch.Promise to your favorite alternative
at new Fetch (/usr/local/lib/node_modules/plex-sync/node_modules/isomorphic-fetch/node_modules/node-fetch/index.js:41:9)
at Fetch (/usr/local/lib/node_modules/plex-sync/node_modules/isomorphic-fetch/node_modules/node-fetch/index.js:37:10)
at module.exports (/usr/local/lib/node_modules/plex-sync/node_modules/isomorphic-fetch/fetch-npm-node.js:8:19)
at fetchText (/usr/local/lib/node_modules/plex-sync/lib/plex.js:47:40)
at fetchXML (/usr/local/lib/node_modules/plex-sync/lib/plex.js:53:10)
at _callee$ (/usr/local/lib/node_modules/plex-sync/lib/plex.js:77:20)
at tryCatch (/usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:63:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:337:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:96:21)
at step (/usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)

Undefined in plex.js

After the upgrade to 0.6.0 I'm having a odd undefined issue. Worked fine before the update albeit slowly. Very large library of media on the server.

Ubuntu 16.04.1 LTS
Python 2.7.12
PlexPass
Plex: 1.3.3.3148

npm i -g plex-sync
/usr/local/bin/plex-sync -> /usr/local/lib/node_modules/plex-sync/bin/plex-sync
/usr/local/lib
└── [email protected]

plex-sync key1@server1:32400/2,r key2@server2:32400/1,w
Reading data from server1:32400, server2:32400...
Progress:                      | Elapsed: 0.0s | 100%
TypeError: Cannot read property '$' of undefined
    at _callee2$ (/usr/local/lib/node_modules/plex-sync/lib/plex.js:110:57)
    at tryCatch (/usr/local/lib/node_modules/plex-sync/node_modules/regenerator-runtime/runtime.js:64:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/plex-sync/node_modules/regenerator-runtime/runtime.js:355:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/plex-sync/node_modules/regenerator-runtime/runtime.js:116:21)
    at step (/usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
    at run (/usr/local/lib/node_modules/plex-sync/node_modules/core-js/library/modules/es6.promise.js:87:22)
    at /usr/local/lib/node_modules/plex-sync/node_modules/core-js/library/modules/es6.promise.js:100:28
    at flush (/usr/local/lib/node_modules/plex-sync/node_modules/core-js/library/modules/_microtask.js:18:9)
    at nextTickCallbackWith0Args (node.js:419:9)

Error with multiple user in Plex Home

Hi!
I am running two Plex servers in my home network. Both on Windows 10 PCs.

For my admin user, the Plex-sync command works fine with all the different sections.
For my 3 other users, I have problems.

I use this for all 4 users:
plex-sync TOKEN@IP1/section TOKEN/@IP2/section

When I run it for my 3 other users, I get this error:
TypeError: Cannot read property 'Video' of undefined at C:\Users\PC\AppData\Roaming\npm\node_modules\plex-sync\lib\plex.js:78:40 at process._tickCallback (internal/process/next_tick.js:103:7)

I looked at all the other issues here, and found one with the same error.

If I try to open this URL: http://SERVER_HOST/library/sections/SECTION_NUMBER/allLeaves?X-Plex-Token=PLEX_TOKEN with any of the 4 tokens (even with the one that syncs OK) and both IP's, I get an error.

I have tried running all the commands in a batch file with a "call-command" to get them all to run one after another. I ran it a copule of times. This resulted in one of the 3 "broken" users to get ONE show synced, while the others remained untouched.

Any suggestions? :)

Unidirectional sync does not work

I set one server as read from and one to write too, however this still wrote data from the second server to the first which should have been read from.

[root@host-172-16-0-169 plex-sync]# DRY_RUN=1 plex-sync REDACTED@REDACTED/1,r REDACTED@REDACTED/1,w
Syncing any unsynced media...
Dry run: marking Fun & Games watched on REDACTED:32400
Sync completed!

Cannot read property '$' of undefined

Hello,

I'm trying to sync 2 servers for one managed user. Server 1 is a Shield TV, with IP 192.168.1.20, while server 2 is my Synology NAS (IP = 192.168.1.2).

Sync works fine for the "admin" user, but when trying with my child managed account, I get:

~> env DRY_RUN=1 plex-sync [email protected]/7,r [email protected]/6,w
Reading data from 192.168.1.20:32400, 192.168.1.2:32400...
Progress:                      | Elapsed: 0.0s | 100%
TypeError: Cannot read property '$' of undefined
    at _callee2$ (/usr/local/lib/node_modules/plex-sync/lib/plex.js:107:57)
    at tryCatch (/usr/local/lib/node_modules/plex-sync/node_modules/regenerator-runtime/runtime.js:64:40)
    at Generator.invoke [as _invoke] (/usr/local/lib/node_modules/plex-sync/node_modules/regenerator-runtime/runtime.js:355:22)
    at Generator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/plex-sync/node_modules/regenerator-runtime/runtime.js:116:21)
    at step (/usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/plex-sync/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
    at process._tickCallback (internal/process/next_tick.js:103:7)

Any idea what can be causing this?
I'm running plex-sync from my mac, with node installed with brew:

~> node --version
v7.5.0

Running Multiple Syncs In Batch File - Only Runs First

I have a batch file with all my different plex-sync commands, so a total of 24 lines with each one syncing either a different user or a different library for a user.

But whenever i run the batch file it only seems to run the first line and then once that sync completes it just exits.

I then tried making a master batch file which would call 24 individual batch files, each one having a single command in it followed by "exit" on the next line so that i don't end up with loads of commad prompt windows open but doing it this way it still seems to just stop after the plex-sync line and never exits.

Am i doing something stupid or?

Sync for TV libraries doesn't work

I don't think this project is being maintained any more, but I figured I would file this as well, just in case. Movies libraries works great, but when I try to sync any TV Show library, the sync doesn't work. I don't get any error, it just simply doesn't sync. When the sync operation completes, the watched status of the libraries is the same as it was before I started the sync.

At first I thought it might be due to the fact that I'm using the new TV agent (BETA), but I see that other people have had the same problem in other issues, which predate the new TV agent.

Has anyone found any workarounds, or been able to get plex-sync to work with TV libraries?

error, cause unknown

I'm syncing two users. One syncs fine, the other throws the following error:

TypeError: Cannot read property 'Video' of undefined
    at /usr/local/lib/node_modules/plex-sync/lib/plex.js:80:40
    at process._tickCallback (node.js:368:9)

Plex Token Bookmarklet no longer works

Been trying to use the Plex Token Bookmarklet to find the Plex token but it doesn't seem to detect the new versions of the Web App. Bookmarklet will display Please drag this link to your bookmark bar and click it when using the Plex Web App even though I have the app open in the tab. Tried this in both Chrome and Firefox.

Syncing with plex cloud

Hi,
So ive been trying to sync with plex cloud and I've tried http and https with the same error:
Progress: | Elapsed: 0.0s | 100%
Error: Unexpected close tag
Line: 5
Column: 7
Char: >
at error (/usr/local/lib/node_modules/plex-sync/node_modules/sax/lib/sax.js:651:10)
at strictFail (/usr/local/lib/node_modules/plex-sync/node_modules/sax/lib/sax.js:677:7)
at closeTag (/usr/local/lib/node_modules/plex-sync/node_modules/sax/lib/sax.js:871:9)
at Object.write (/usr/local/lib/node_modules/plex-sync/node_modules/sax/lib/sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (/usr/local/lib/node_modules/plex-sync/node_modules/xml2js/lib/xml2js.js:508:31)
at Parser.parseString (/usr/local/lib/node_modules/plex-sync/node_modules/xml2js/lib/xml2js.js:7:59)
at exports.parseString (/usr/local/lib/node_modules/plex-sync/node_modules/xml2js/lib/xml2js.js:540:19)
at /usr/local/lib/node_modules/plex-sync/lib/plex.js:42:29
at Promise.F (/usr/local/lib/node_modules/plex-sync/node_modules/core-js/library/modules/_export.js:35:28)
at parseXML (/usr/local/lib/node_modules/plex-sync/lib/plex.js:41:10)
(node:18488) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Unexpected close tag
Line: 5
Column: 7
Char: >

Anyway to fix this?
thanks.

Verbose flag option

Apart from doing a "dry run" I would love to be able to actually see what the script is doing. As far as I can tell it hasn't actually marked things as watched or unwatched on either server it gets run on and I receive no errors - anything that's been watched in my On Deck should updated as it is marked as watched - which it doesn't. The only time I see any output aside from a progress bar that is instantly at 100% after 0.01s then sits there for 5 minutes, is when I use precise matching which just takes forever (understandably). It would be great if there was a verbose flag you could put in so I can actually see what it's supposed to be doing, rather than hoping it's doing something. Sorry, that was wordy.

There's also no log to speak of from what I've been able to tell, which if it doesn't print out what it's doing, a log file I can read through would be nice.

An in-range update of eslint-plugin-import is breaking the build 🚨

Version 2.4.0 of eslint-plugin-import just got published.

Branch Build failing 🚨
Dependency eslint-plugin-import
Current Version 2.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-import is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 10 commits.

  • 44ca158 update utils changelog
  • a3728d7 bump eslint-module-utils to v2.1.0
  • 3e29169 bump v2.4.0
  • ea9c92c Merge pull request #737 from kevin940726/master
  • 8f9b403 fix typos, enforce type of array of strings in allow option
  • 95315e0 update CHANGELOG.md
  • 28e1623 eslint-module-utils: filePath in parserOptions (#840)
  • 2f690b4 update CI to build on Node 6+7 (#846)
  • 7d41745 write doc, add two more tests
  • dedfb11 add allow glob for rule no-unassigned-import, fix #671

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Libraries not syncing despite plex-sync appearing to work correctly. Could docker be an issue?

Hi folks, not sure if this is still being maintained as there has been no activity for about a year, however thought I'd ask on the off-chance.

I'm using plex-sync and it appears to run properly, ie; I see the green bars appear as the scan progresses and there is a sync completed message at the end, however the libraries to not show any changes.

I am not getting any error messages

One of the servers is in a docker container, could this be an issue?

An in-range update of xml2js is breaking the build 🚨

The dependency xml2js was updated from 0.4.19 to 0.4.20.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

xml2js is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Bidirectional sync?

user A connect to server A and watch a movie

next day user A connect to server B and he can see the movie seen yesterday marked as watched, he now watch an other movie on Server B.

I expect (after sync) the movie watched on server B is marked on server A.

That's correct? that's mean the sync is bidirectional?

Out of memory Large Library

Out of memory on a 32GB system (30 GB not used)

plex-sync serverA/2,r serverB/2,rw
Large Library(80K episodes on 2 servers)
<--- Last few GCs --->

[4332:0x55a7b4ce31d0] 638448 ms: Mark-sweep 1655.4 (1720.0) -> 1655.4 (1688.5) MB, 2072.7 / 0.0 ms last resort GC in old space requested
[4332:0x55a7b4ce31d0] 640695 ms: Mark-sweep 1655.4 (1688.5) -> 1655.4 (1688.5) MB, 2246.6 / 0.0 ms last resort GC in old space requested

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x72c21a18fe1
1: /* anonymous /(aka / anonymous /) [/usr/local/lib/node_modules/plex-sync/lib/plex.js:~124] [pc=0x200bebd43a3e](this=0x72c21a02241 ,video=0x64a08ede011 )
2: arguments adaptor frame: 3->1
3: forEach(this=0x234fd89ec6f9 <JSArray[32]>)
4: / anonymous /(aka / anonymous */) [/usr/local/lib/node_modules/plex-sync/lib/plex.js:124] [bytecode=...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0x55a7b3305011 [node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewUninitializedFixedArray(int) [node]
6: 0x55a7b2ef1add [node]
7: v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [node]
8: 0x200beba840bd

Can't Sync Certain Library Types

I am having trouble Syncing my TV Libraries. But only one of them (I have more than one). The largest one fails with the error below, but the smaller noe works fine.

I get the following response when attempting to sync the largest of the two libraries:
Cannot read property 'Video' of undefined
at /usr/local/lib/node_modules/plex-sync/lib/plex.js:124:36
at Array.forEach ()
at /usr/local/lib/node_modules/plex-sync/lib/plex.js:123:23
at
at process._tickCallback (internal/process/next_tick.js:188:7)

Possibly the same as issue #75 but that post does not give much information to go on.

Additionally, I cannot Syn c Libraries that do not contain video in them. is this by design?
I am attempting to sync the listend to status of Audiobooks. As these are just audio files I thought it might be possible. Can you advise if Plex Sync will sync this type of media' status?

Remote Users/Friends watched status?

I'm not seeing anything documented, nor does it appear to do this. Can anyone confirm if plex-sync does or does not support syncing Watched status for Friends? Is this possible?

Sync Watched only (not un watched)

Is there a way to sync only watched status, rather than the full watched/unwatched status of each file.
I've split out mine/ my partners library's to make it easier for her to find her odd show among all mine.
With the intention of regular syncing.

But if we watch one of her shows on my account, i'd like to just sync that watched status.
But not overwrite all the rest. Ie not to mark lots of her's unwatched just for a single watched episode

thanks in advance

error and question

When i try to sync my TV show and movie library, which are 450 tv shows and 900+ movies i get the following error after sync in repetition:

(node:4756) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 57): FetchError: request to
ps://{PLEX URL}.plex.direct:32400/:/scrobble?identifier=com.plexapp.plugins.libr
key=3072&X-Plex-Token={PLEX TOKEN} failed, reason: connect ETIMEDOUT {PLEX URL}:32400

I replaced my url and token to not post them.

Second thing is a question about plex sync.

Does it sync all my users (Plex home and Friends) or just me . Because im moving my users to this new server and i want to move there watched data over as well.

JavaScript heap out of memory

$ plex-sync [email protected]/1,r https://[email protected]:32400/1,rw
Reading data from 192.168.0.2:32400,xyz.plex.direct:32400...
Progress: | Elapsed: 0.0s | 100%

<--- Last few GCs --->

[3233:0x2798a70] 175862 ms: Mark-sweep 1412.4 (1464.5) -> 1412.0 (1448.5) MB, 4058.5 / 0.0 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 4059 ms) last resort
[3233:0x2798a70] 179907 ms: Mark-sweep 1412.0 (1448.5) -> 1411.7 (1448.5) MB, 4044.6 / 0.0 ms last resort

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x2314ed5a9891
1: new constructor(aka Parser) [/usr/local/lib/node_modules/plex-sync/node_modules/xml2js/lib/xml2js.js:240] [pc=0xbadfc8869ac](this=0x27a4a46bd6b1 <a Parser with map 0x1f9a11240b01>,opts=0x7b9c3b87021 <an Object with map 0x1f9a112031d1>)
3: /* anonymous /(aka / anonymous */) [/usr/local/lib/node_modules/plex-sync/node_modules/xml2js/lib/xml2js.js:539] [pc=0xbadfc886310](this=0x41a33d...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0x13d443c [node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewStruct(v8::internal::InstanceType) [node]
6: v8::internal::Factory::NewTuple3(v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object) [node]
7: v8::internal::StoreIC::StoreTransition(v8::internal::Handlev8::internal::Map, v8::internal::Handlev8::internal::JSObject, v8::internal::Handlev8::internal::Map, v8::internal::Handlev8::internal::Name) [node]
8: v8::internal::StoreIC::GetMapIndependentHandler(v8::internal::LookupIterator*) [node]
9: v8::internal::IC::ComputeHandler(v8::internal::LookupIterator*, v8::internal::Handlev8::internal::Object) [node]
10: v8::internal::StoreIC::UpdateCaches(v8::internal::LookupIterator*, v8::internal::Handlev8::internal::Object, v8::internal::Object::StoreFromKeyed) [node]
11: v8::internal::StoreIC::Store(v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Name, v8::internal::Handlev8::internal::Object, v8::internal::Object::StoreFromKeyed) [node]
12: v8::internal::KeyedStoreIC::Store(v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object) [node]
13: v8::internal::Runtime_KeyedStoreIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) [node]
14: 0xbadfc58437d

Any idea? Got 16 GB RAM and 12 GB are useable.

Hostname/IP doesn't match certificate's altname

I get this error when using forced https with only IP and self-signed certificates. I am using "Require Security" option for both plex servers and using the default self-signed certificate.

Sync "On Deck"

Firstly, this is awesome and works a treat!

However, is it possible to also sync the "On Deck" listing between Plex Servers?

plex-sync not syncing main Home user account

I have 15 people in my Home group, I am the main account. Utilizing other notes I was able to get each person's token and sync their content between servers but I cannot sync my content across servers. When I run the command it is telling me that it is syncing and get's done, but it actually does not sync anything.

I am running this command:

plex-sync my-plex-token@phoenix/2 my-plex-token@cinaplex/2 my-plex-token@cinaplex2/2
plex-sync my-plex-token@phoenix/1 my-plex-token@cinaplex/41 my-plex-token@cinaplex2/1

Where the first line does my TV shows and the second line does my movies for all three servers (phoenix, cinaplex and cinaplex2.

I get this response each time:

Reading data from phoenix:32400, cinaplex:32400, cinaplex2:32400...
Progress:                      | Elapsed: 0.0s | 100%
Syncing any unsynced media...
Progress:  | Elapsed: 0.0s | 0%
Progress:  | Elapsed: 0.0s | 0%
Progress:  | Elapsed: 0.0s | 0%
Sync completed!

But the watched status is not synced at all.

Any help would be appreciated.

Thank You

partial view

is there a way to sync the partial view status (viewOffset) ?

Fails to sync with Plex Cloud

Hello,

Not sure if Plex Cloud changes anything from an architectural point of view, but it appears to be failing (not the real Plex Cloud server address, but you get it):

plex-sync 10.0.1.2/1,r 6fd3835b79c77d6c-85735bdf4fbd4924a90d82cb17043c05.ric.plex.services:443/1,w

Reading data from 10.0.1.2:32400, 6fd3835b79c77d6c-85735bdf4fbd4924a90d82cb17043c05.ric.plex.services:443...
Error: Unexpected close tag
Line: 6
Column: 7
Char: >
    at error (/usr/local/lib/node_modules/plex-sync/node_modules/sax/lib/sax.js:667:10)
    at strictFail (/usr/local/lib/node_modules/plex-sync/node_modules/sax/lib/sax.js:693:7)
    at closeTag (/usr/local/lib/node_modules/plex-sync/node_modules/sax/lib/sax.js:887:9)
    at Object.write (/usr/local/lib/node_modules/plex-sync/node_modules/sax/lib/sax.js:1449:13)
    at Parser.exports.Parser.Parser.parseString (/usr/local/lib/node_modules/plex-sync/node_modules/xml2js/lib/xml2js.js:508:31)
    at Parser.parseString (/usr/local/lib/node_modules/plex-sync/node_modules/xml2js/lib/xml2js.js:7:59)
    at exports.parseString (/usr/local/lib/node_modules/plex-sync/node_modules/xml2js/lib/xml2js.js:540:19)
    at /usr/local/lib/node_modules/plex-sync/lib/plex.js:40:29
    at new Promise (/usr/local/lib/node_modules/plex-sync/node_modules/core-js/library/modules/es6.promise.js:191:7)
    at parseXML (/usr/local/lib/node_modules/plex-sync/lib/plex.js:39:10)

Managed user tokens?

Is there a way to get the tokens for the managed users? Right now I only see tokens for the main account so the sync only works to sync the watch history of the main account.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.