mstinaff / PMS_Updater

Shell script for updating the Plex Media Server inside the FreeNAS Plex plugin
MIT License
442 stars 90 forks source link

Updater can't find downloads #9

Closed Rikrik closed 1 year ago

Rikrik commented 9 years ago

Hi,

I tried to update my Plex Media Server today using your script. The script has worked fine until today. Today i got this error message "Could not find a PlexMediaServer-[0-9].[0-9].[0-9].[0-9].[0-9]-[0-9,a-f]-freebsd-amd64.tar.bz2 download link on page https://plex.tv/downloads?channel=plexpass"

I think they may have changed the way files are stored on their end.

I'm not sure if you are still watching this, but it would be really awesome if you could take a look at the script if you have some time and see if maybe you can fix it.

Kind regards, Rikrik

Arcanemagus commented 9 years ago

If you don't have PlexPass they fixed the site to make that channel not show anything for you any more, see #7.

Rikrik commented 9 years ago

Oops, i didn't see that post. I'll try that new script. I have a plexpass and i see that that still requires testing.

Arcanemagus commented 9 years ago

Hmmm, if you have PlexPass it should still be working fine. (At least it worked fine for me yesterday...)

Rikrik commented 9 years ago

Hmm strange. It's not working for me at the moment. When i try the fixed script i get the error "./PMS_Updater.sh: 146: Syntax error: "then" unexpected (expecting "fi")" Not really sure what that means

thesymbol commented 9 years ago

Ops, i will fix that error straight away! give me a minute or two

thesymbol commented 9 years ago

It should now be working correctly

Rikrik commented 9 years ago

Wow, thank you for the quick fix. The error on line 146 is indeed gone now.

However for some reason i still can't get it to update to the plexpass version. With your script i get the error "Could not find a PlexMediaServer-[0-9].[0-9].[0-9].[0-9].[0-9]-[0-9,a-f]-freebsd-amd64.tar.bz2 download link on page https://plex.tv/downloads?channel=plexpass" as well now.

When i added the -n option to make it update to the normal version it worked fine.

Could this be because they released the latest version to everyone today? Since it worked fine for Arcanemagus yesterday when the latest version wasn't public yet. Or would this be caused by something else?

thesymbol commented 9 years ago

I have 4 guesses why you dont get the plexpass version:

  1. They changed the URL for plexpass (unlikely since Arcanemagus downloaded yesturday).
  2. You have typed in wrong username/password in the script.
  3. They have changed how login works on plex.tv so the scripts login functions do not work anymore.
  4. It might be that they have integrated the plexpass version into the normal version (unlikely since they have had them seperated for a long time).
Arcanemagus commented 9 years ago

Just verified that my version of the script doesn't (significantly) differ from the one on here btw. Last time I ran it was 2015-10-29 18:12 (GMT).

thesymbol commented 9 years ago

And you login with -u and -p parameters for username/password? if so then it rules out everything except wrong username/password, or Rikrik's plexpass might have run out?

Arcanemagus commented 9 years ago

Actually, that's an interesting point, for security measures (in other words for the hell of it...) this is the command I run: PMS_Updater.sh -c /etc/PMS_Updater_user -a -v

With /etc/PMS_Updater_user containing:

user=username@gmail.com
password=mypassword
thesymbol commented 9 years ago

ah yea but that is doing the same as using -u and -p but a bit more "secure"

Arcanemagus commented 9 years ago

Essentially, although if there is a difference it's on wget's side.

Rikrik commented 9 years ago

My username and password haven't changed in nearly a year, so i doubt that's it. And i bought the lifetime plexpass package before they doubled the price so that can't be it either.

thesymbol commented 9 years ago

I would suggest you double check it other than that i do not know.

rbeall commented 9 years ago

So if you don't have plex pass am I out of luck in the future for using this script? I can't even find the .tar files manually for freenas to use this script manually? thoughts?

rbeall commented 9 years ago

I just used the version posted in the pull request and it worked perfectly for me (non-plexpass user) Thanks for the pull request work and hopefully it gets added soon!

wget https://github.com/thesymbol/PMS_Updater/raw/fixurl/PMS_Updater.sh

thesymbol commented 9 years ago

Im starting to think that plex has merged the plexpass version and the non-plexpass version together, would not be ideal but it might be the case.

chipicau commented 9 years ago

so i just ran wget https://github.com/thesymbol/PMS_Updater/raw/fixurl/PMS_Updater.sh and than i put ./PMS_Updater.sh -n and still tells done but no change plex still shows my old software in the settings

(edit) i got it working thanks guys

mrMuppet commented 8 years ago

Still can't update. even with "thesymbol"-version.

Arcanemagus commented 8 years ago

@mrMuppet are you getting any error messages?

thesymbol commented 8 years ago

@mrMuppet as @Arcanemagus said do you get any error messages? and also what command did you run? and what is the contents of /tmp/downloads file, or /tmp/downloads?channel=plexpass if you have plexpass?

mrMuppet commented 8 years ago

