Kodi Community Forum
AutoMovies - (Fully) Automatic movie downloader - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: AutoMovies - (Fully) Automatic movie downloader (/showthread.php?tid=107388)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13


- turok - 2011-08-15

TheStretchedElf Wrote:Just a bit of feedback on the scan-import-upgrade feature. Stopping the scan after x amount of movies have been scanned to avoid a mass upgrade feels a little too much like a workaround. Perhaps the user could allow the scan to complete, then "import as paused" which would allow them to select the individual movies they wish to upgrade, with the rest remaining paused? When movies are un-paused AM begins searching providers for better quality versions.

Thanks for the feedback! You can actually do this with the current feature set -- just set the default status to "not wanted", and when you select the movies you want to import AND upgrade, change the status to "wanted" for those right before you import (or it's very easy to remove movies from the list as well if you don't want some of them imported at all). It's literally just a few clicks. Still, adding another button like 'import as paused' would only take a few minutes anyway =)


- Mjayy - 2011-08-18

Turok this looks great!

I've just a question do you plan to implement a feature to download movies in other languages?

In CP you have the feature to have a required word like "German" in your search results but it dosen't work very well for me, because the movies here have often other names.

But these names are stored in themoviedb.org under "Alternative Titles". So it would be great if you could impelment this feature. If so I would love to test it out.

Cheers,

Mjayy


- rinseaid - 2011-08-19

I'd be very interested in testing this on Windows 7 x64. I'm in a somewhat unique situation after having recently lost around 1TB of movies (~700mb DVD Rips) from my failed RAID array and I have a file/directory listing that I want to plug into an application to manage regrabbing the list for me - this may be useful for you in terms of testing.

Looks great, seems to address all the issues I had with CouchPotato (such as actually holding/managing the library post download.)

Let me know if I can help out.


like to test on Mac OSX - asiajason - 2011-08-19

Hey, I'm looking for a way to better manage my movies - especially the incorrectly scrapped ones in XBMC.

If this will help with that, I'd like to test this on Mac OS X 10.6.8

If not, can you point me to an app/addon that will do that?

Let me know


- turok - 2011-08-20

Here's the first release (I'll also edit the original post to have this info):
http://www.mediafire.com/?g3p3pc6b9dm8qys

I decided to just put this out there for everyone and see how it works, so please be gentle =)

