Script on Raspberry Pi

Support for Ubuntu and other Desktop Linux distributions
Post Reply
Juschurei
Posts: 3
Joined: 26 Apr 2015, 16:01

Script on Raspberry Pi

Post by Juschurei »

Hallo,

I've set up a NAS on my raspberry pi and have added a ton of movies to it. Now I would like to sort them out.
I've been following this blog post http://www.handmadepixels.co.uk/blog/ra ... pberry-pi/ and followed everything it said, but it doesn't seem to work, the way i'd like it to.

I've created a script:

Code: Select all

#!/bin/bash

DATE_STAMP=` date +%d-%m-%Y-%T`
echo ${DATE_STAMP}

/opt/share/filebot/bin/filebot.sh -rename /share/Multimedia/Videos/* –format “/share/Multimedia/Serien/{n}/Season {s}/{n} – {sxe} – {t}” –db thetvdb -non-strict
So this is what I want the code to do:

1. Rename the files to their correct name
2. Create a Folder with the Name of the series in my folder "Serien"
3. Move the file with the now changed name into the folder "Serien/*Name of series*/"
4. I have chosen to only use theTVDB, as I only want series to be moved into the series folder

This is what happens when I execute that code:

Code: Select all

26-04-2015-16:17:09
Filename pattern: [0.07] SxE, [0.07] CWS
Rename movies using [TheMovieDB]
Failed to grep IMDbID: das.salz.der.erde.2014.german.subbed.doku.720p.bluray.x264-doucement.nfo
Failed to grep IMDbID: encounters-dknmferien_1080p.nfo
Failed to grep IMDbID: w-dbss-1080p.nfo
Failed to grep IMDbID: owg-die.toedliche.mission.der.apostel.s01e01.720p.nfo
Failed to grep IMDbID: owg-die.toedliche.mission.der.apostel.s01e01.720p.nfo
Failed to grep IMDbID: tvs-downton-dd20-sed-dl-7p-bd-x264-503.nfo
Apr 26, 2015 4:17:17 PM net.filebot.web.TMDbClient getMovieInfo
WARNING: Movie data not found: null (0000) [-1 / 1606375]
java.io.FileNotFoundException: Resource not found: http://api.themoviedb.org/3/movie/tt1606375?language=en&api_key=66308fb6e3fd850dde4c7d21df2e8306
	at net.filebot.web.TMDbClient.request(TMDbClient.java:369)
	at net.filebot.web.TMDbClient.getMovieInfo(TMDbClient.java:188)
	at net.filebot.web.TMDbClient.getMovieInfo(TMDbClient.java:179)
	at net.filebot.web.TMDbClient.getMovieDescriptor(TMDbClient.java:158)
	at net.filebot.media.MediaDetection.grepMovie(MediaDetection.java:1258)
	at net.filebot.cli.CmdlineOperations.renameMovie(CmdlineOperations.java:365)
	at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:144)
	at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:75)
	at net.filebot.Main.main(Main.java:169)

NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
	at net.filebot.web.TMDbClient.getMovieDescriptor(TMDbClient.java:159)
	at net.filebot.media.MediaDetection.grepMovie(MediaDetection.java:1258)
	at net.filebot.cli.CmdlineOperations.renameMovie(CmdlineOperations.java:365)
	at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:144)
	at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:75)
	at net.filebot.Main.main(Main.java:169)
Failure (°_°)
I hope somebody can help me with this.

I want to thank everybody in advance for helping me.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Script on Raspberry Pi

Post by rednoah »

FileBot won't work well on 1) rare 2) badly named 3) in a language other than English 4) with .nfo files that do not contain an ID that would help with identification 5) including .nfo files that seem to containing non-existent invalid IDs. Also you 6) process movie and tv episodes in the same batch which is explicitly unsupported.

These files can't be processed. The filenames simply don't make enough sense. See FAQ #2. If you're renaming German data adding --lang de could help so results more closely match your files.

Though the error messages seem somewhat misleading as well here. Error message are reduced in newer revisions.

You probably wanna look at the amc script if you need more than a simple -rename call.
Juschurei
Posts: 3
Joined: 26 Apr 2015, 16:01

Re: Script on Raspberry Pi

Post by Juschurei »

rednoah wrote:FileBot won't work well on 1) rare 2) badly named 3) in a language other than English 4) with .nfo files that do not contain an ID that would help with identification 5) including .nfo files that seem to containing non-existent invalid IDs. Also you 6) process movie and tv episodes in the same batch which is explicitly unsupported.

These files can't be processed. The filenames simply don't make enough sense. See FAQ #2.

Though the error messages seem somewhat misleading as well here. Error message are reduced in newer revisions.

You probably wanna look at the amc script if you need more than a simple -rename call.
Hallo rednoah,

Thank you for your quick reply to my question. I't seams that I have not properly explained what my question is.
I know that the files are not being recognized, but that is normal, because they are german films. My problem is, that FileBot either doesn't create a folder with the names of my files and it suddenly starts using The Movie Database. I specifically told the code to use The TV Database though.
It seems like it's only reading the first half of the code and leaving out everything after

Code: Select all

-format
I hope you can help me, because it obviously does work, just not the way i'd like it to.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Script on Raspberry Pi

Post by rednoah »

On closer look... Did you use Microsoft Word to write that bash script!?!?

– is not -
“...” is not "..."
etc

bash is not forgiving about that.

Also it's --db and --format for options that take arguments, with two dashes. See filebot -help for details.
:idea: Please read the FAQ and How to Request Help.
Juschurei
Posts: 3
Joined: 26 Apr 2015, 16:01

Re: Script on Raspberry Pi

Post by Juschurei »

rednoah wrote:On closer look... Did you use Microsoft Word to write that bash script!?!?

– is not -
“...” is not "..."
etc

bash is not forgiving about that.

Also it's --db and --format for options that take arguments, with two dashes. See filebot -help for details.
Thank you very much. I hadn't noticed the odd quotation marks and the too short dashes. I've now corrected my code and it works just the way I wanted it too.

Thanks for the Help,
Juschurei
Post Reply