The text I get: [code< sh /usr/PMS_Updater.sh -c=pass.txt -a -v Using URL https://plex.tv/downloads?channel=plexpass Downloading https://plex.tv/downloads?channel=plexpass --2015-11-26 15:22:48-- https://plex.tv/downloads?channel=plexpass Resolving plex.tv (plex.tv)... 50.18.176.149, 184.169.150.53, 184.169.183.121, ... Connecting to plex.tv (plex.tv)|50.18.176.149|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://plex.tv/users/sign_in [following] --2015-11-26 15:22:49-- https://plex.tv/users/sign_in Connecting to plex.tv (plex.tv)|50.18.176.149|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Last-modified header missing -- time-stamps turned off. --2015-11-26 15:22:49-- https://plex.tv/users/sign_in Reusing existing connection to plex.tv:443. HTTP request sent, awaiting response... 200 OK Length: 14975 (15K) [text/html] Saving to: '/tmp/downloads?channel=plexpass'

100%[========================================================>] 14,975 --.-K/s in 0s

2015-11-26 15:22:50 (285 MB/s) - '/tmp/downloads?channel=plexpass' saved [14975/14975]

Download Complete Searching https://plex.tv/downloads?channel=plexpass for PlexMediaServer-0.9.14.3.1555-590ac74-freebsd-amd64.tar.bz2 .....Could not find a PlexMediaServer-0.9.14.3.1555-590ac74-freebsd-amd64.tar.bz2 download link on page https://plex.tv/downloads?channel=plexpass[/code]

thesymbol commented 8 years ago

If you could post the contents of the Saving to: '/tmp/downloads?channel=plexpass' file that would help aswell, but judging by the output there dosent seem to be any download link on the page downloaded. (the Saving to: '/tmp/downloads?channel=plexpass' file contains the output of the page where the link should be).

mrMuppet commented 8 years ago

My /tmp/downloads?channel=plexpass

http://pastebin.com/BdDk3pp0

thesymbol commented 8 years ago

@mrMuppet that is a login page, are you sure you have plexpass? and if so are you 100% sure that you have the correct credentials in your pass.txt? You could try and use the normal version instead if plexpass version isnt needed with -n

mrMuppet commented 8 years ago

With -n the normal update works. But plex pass credentials should be right and work at plex.tv. What can I do?

mrMuppet commented 8 years ago

Tried a new password without special characters... Still not working. :-(

mrMuppet commented 8 years ago

Next try: with -u= parameter and password question. Still same. Or do have to delete the download?channel-file?

thesymbol commented 8 years ago

No that should not be necessary i have no clue then what is wrong. Since we have had other plexpass users run it without problem and when they do have problems it is usually the password that is incorrect.

mrMuppet commented 8 years ago

I think I will try to install local download tomorrow.

mrMuppet commented 8 years ago

Tried Local Update: root@plexmediaserver_1:/usr # sh PMS_Updater.sh -l=/usr/PlexMediaServer-0.9.14.3.1555-590ac74-freebsd-amd64.tar.bz2 -v -a Verifying =/usr/PlexMediaServer-0.9.14.3.1555-590ac74-freebsd-amd64.tar.bz2 .....bzip2: Can't open input =/usr/PlexMediaServer-0.9.14.3.1555-590ac74-freebsd-amd64.tar.bz2: No such file or directory. =/usr/PlexMediaServer-0.9.14.3.1555-590ac74-freebsd-amd64.tar.bz2 is not a valid archive, cannot update with this file. root@plexmediaserver_1:/usr # sh PMS_Updater.sh -l=/usr/PlexMediaServer-0.9.14.3.1555-590ac74-freebsd-amd64.tar -v -a Verifying =/usr/PlexMediaServer-0.9.14.3.1555-590ac74-freebsd-amd64.tar .....bzip2: Can't open input =/usr/PlexMediaServer-0.9.14.3.1555-590ac74-freebsd-amd64.tar: No such file or directory. =/usr/PlexMediaServer-0.9.14.3.1555-590ac74-freebsd-amd64.tar is not a valid archive, cannot update with this file.

thesymbol commented 8 years ago

@mrMuppet remove the = from the command and it should work

mrMuppet commented 8 years ago

Thanks! it worked!

mkiang commented 8 years ago

Was this ever resolved? I get a similar error when running with the -f -v tags. Normal downloads (via -n) work fine.

Using URL https://plex.tv/downloads?channel=plexpass
Downloading https://plex.tv/downloads?channel=plexpass
--2015-12-01 19:25:36--  https://plex.tv/downloads?channel=plexpass
Resolving plex.tv (plex.tv)... 184.169.150.53, 50.18.176.149, 50.18.56.37, ...
Connecting to plex.tv (plex.tv)|184.169.150.53|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://plex.tv/users/sign_in [following]
--2015-12-01 19:25:37--  https://plex.tv/users/sign_in
Connecting to plex.tv (plex.tv)|184.169.150.53|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Last-modified header missing -- time-stamps turned off.
--2015-12-01 19:25:38--  https://plex.tv/users/sign_in
Reusing existing connection to plex.tv:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: '/tmp/downloads?channel=plexpass'

    [ <=>                                   ] 13,592      --.-K/s   in 0.09s   

2015-12-01 19:25:38 (147 KB/s) - '/tmp/downloads?channel=plexpass' saved [13592]

Download Complete
Searching https://plex.tv/downloads?channel=plexpass for PlexMediaServer-[0-9]*.[0-9]*.[0-9]*.[0-9]*.[0-9]*-[0-9,a-f]*-freebsd-amd64.tar.bz2 .....Could not find a PlexMediaServer-[0-9]*.[0-9]*.[0-9]*.[0-9]*.[0-9]*-[0-9,a-f]*-freebsd-amd64.tar.bz2 download link on page https://plex.tv/downloads?channel=plexpass

As far as I can tell, the tmp folder for plexpass is empty:

root@plexmediaserver_1:/ # ls -l tmp/downloads\?channel=plexpass 
-rw-r--r--  1 root  wheel  13592 Dec  1 19:25 tmp/downloads?channel=plexpass
Arcanemagus commented 8 years ago

Check the contents of /tmp/downloads?channel=plexpass, it most likely contains a login page which means your credentials are probably incorrect.

mkiang commented 8 years ago

Silly me. Made a typo in my script. Apologies.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.