-
Notifications
You must be signed in to change notification settings - Fork 142
Update plex-core to support synology packages #247
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
base: master
Are you sure you want to change the base?
Changes from all commits
9fc45da
117f922
9124a43
5bfb7d4
a5d183f
b6fc540
ec89f90
70888ea
1aba28a
3e25035
cc9ee5c
cb33e7b
6f40555
569adbb
335cf82
2c91c80
848f56c
e5b65ce
508e7dd
35fea18
e9cecfc
fa31574
26c65ff
a83f077
c203795
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,7 +51,7 @@ getPlexToken() { | |
| fi | ||
| done | ||
| while true; do | ||
| read -e -p "PlexPass Password: " -i "$PASS" PASS | ||
| read -e -s -p "PlexPass Password: " -i "$PASS" PASS | ||
| if [ -z "$PASS" ]; then | ||
| info "Please provide a password" | ||
| else | ||
|
|
@@ -226,17 +226,21 @@ isNewerVersion() { | |
| } | ||
|
|
||
| parseVersion() { | ||
| if [ "${REDHAT}" = "yes" ]; then | ||
| if [ "${DISTRO}" = "redhat" ]; then | ||
| cut -f2- -d- <<< "$1" | cut -f1-4 -d. | ||
| elif [ "${DISTRO}" = "synology" ]; then | ||
| cut -f2-3 -d- <<< "$1" | ||
| else | ||
| cut -f2 -d_ <<< "$1" | ||
| fi | ||
| } | ||
|
|
||
| getPlexVersion() { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For readability, functions like these should generally start with the "default" option (Ubuntu/Debian) and then go on to the other cases. It's just a bit confusingly written right now because of how the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The way GitHub is rendering this is a bit confusing. The comment is about the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so if I just switch the cases like so I don't think the switch ever reaches the synology case because I'm not sure how best to change it. |
||
| if [ "${REDHAT}" != "yes" ]; then | ||
| if [ "${DISTRO}" = "debian" ]; then | ||
| dpkg-query --showformat='${Version}' --show plexmediaserver 2>/dev/null | ||
| elif hash rpm 2>/dev/null; then | ||
| elif [ "${DISTRO}" = "synology" ]; then | ||
| synopkg version "Plex Media Server" 2>/dev/null | ||
| elif [ "${DISTRO}" = "redhat" ]; then | ||
| local rpmtemp | ||
| if rpmtemp=$(rpm -q plexmediaserver); then | ||
| parseVersion "$rpmtemp" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally kept password echo on since plexupdate is meant to still be accessible to non-technical people, and they often get confused when no output appears while typing. (And bash still doesn't provide a way to replace characters with
*or something similar.)I'm ok with trying it and seeing if we get any issues filed about it, but I also view it as unnecessary in this case, so I'll leave the decision up to you.