Any way to feed a text file into CP to batch out movies?

Most commonly asked questions will have thire awnsers here, please search before asking!
noone
Junior Member
Posts: 29
Joined: 25 Jun 2012 20:58
Has thanked: 3 times
Been thanked: 1 time
Contact:
Status: Offline

Any way to feed a text file into CP to batch out movies?

Postby noone » 20 Jun 2013 22:35

I lost a 3TB hard drive full of movies (thanks Western Digital!), and I have a list of the movies that were lost. It's a pretty long list and I was wondering if there was some way to feed this list into CouchPotato so that I don't have to manually input each of the 300 movies into CP.....

Any ideas?

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: Any way to feed a text file into CP to batch out movies?

Postby clinton.hall » 21 Jun 2013 00:07

These movies should still be in CPS manage page....
First set downloaded to manual... You don't want to download anything until you have it all sorted...
just select the movies (change to selection view and select all... go page by page, i.e all A then all B ) and edit quality to a higher quality... This will put the movies back in wanted page. Then change manage to enable "cleanup after" run a full scan, then remove the folder from manage.

Now, change the quality to all movies in wanted list to your preferred quality.... Re-add the manage folder (in case you still have some movies) and do a full scan... This should remove any existing movies from your wanted page (as long as the quality is correct)

Now you can take the downloaded out of manual and refresh all movies... I hope you have good download speeds and bandwidth.

If your manage list has already been cleaned, before all of this turn off the option "cleanup after" in manage, then shutdown CPS, go to your data directory and replace the CouchPotato.db with a version from the db archive (prior to the drive failure) and then start CPS...

Once you are all up and running... An I suggest getting a good NAS and setting up a RAID with data protection (RAID 1, 5, 6 etc). Also, in theory you should always have a data backup plan... (I have 2 x NAS with RAID 5 on each and an rsync job between then to keep them backed up. One is stored in the house and the other is in a de-tached shed with a wireless link. This is all done to protect by 6 TB media library ;) )

noone
Junior Member
Posts: 29
Joined: 25 Jun 2012 20:58
Has thanked: 3 times
Been thanked: 1 time
Contact:
Status: Offline

Re: Any way to feed a text file into CP to batch out movies?

Postby noone » 21 Jun 2013 02:44

Thanks Clint.

Unfortunately, the 300 movies that we re on this disk were built over several years pre-CP, but I can probably recover the last 20 or so via CP. Thanks for the instructions.

I am currently using PhotoRec for file recovery which does not appear to be working because the filenames it is saving the recovered files is all off. Any recommendations for a good file recovery tool?

Obviously, I don't have a RAID or NAS setup at the moment. I have about 15TB total of movies. I built my own full size ATX server which currently contains 8 hard drives, each of which range in size from 1TB to 3TB. To buy a NAS that only fit 2 to 3 hard drives for the same price as my entire computer with case cost did not seem cost effective to me and I still feel that movies are disposable data....

I do backup my important stuff though like pictures.......

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: Any way to feed a text file into CP to batch out movies?

Postby clinton.hall » 21 Jun 2013 06:53

yeah... fair call.

Consider my comments aimed towards anyone with just one disk ;) The point I was hinting at is that as frustrating as it is, we cant really blame the HDD manufacturers unless you can show it to be poor QC or design fault etc... I have had both WD and Seagate drives fail in the past for various reasons, and at the end of the day both produce some great drives...

I cant really recommend any recovery software here as I don't have a lot of experience with it. Nor can I think of an easier way to get your list of movies back on wanted page :( Sorry.

RuudBurger
Main Honcho
Posts: 204
Joined: 10 May 2012 12:01
Been thanked: 9 times
Contact:
Status: Offline

Re: Any way to feed a text file into CP to batch out movies?

Postby RuudBurger » 21 Jun 2013 13:53

You can import movies if you have the imdb urls.
I haven't tested this, but it should work:
- Create a file with all the movie urls (to IMDB) in it. Format doesn't matter.
- Put this file somewhere where it accessible via an url
- Add that url to the IMDB automation

So first you need a script to get all the imdb urls, as I assume you only have the titles ;)

Bartek
Member
Posts: 169
Joined: 22 May 2012 15:14
Has thanked: 1 time
Been thanked: 2 times
Contact:
Status: Offline

Re: Any way to feed a text file into CP to batch out movies?

Postby Bartek » 22 Jun 2013 23:34

That would be nice feature Ruud :)

steppedup
Junior Member
Posts: 3
Joined: 04 Oct 2013 06:58
Been thanked: 2 times
Status: Offline

Re: Any way to feed a text file into CP to batch out movies?

Postby steppedup » 04 Oct 2013 07:03