A few notes first (READ THIS!):
  • Only tested with Win7 x64
  • MEncoder and MediaInfo (for Windows) are packaged with this
  • Default port: 8087 (editable in settings)
  • When you first run AutoMovies.bat, you should go to Settings and make sure everything is filled in. Note: if you are running a non-Windows OS, make sure "Combine multi-file videos" and "Generate NFO/TBN/fanart" are UNCHECKED.
  • To refresh a grid, click the Filter button for the grid and just re-submit. I'll add a refresh loop and/or a refresh button soon (ez mode)
  • A hard-coded setting right now is to always download the best quality (according to your profile), regardless of whether it's "another TS". The idea is that, if the download is a better file size, or has your preferred keywords, etc, we should replace your existing version with it. This is a personal preference of mine since I don't have bandwidth limits, but we'll definitely add some shit to customize how this works
  • To enable batch file processing in SABnzbd, make a copy of Renamer.bat and copy it to your SABnzbd batch file folder. Then, edit it to look similar to this:
    Code:
    cd "C:/Path/To/AutoMovies"
    java -cp lib/*;conf/ -javaagent:lib\openjpa-all-2.1.0.jar apps.automovies.Renamer %1
  • So far, NZBMatrix is the only provider (just testing the program flow, etc right now... definitely adding more soon!)
  • XBMC and email notifications for now
  • Oops! Forgot to update something, so it'll only post-process AVI files right now. I'll write that down to update tonight.

Within ~30 seconds of the first launch of AutoMovies, you should see the 10 hottest movies in theaters right now in your "wanted movies" list. Remember to refresh the grid if you don't see them!

I'm sure I left out hundreds of things that are important. Let me know what issues you guys run into. To the Mac/Linux dudes out there, this should work on your OS (just create shell scripts similar to AutoMovies.bat and possibly Renamer.bat), minus the "combine multi-file videos" and "generate meta data" features... I think there are MEncoder and MediaInfo releases for other OSes, but I haven't looked. Should be easy to add soon though =)

-t


- j1nx - 2011-08-20

Ok trying it out on my server (Ubuntu Maverick)

First as you use OpenJPA
Code:
sudo apt-get install libopenjpa-java
This installs openjpa in /usr/share/java


Made the following bash file to replace Automovies.bat
Code:
#!/bin/sh

set -e
export AUTOMOVIE_PATH="<path to automovies folder>"

cd ${AUTOMOVIE_PATH}

/usr/bin/java -cp lib/*;conf/ -javaagent:/usr/share/java/openjpa.jar apps.automovies.Main

Starting gives the following error output;
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: lib/apps/automovies/jar
Caused by: java.lang.ClassNotFoundException: lib.apps.automovies.jar
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: lib/apps.automovies.jar.  Program will exit.
Does it look like you use an hard programmed path "lib/apps/automovies/jar"?


EDIT:
Ok did not figured out you delivered openjpa with the package, so the bash file only need to change the "\" for a "/"
Code:
#!/bin/sh

set -e
export AUTOMOVIE_PATH="<path to automovies folder>"

cd ${AUTOMOVIE_PATH}

/usr/bin/java -cp lib/*;conf/ -javaagent:lib/openjpa-all-2.1.0.jar apps.automovies.Main

It's this part that messes it up;
Code:
java -cp lib/*

Where does this "lib/*" referres to? Because if I change it to "/<mypath>/lib/*"

The error changes into (example, my path = "/home/peter/.automovies");
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: /home/peter//automovies/lib/apps/automovies/jar
Caused by: java.lang.ClassNotFoundException: .home.peter..automovies.lib.apps.automovies.jar



- splnuts - 2011-08-20

Installed it on Win 7 64bit and its importing my library now. I wish the website format would work better for mobile devices.

Is there a way to search for a Movie by name instead of having to search for the IMDB id? It also seems to respond a little slow (although this could be because its importing my library).

Ill update as I get to use it.


- TheStretchedElf - 2011-08-20

OK, so I downloaded, unzipped, ran automovies.bat and tried to load localhost:8087 in my browser but without any luck. Am I doing something wrong?


- splnuts - 2011-08-21

TheStretchedElf Wrote:OK, so I downloaded, unzipped, ran automovies.bat and tried to load localhost:8087 in my browser but without any luck. Am I doing something wrong?

If you open the command prompt and type
Code:
java
and hit enter.

Do you get
Code:
'java' is not recognized as an internal or external command?



- TheStretchedElf - 2011-08-21

splnuts Wrote:If you open the command prompt and type
Code:
java
and hit enter.

Do you get
Code:
'java' is not recognized as an internal or external command?

No, I get about 50 lines of stuff.


- turok - 2011-08-21

j1nx - Do you have Java 1.6+? Try wrapping the cp argument in quotes:
Code:
cp "lib/*;conf"
... and maybe some different variations:
Code:
cp "conf:lib/*"
(I've seen colons used before, not sure if that works though)
Code:
cp "conf/;lib/*"

TheStretchedElf - Type
Code:
java -version
at a command prompt. Make sure you have version 1.6 or greater? Also, try adding a "pause" command to AutoMovies.bat and let me know what you see when you run it (full stack trace, if you get one).

splnuts - When you're changing the movies for your imported library, you can do a search on movie name. When you're just adding movies to the database, you need to enter the IMDB id (it takes me about 15 seconds to open a new tab, search, and copy it from the URL). However, since we already have the functionality to search within the application, I just have to add that to the 'Add Movie' button.


- j1nx - 2011-08-21

turok Wrote:j1nx - Do you have Java 1.6+? Try wrapping the cp argument in quotes:
Code:
cp "lib/*;conf"
... and maybe some different variations:
Code:
cp "conf:lib/*"
(I've seen colons used before, not sure if that works though)
Code:
cp "conf/;lib/*"

Thx for the lead. Apparently in linux the ";" needs to be ":", linux ussually is a lot more picky about these things.

So as some tip related to these; Watch out for Upper and Lower case things. Linux will threat them differently.


- j1nx - 2011-08-21

OK, my contribution so far.

For the linux users

1) The following bash file can be used to manually start AutoMovies. Can be included into the next version.
AutoMovies.sh
Code:
#!/bin/sh

set -e

/usr/bin/java -cp lib/*:conf -javaagent:lib/openjpa-all-2.1.0.jar apps.automovies.Main

2) The following bash file can be used to autostart AutoMovies at startup. Can be included into the next version.
AutoMovies.rc
Code:
#! /bin/sh

### BEGIN INIT INFO
# Provides:          AutoMovies application instance
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of AutoMovies
# Description:       starts instance of AutoMovies using start-stop-daemon
### END INIT INFO

############### EDIT ME ##################
# path to app
APP_PATH=/path/to/automovies

# path to python bin
DAEMON=/usr/bin/java

# startup args
DAEMON_OPTS=" -cp lib/*:conf -javaagent:lib/openjpa-all-2.1.0.jar apps.automovies.Main"

# script name
NAME=automovies

# app name
DESC=AutoMovies

# user
RUN_AS=user

PID_FILE=/var/run/automovies.pid

############### END EDIT ME ##################

test -x $DAEMON || exit 0

set -e

case "$1" in
  start)
        echo "Starting $DESC"
        start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
        ;;
  stop)
        echo "Stopping $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        ;;

  restart|force-reload)
        echo "Restarting $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        sleep 15
        start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0
To use, edit at least the "path" and "user" variable and;
Code:
sudo cp AutoMovies.rc /etc/init.d/automovies
sudo /etc/init.d/automovies start


3) At start I got the following error;
Code:
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    at java.awt.Desktop.getDesktop(Desktop.java:124)
    at apps.automovies.Main.main(Main.java:39)
I am running it on a headless server, so please make this an option to be set; "starting browser at start". Sickbeard and Couchpotato both have it as option.

4) Some small (cosmetic/useability) things every where, like adding a "browse" button to the "add movie folder" dialog etc. But I am not going to bother you with those at this stage.Big Grin


That all I can do for now because I have no nzbmatrix (VIP) account. So for me; The next thing is to wait for newznab support (hint!)


- fryster - 2011-08-21

Hope this helps some more noobs like me! I was having java problems and thus couldn't get this to run. I went to the link below and downloaded the relevant java (in my case windows x64) and hey presto the .bat file runs!

http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html

Hope this helps some newbies!


- TheStretchedElf - 2011-08-21

I still can't get this to run. I've installed the x86 Java from the link above. Any other help? Turok?