Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags Errors when running script #27

Open
Dranzer94 opened this issue Feb 21, 2021 · 0 comments
Open

Tags Errors when running script #27

Dranzer94 opened this issue Feb 21, 2021 · 0 comments

Comments

@Dranzer94
Copy link

Hi,

I'm trying to sync the watched status between my local QNAP to a remote seedbox using your script and I keep getting this error:

[~] # ./plex-db-sync --plex-db-1 "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Li brary/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db " --plex-start-1 "service plexmediaserver start" --plex-stop-1 "service plexmedi aserver stop" --plex-db-2 "/mnt/sshfs/com.plexapp.plugins.library.db" --plex-sta rt-2 "ssh -oStrictHostKeyChecking=no -i /keys/serverkey [email protected]. seedboxes.cc service plexmediaserver start" --plex-stop-2 "ssh -oStrictHostKeyCh ecking=no -i /keys/serverkey [email protected] service plexme diaserver stop" --debug true
[Sun Feb 21 17:38:07 GMT 2021] Starting.
[Sun Feb 21 17:38:07 GMT 2021] TMPFOLDER: /tmp/plex-db-sync
[Sun Feb 21 17:38:07 GMT 2021] DEBUG: true
[Sun Feb 21 17:38:07 GMT 2021] PLEXDB1: /share/CACHEDEV1_DATA/.qpkg/PlexMediaSer ver/Library/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.libr ary.db
[Sun Feb 21 17:38:07 GMT 2021] PLEXDB2: /mnt/sshfs/com.plexapp.plugins.library.d b
[Sun Feb 21 17:38:07 GMT 2021] PLEXSTART1: service plexmediaserver start
[Sun Feb 21 17:38:07 GMT 2021] PLEXSTOP1: service plexmediaserver stop
[Sun Feb 21 17:38:07 GMT 2021] PLEXSTART2: ssh -oStrictHostKeyChecking=no -i /ke ys/serverkey [email protected] service plexmediaserver start
[Sun Feb 21 17:38:07 GMT 2021] PLEXSTOP2: ssh -oStrictHostKeyChecking=no -i /key s/serverkey [email protected] service plexmediaserver stop
[Sun Feb 21 17:38:07 GMT 2021] PLEXF1: /tmp/plex-db-sync/1.sql
[Sun Feb 21 17:38:07 GMT 2021] PLEXF2: /tmp/plex-db-sync/2.sql
[Sun Feb 21 17:38:07 GMT 2021] TMPDB: /tmp/plex-db-sync/tmp.db
[Sun Feb 21 17:38:07 GMT 2021] IGNORE:
[Sun Feb 21 17:38:07 GMT 2021] IGNORESTR:
[Sun Feb 21 17:38:07 GMT 2021] BACKUP: false
[Sun Feb 21 17:38:08 GMT 2021] version db1: 20201119130000 db2: 20201119130000
[Sun Feb 21 17:38:08 GMT 2021] Stopping Plex on Server 1... Done
[Sun Feb 21 17:38:08 GMT 2021] Stopping Plex on Server 2... Done
[Sun Feb 21 17:38:11 GMT 2021] Checking for changes... [Sun Feb 21 17:38:12 GMT 2021] UP1: 2021-02-21 16:11:35 - UP2: 2021-02-21 16:12:08
Found
[Sun Feb 21 17:38:48 GMT 2021] Processing tags...
[Sun Feb 21 17:38:48 GMT 2021] -=-: select distinct t1.* from taggings1 ts1, tags1 t1, metadata_items1 m1 where ts1.tag_id=t1.id and ts1.metadata_item_id=m1.id and t1.tag_type=11 and m1.guid in (select guid from metadata_items2) and t1.tag not in (select tag from tags2);
./plex-db-sync: line 32: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
[Sun Feb 21 17:38:48 GMT 2021] -=-: select ts1., t1.tag, m1.guid from taggings1 ts1, tags1 t1, metadata_items1 m1 where ts1.tag_id=t1.id and ts1.metadata_item_id=m1.id and t1.tag_type=11 and m1.guid in (select guid from metadata_items2) and m1.guid not in (select distinct m2.guid from taggings2 ts2, tags2 t2, metadata_items2 m2 where ts2.tag_id=t2.id and ts2.metadata_item_id=m2.id and t2.tag_type=11 and t2.tag=t1.tag);
./plex-db-sync: line 32: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
[Sun Feb 21 17:38:48 GMT 2021] -=-: select distinct t2.
from taggings2 ts2, tags2 t2, metadata_items2 m2 where ts2.tag_id=t2.id and ts2.metadata_item_id=m2.id and t2.tag_type=11 and m2.guid in (select guid from metadata_items1) and t2.tag not in (select tag from tags1);
./plex-db-sync: line 32: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
[Sun Feb 21 17:38:49 GMT 2021] -=-: select ts2.*, t2.tag, m2.guid from taggings2 ts2, tags2 t2, metadata_items2 m2 where ts2.tag_id=t2.id and ts2.metadata_item_id=m2.id and t2.tag_type=11 and m2.guid in (select guid from metadata_items1) and m2.guid not in (select distinct m1.guid from taggings1 ts1, tags1 t1, metadata_items1 m1 where ts1.tag_id=t1.id and ts1.metadata_item_id=m1.id and t1.tag_type=11 and t1.tag=t2.tag);
./plex-db-sync: line 32: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
[Sun Feb 21 17:38:49 GMT 2021] -=-: select id, name from accounts where lower(name) not in () order by id;
./plex-db-sync: line 32: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
./plex-db-sync: line 38: 1,: syntax error: operand expected (error token is ",")
[Sun Feb 21 17:38:52 GMT 2021] Starting Plex on Server 1... Done
[Sun Feb 21 17:38:52 GMT 2021] Starting Plex on Server 2... Done
[Sun Feb 21 17:38:53 GMT 2021] Finished.

This is being run from my QNAP after mounting the seedbox database in /mnt using sshfs, any idea what I'm doing wrong?

My sqlite3 version is:
sqlite3 --version
3.21.0 2017-10-24 18:55:49 1a584e499906b5c87ec7d43d4abce641fdf017c42125b083109bc77c4de48827

My sshfs version is:
sshfs --version
SSHFS version 2.10
FUSE library version: 2.9.7
fusermount version: 2.9.7
using FUSE kernel interface version 7.19

Thanks,
Josh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant