Wanted List Backup and Restore

So you made CouchPotato even more awsome?
jaxjexjox
Member
Posts: 62
Joined: 22 Jul 2014 12:09
Status: Offline

Re: Wanted List Backup and Restore

Postby jaxjexjox » 14 Sep 2014 16:53

Thank you *AGAIN* for this.
Thanks to a careless update script on my FreeNAS machine, I lost my entire CP configuration. Considering my ... eclectic taste in movies it was painful to lose it. I've got back my list, even if it's 6 weeks out of data, it's at least 80% of what I had.

Seriously it's a lifesaver, thank you so much.

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Wanted List Backup and Restore

Postby clinton.hall » 14 Sep 2014 23:20

glad I could help... good luck rebuilding the last 20% of your list ;)

stlouistechy
Junior Member
Posts: 12
Joined: 10 May 2014 08:07
Status: Offline

Re: Wanted List Backup and Restore

Postby stlouistechy » 17 Sep 2014 04:54

What are your thoughts on this error Clinton?


C:\Users\Jon\Downloads\CP_Wanted\CP_Wanted_List>c:\python27\python.exe wanted.py backup WantedListBackup.txt
Loading config from couch.cfg
Opening URL: http://localhost:5050/api/xxxxxxxxxxxxx ... tus=active
Traceback (most recent call last):
File "wanted.py", line 83, in <module>
process(sys.argv[1], sys.argv[2])
File "wanted.py", line 56, in process
imdb_list = [ item["info"]["imdb"] for item in result["movies"] ]
KeyError: 'info'

C:\Users\Jon\Downloads\CP_Wanted\CP_Wanted_List>

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Wanted List Backup and Restore

Postby clinton.hall » 17 Sep 2014 23:31

This suggests a movie was returned that didn't include the expected structure...
What version of CouchPotato do you use? This may have changed and therefore I need to update this script.

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Wanted List Backup and Restore

Postby clinton.hall » 18 Sep 2014 04:44

can't reproduce on current develop
Any ways... I have added a test for this key, so any movie listed without it will be skipped and the remaining movies will be added to the list.
New version is on the first post in this thread.

peer
Junior Member
Posts: 28
Joined: 01 Jul 2014 10:26
Has thanked: 2 times
Been thanked: 3 times
Status: Offline

Re: Wanted List Backup and Restore

Postby peer » 09 Oct 2014 07:36

Clinton: Do you have this on github?

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Wanted List Backup and Restore

Postby clinton.hall » 09 Oct 2014 07:47

no. I only posted it here.
I could put it on github if needed..

peer
Junior Member
Posts: 28
Joined: 01 Jul 2014 10:26
Has thanked: 2 times
Been thanked: 3 times
Status: Offline

Re: Wanted List Backup and Restore

Postby peer » 10 Oct 2014 14:05

I was planning on making small improvements to the script. So if you want that in your script as well I can make a PR if you publish it on github

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Wanted List Backup and Restore

Postby clinton.hall » 11 Oct 2014 01:53


peer
Junior Member
Posts: 28
Joined: 01 Jul 2014 10:26
Has thanked: 2 times
Been thanked: 3 times
Status: Offline

Re: Wanted List Backup and Restore

Postby peer » 18 Oct 2014 11:52

Made a PR.
Please let me know if you don't want me to send these and only concentrate on my fork instead :shy:

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Wanted List Backup and Restore

Postby clinton.hall » 19 Oct 2014 23:00

merged... thanks.

perezbalen
Junior Member
Posts: 3
Joined: 06 Mar 2015 17:16
Status: Offline

Re: Wanted List Backup and Restore

Postby perezbalen » 07 Mar 2015 20:39

Hi

I can make a backup, but I can't restore it. The backup builds a txt file fine, but when I try to restore, the program hangs.

Code: Select all

C:\Python27>python.exe CP-BackupTool-master\wanted.py --type restore --file CP-BackupTool-master\backup.txt
Loading config from: CP-BackupTool-master\couch.cfg
Doing a full managed scan...
Opening URL: http://192.168.2.116:8682/api/901fdadb081eR9487f696ca1584K4b7b/manage.update/?full=1
Opening URL: http://192.168.2.116:8682/api/901fdadb081eR9487f696ca1584K4b7b/manage.progress