Ok - I got the url's like this right? http://pastebin.com/raw.php?i=g1cyMnct

Now how can I add this to the IMDB automation?

steppedup
Junior Member
Posts: 3
Joined: 04 Oct 2013 06:58
Been thanked: 2 times
Status: Offline

Re: Any way to feed a text file into CP to batch out movies?

Postby steppedup » 04 Oct 2013 09:04

Ok - I figured it out...here's a how-to that I wrote on how to do this via non-script method.

Sorry for the thread subject - could not fit all of this there:

In Windows, how to repopulate a hard drive with all of your missing movies from a particular hard drive (assuming you have multiple) by pulling a list of all of your movies directly from the XBMC database using theSQL Lite Browser to grab all of the movies you have currently listed in XBMC (including the missing hard drive!) , usingOpen Office to build a list of url's, and then usingJames Marshall's test bed to generate a web page to run CouchPotato's bookmarklet to semi-automatically rebuild your movie collection.

This method takes a little bit of prep, but lets you decide what kind of quality of movie you want - and if you even want that movie again.

What's more important, you don't have to mess with formatting/ renaming etc. Just a little quick prep work, and then off to the races.

Prep Google Chrome
In google chrome, open the url to your couchpotato and go to the automation page screen. Drag the bookmarklet to your bookmark bar -shown by the big red arrows below.

Image


Exporting your movie list from XBMC:
Download and install SQL Lite Browser: http://sourceforge.net/projects/sqlitebrowser/ which is discussed here: http://sqlitebrowser.sourceforge.net/

Extract the files to a folder you make somewhere on your C: drive. Then open sqllitebrowser up, and then select your video database. In Frodo and in Windows:
C:\Users\buddy\AppData\Roaming\XBMC\userdata\Database\MyVideos75.db

replace buddy above with your username.

Go to File, Export, Table as CSV. Table name is movies. Save it to your desktop as movies.csv.
Image

Import into Open Office - goal is to get your data.
Open the .csv file in Open Office, and you'll have all of your movies listed. It may prompt you to select the format - make sure you have comma as a delimiter selected.

The far left column will be the title of the movie. Column 22 will the path of the movies.

You may have to order based on the path name to get a good selectable range of cells. Basically, you just want all of your files from that particular hard drive, right?

Copy that selection and paste it into a new fresh spreadsheet.

Manipulation of Data in Open Office - goal is to get a bunch of links to the IMDB Pages.
Right-click on column L - this is the column directly to the left of the IMDB tt number...for example..(http://www.imdb.com/title/tt1611224/) tt1611224. You will get a context menu - click on Insert column.

In the first row of that empty inserted column, you will put

Code: Select all

<a href="
. Then, hover your mouse just over the lower right border of that cell. It will turn in a bolded cross (or plus sign). Click and draw all the way down the column to the bottom of your desired column. The italicized section is called "the hover and copy" procedure here on out.

Right-click on the column next to your column of <a href =". Insert column. Paste this into the cell:

Code: Select all

http://www.imdb.com/title/

Hover and copy.

Column N should be your tt Numbers. Right click and insert a column to the right. Insert

Code: Select all

">
into the cell. Hover and copy.

Right click and insert a column to the right of your "> column. Type

Code: Select all

</a>
into that cell. Hover and copy.

Right click and insert a column to the right of your </a> column. Click on the formula bar, and type in this:

Code: Select all

  =CONCATENATE(L1;M1;N1;O1;C1;P1)
. Hover and copy. This will concatenate your columns together. The result is going to be this:

Code: Select all

[b]<a href="http://www.imdb.com/title/tt1972663">  Into the Abyss</a>[/b]



Image

Copy this last column and go to a url generating page like: http://www.jmarshall.com/easy/html/testbed.html.

Between the body statements, paste your list of URLs. Click Display.

Image

This will generate a page like this:

Image

Now, you can click on the movie, which will open in IMDB. Then, you can click on your CouchPotato bookmark, and select your quality...and it will get added.

You can see the CouchPotato bookmarklet by the left red arrow - when it works, you'll see the pop-up on the lower right in the second red arrow:

Image

Click back to go back to your list of movies - and you'll see the one that you just did will now be a different color than the rest - so easy to keep track.

BTW, couch potato is working on a way to download a list of movies: viewtopic.php?p=5853

noone
Junior Member
Posts: 29
Joined: 25 Jun 2012 20:58
Has thanked: 3 times
Been thanked: 1 time
Contact:
Status: Offline

Re: Any way to feed a text file into CP to batch out movies?

Postby noone » 05 Jun 2015 06:19

steppedup- thanks for the extremely helpful post. It has helped me rebuild my latest 2TB HD failure.


Return to “FAQ”