Cleaning the start of a movie name - for Enigma2 recordings
#1
I've seen suggestions on how to remove suffixes from filenames using "cleanstrings" in advancedsettings, but I believe that only works at the end of a filename, I have text at the start of a filename that I need to ignore.

My movies are being recorded by a satellite PVR running Enigma2 (actually an Amiko Alien 2) - there is a couple of filename formats that you can choose, but not a suitable "clean" one. The short filename format produces recordings with filenames like this which are prefixed by a date :

20130316 - 127 Hours.ts
20130316 - Total Recall.ts

What is the simplest way around this unwanted prefix, is there something in advancedsettings I can use or hack a copy of one of the scrapers ?
Reply
#2
Probably the best you can do is add:
Code:
<RegExp input="$$1" output="\1" dest="1">
    <expression noclean="1">\d{8}%20-%20(.*)$</expression>
</RegExp>
directly below the <CreateSearchUrl ...> line in whatever movie scraper you want to use.
Reply
#3
That looks like just what I need, many thanks.

Next step ... finding the scraper config files, I'm using xbian on a Pi, the system directory seems to be empty, is that an xbian specific thing ?
Reply
#4
I'm not using xbian, but you may want to try the /usr/local/share/xbmc/addons/ directory or the ~/.xbmc/addons/ directory. Otherwise try

Code:
sudo find / -type d -name metadata.tvdb.com

The sudo isn't really required, but unless you run this command as user root, you will get a lot of "Permission denied" messages.
What this command does is lookup the metadata.tvdb.com directory.
Reply
#5
(2013-03-24, 22:21)scudlee Wrote: Probably the best you can do is add:
Code:
<RegExp input="$$1" output="\1" dest="1">
    <expression noclean="1">\d{8}%20-%20(.*)$</expression>
</RegExp>
directly below the <CreateSearchUrl ...> line in whatever movie scraper you want to use.

I have the same Problem, but the tmdb.xml, there ist that code

Quote:<CreateSearchUrl dest="3">
<RegExp input="$$1" output="&lt;url&gt;http://api.themoviedb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;amp;query=\1&amp;amp;year=$$4&amp;amp;language=$INFO[language]&lt;/url&gt;" dest="3">
<RegExp input="$$2" output="\1" dest="4">
<expression clear="yes">(.+)</expression>
</RegExp>
<expression noclean="1" />
</RegExp>
</CreateSearchUrl>

When i wrote this:

Quote:<CreateSearchUrl dest="3">
<RegExp input="$$1" output="\1" dest="1">
<expression noclean="1">\d{8}%20-%20(.*)$</expression>
</RegExp>
</CreateSearchUrl>

then the tmdb cannot search anything more, the server is not reachable.

Can you help me?
Reply
#6
"add" =/= "replace"
Reply
#7
Oh i understand.
But i ADD this, see here:

Quote: <CreateSearchUrl dest="3">
<RegExp input="$$1" output="\1" dest="1">
<expression noclean="1">\d{8}%20-%20(.*)$</expression>
</RegExp>
<RegExp input="$$1" output="&lt;url&gt;http://api.themoviedb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;amp;query=\1&amp;amp;year=$$4&amp;amp;language=$INFO[language]&lt;/url&gt;" dest="3">
<RegExp input="$$2" output="\1" dest="4">
<expression clear="yes">(.+)</expression>
</RegExp>
<expression noclean="1" />
</RegExp>
</CreateSearchUrl>

But no change, the same as before, the File ist not found by scrapper,
any idea?
Reply
#8
Are your file names exactly the same as those in the first post?

...I honestly can't remember if I actually tested this or not (it certainly "looks" right).

Edit: Just looked in my "Test movies" folder and there's a suspicious similarly-named folder, so I must have tested it (which means it should work).
Reply
#9
Yes, its absolutely the same filename of the first post.

So, i test it with tmdb, is that correct or should i test another scraper? But witch one?
Reply
#10
I've just (re-)tested with the tmdb scraper, and it definitely does work. I even copy-pasted the code you posted, just in case a small typo had slipped in, but it still worked.

I'd need to see a debug log (wiki) of you scanning in a movie to figure out why it's not working.
Reply
#11
So, i have reinstalled all and installed all new.

Now it works perfect!

You are the best! Big Big thanks...
Reply
#12
can anything can be done to change the filenames of tv episodes so tvdb recognises them and adds them to the tv show library?
Reply
#13
Depends a lot on the folder structure and file naming.

As long as your TV shows are separated into different folders per series and your file names contain either the season/episode number or the original air-date then you stand a chance, as you can add ways to clean the folder name to get to the show title (either via cleanstrings or with a hack like in this thread), and you can always add a tvshowmatching regexp to capture the episode number or air-date if your file names don't match any of the defaults (check the examples).

What you can't do, though, is use it on a folder containing episodes of different series all mixed together, or if the file names don't contain any episode numbers or air-dates.

I'd recommend reading Video library/Naming files/TV shows (wiki).
Reply
#14
Hello guys,

Quite have the same problem here. My SAT-Box (VU+ with Enigma2) saves the TV recordings as

20131126 1130 - Sky Cinema HD - The Lord of the Rings: The Fellowship of the Ring.ts

I need XBMC to ignore date, time and service name.

After reading this thread I have learned that I can change the scraper's xml file to do so. However, I do absolutely not know what I do have to change.

Is anybody of you so kind to help me? Blush

Thank you very much in advance!!
Reply
#15
I have the same situation with my PVR ....
Can anyone help with the RegExp?

From the left, everything before the second " - " should be ignored (of course with the " - ") ..... maybe this makes it easier
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Cleaning the start of a movie name - for Enigma2 recordings00