And it stays there...

this is my couch.cfg

Code: Select all

[CouchPotato]
# The hostname or IP
host = 192.168.2.116
# The port for couchpotato
port = 8682
# Your API key here. See README for more information
api_key = 901fdadb081eR9487f696ca1584K4b7b
# Set to 'True' if you want to enable ssl connection (HTTPS)
ssl = False
# Your web root for couchpotato. Empty value is OK
url_base =


What am I doing wrong?

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Wanted List Backup and Restore

Postby clinton.hall » 07 Mar 2015 22:42

It will "hang" at that point until the manage scan is completed (may take a few hours potentially).
this is dont to ensure it doesn't try and download movies you already have.

MiG
Junior Member
Posts: 16
Joined: 22 Nov 2013 08:13
Status: Offline

Re: Wanted List Backup and Restore

Postby MiG » 15 Mar 2015 13:04

Backup script seems to cut off at just 200 IMDb IDs for me, I have about 1200 movies in my wanted list though. I'm using the most recent CP (2.6.3) and v2 of the script.

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Wanted List Backup and Restore

Postby clinton.hall » 16 Mar 2015 11:26

Can you open this as an issue on github https://github.com/clinton-hall/CP-BackupTool/issues

First, can you confirm that you are running the current code from github?

MiG
Junior Member
Posts: 16
Joined: 22 Nov 2013 08:13
Status: Offline

Re: Wanted List Backup and Restore

Postby MiG » 30 Mar 2015 21:50

I am, even downloaded it again in case of gremlins. I'll start an issue.

EDIT: just realised that because of silly other software requirements I'm running an older version of python, 2.7.3 (and I've replicated it on a second machine with 2.7.4). Could there be an issue here?

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Wanted List Backup and Restore

Postby clinton.hall » 02 Apr 2015 13:07

not likely... this is a limit with the restore tool.

sixshooterz
Junior Member
Posts: 1
Joined: 11 Jul 2015 03:29
Status: Offline

Re: Wanted List Backup and Restore

Postby sixshooterz » 11 Jul 2015 03:34

Is this still actively developed? I just tried to restore my movie list and got this error:

Code: Select all

Opening URL: http://localhost:5050/api/[mykey]/manage.update/?full=1
Opening URL: http://localhost:5050/api/[mykey]/manage.progress
Managed scan completed
Traceback (most recent call last):
  File "./wanted.py", line 180, in <module>
    process(args.type, args.file)
  File "./wanted.py", line 145, in process
    movie_list = json.load(f)
  File "/usr/lib/python2.7/json/__init__.py", line 278, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded


My list is just IMDB IDs. I've made sure to remove any erroneous spaces and blank lines.

Currently running the latest version of CP: 69825F9D

Thanks!

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Wanted List Backup and Restore

Postby clinton.hall » 15 Jul 2015 14:52

ah.. can you try editing the list to look like the following:

Code: Select all

[
["tt2250912",""],
["tt5657577",""],
.....
["tt5757775",""]
]


There were changes made to this project to get better information backed up, but in doing so it no longer takes a "plain" list of imdb ids... these need to be formatted.

knifetotheeye
Junior Member
Posts: 5
Joined: 25 Dec 2014 21:31
Status: Offline

Re: Wanted List Backup and Restore

Postby knifetotheeye » 21 Nov 2015 17:27

Hi,

I'm trying to run this script (Have tried a couple of different ways) and am getting the same result each time, any ideas?

D:\shares\Downloads>wanted.py --type backup --cfg C:\Documents and Settings\Nick
\Application Data\CouchPotato/settings.conf --file /volume1/Public/backup.tx
File "D:\shares\Downloads\wanted.py", line 4
<!DOCTYPE html>
^
SyntaxError: invalid syntax

D:\shares\Downloads>c:\python27\python.exe "D:\shares\Downloads\wanted.py" backu
p "D:\shares\Downloads\wanted backup.txt"
File "D:\shares\Downloads\wanted.py", line 4
<!DOCTYPE html>
^

If I open the script the problem on line 4 seems to be 'class':

<html lang="en" class=" is-copy-enabled">

Any ideas?


Return to “External Tools”