Rename recordings from a satellite receiver!

Any questions? Need some help?
Post Reply
wolf133
Power User
Posts: 3
Joined: 11 Apr 2013, 19:40

Rename recordings from a satellite receiver!

Post by wolf133 »

Hy Rednoah!

Thank you for your great program! :mrgreen:

I use FileBot to rename my with a Topfield PVR-satelite receiver recorded TV shows. The recordings are stored on a NAS!

The receiver stores the recordings in an MPEG format with the extension "rec", also a "rec.inf" file and a "rec.nav" file is created.
(The "rec.inf" contains TV information and the "rec.nav" is required from the receiver to play.)

I've modified the "media.types" file so that the recordings will be renamed.

Code: Select all

<type name="video/mpeg">
	<extension>rec</extension>

<type name="subtitle/Topfield">
	<extension>nav</extension>
	<extension>inf</extension>
Currently I use FileBot with the GUI and it works very well, all three file formats are correctly renamed! :D

I am now trying to automate everything from the CLI, but without success, I hope you can help me!

Code: Select all

FileBot 3.6 (r1600) / Java(TM) SE Runtime Environment 1.7.0_17

filebot -rename z:/topfield/datafiles/zzz/test --db TheTVDB --lang de --format "{n}\{episode.special ? 'Special' : 'Staffel '+s.pad(2)}\{n} - {episode.special ? 'Special'+special.pad(2):s+'x'+es*.pad(2).join('-')} - {t}{fn.match(/[.]\w{3}$/)}" -non-strict --action test >> log.txt

Code: Select all

Rename episodes using [TheTVDB]
Auto-detected query: [Covert Affairs, Covert Affairs Das Spiel mit den Gefühlen]
Fetching episode data for [Covert Affairs]
[TEST] Rename [Z:\Topfield\DataFiles\zzz\Test\Covert Affairs - Das Spiel mit den Gefühlen.rec] to [Covert Affairs\Staffel 01\Covert Affairs - 1x07 - Das Spiel mit den Gefühlen.rec]
[TEST] Rename [Z:\Topfield\DataFiles\zzz\Test\Covert Affairs - Das Spiel mit den Gefühlen.rec.inf] to [Covert Affairs\Staffel 01\Covert Affairs - 1x07 - Das Spiel mit den Gefühlen.rec.inf]
[TEST] Rename [Z:\Topfield\DataFiles\zzz\Test\Covert Affairs - Das Spiel mit den Gefühlen.rec.nav] to [Covert Affairs\Staffel 03\Covert Affairs - 3x08 - Glass Spider.rec.nav]
Processed 3 files
Done ?(?????)?
With the CLI, only two files are renamed correctly, the third but not!?
I've also tested with the renall and watcher script, but there is no different, are there some other settings?


Another question :?:
I do not find anything on how to use FileBot with FTP!
Is it able to rename recordings directly via FTP? (This would be very interesting for other Topfield user without a NAS)

Thank you for your efforts!
Wolfgang
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename recordings from a satellite receiver!

Post by rednoah »

If you're renaming files without SxE you can't have the same episode twice in the same rename-set. You could do a rename call for each file though and that should work.

Just mount your ftp it into your local filesystem. On Linux that's easy. On Windows you might have to google how to set set up an mapped ftp network drive.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename recordings from a satellite receiver!

Post by rednoah »

Fixed with r1605:
http://sourceforge.net/projects/filebot ... ebot/HEAD/

Added support for "derived files" support in the cmdline episode-rename logic. Should be using the same special handling as the GUI does now. Also added ".rec" to video/mpeg, the other files will be picked up by the derived-files logic as long as the filenames match.

Code: Select all

Rename episodes using [TheTVDB]
Auto-detected query: [Covert Affairs]
Fetching episode data for [Covert Affairs]
[TEST] Rename [D:\testdata\AMC-TEST\Covert Affairs - Das Spiel mit den Gefühlen.rec] to [Covert Affairs - 1x07 - Das Spiel mit den Gefühlen.rec]
[TEST] Rename [D:\testdata\AMC-TEST\Covert Affairs - Das Spiel mit den Gefühlen.rec.inf] to [Covert Affairs - 1x07 - Das Spiel mit den Gefühlen.inf]
[TEST] Rename [D:\testdata\AMC-TEST\Covert Affairs - Das Spiel mit den Gefühlen.rec.nav] to [Covert Affairs - 1x07 - Das Spiel mit den Gefühlen.nav]
Processed 3 files
Done ヾ(@⌒ー⌒@)ノ
:idea: Please read the FAQ and How to Request Help.
wolf133
Power User
Posts: 3
Joined: 11 Apr 2013, 19:40

Re: Rename recordings from a satellite receiver!

Post by wolf133 »

Hi Rednoah

Thanks for your quick response! :D

It works great with the new update!

For the FTP Server I've installed now "NETDRIVE", this mount the server also on a Windows PC!

Many thanks and greetings from Austria :mrgreen:
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename recordings from a satellite receiver!

Post by rednoah »

Bast scho. ;)
:idea: Please read the FAQ and How to Request Help.
wolf133
Power User
Posts: 3
Joined: 11 Apr 2013, 19:40

Re: Rename recordings from a satellite receiver!

Post by wolf133 »

Servus rednoah!

I work extensively with your program lately and find it really great!

My last problem was, because my satellite receiver stores the most of the TV-Shows only with the series name and date+time of recording, therefore I could not rename these files correctly!

(eg, series name - 2013-01-01 00-00)

Now I had the idea that information such series name, episode title, season number, episode number and the broadcast date + time to save from an RSS feed of http://www.wunschliste.de/main to a text file and so I can search in the file with Filebot and can be compared with the recorded titles! (The RSS feed I let still convert with Yahoo Pipes so that it fits to the recording titles and also the additional content included.)

It works! :mrgreen:

A row of the txt-file with the RSS-Feed entries!

Code: Select all

Continuum - 2013-08-14 02-10;Continuum;Staffel 01;Continuum - 1x06 - Lösegeld;VOX 
Name of the recording on my receiver!

Code: Select all

Continuum - 2013-08-14 02-07
I start Filebot with the watcher script on my Synology Nas with the following shell script

Code: Select all

#!/bin/sh
filebot -script "/volume1/NAS-DATEN/DATEN/Filebot/Script1/watcher.groovy" -rename "/volume1/NAS-DATEN/Topfield/DataFiles/##NEU##" --format "{def feedlist='/volume1/NAS-DATEN/Sync-Synology-Dropbox/serien-rss-feed.txt'; def a;new File(feedlist).splitEachLine(';'){if(fn.replaceAll(/(.rec)$/).replaceAll(/[(]DEC[)]/).replaceAll(/-[123]$/).replaceAll(/ - .+ - /,' - ').replaceAll(/[(].+[)] /).replaceAll(/[123456789]$/,'0').replaceAll(/00-00$/,'23-55').replaceAll(/01-00$/,'00-55').replaceAll(/02-00$/,'01-55').replaceAll(/03-00$/,'02-55').replaceAll(/04-00$/,'03-55').replaceAll(/05-00$/,'04-55').replaceAll(/06-00$/,'05-55').replaceAll(/07-00$/,'06-55').replaceAll(/08-00$/,'07-55').replaceAll(/09-00$/,'08,55').replaceAll(/10-00$/,'09-55').replaceAll(/11-00$/,'10-55').replaceAll(/12-00$/,'11-55').replaceAll(/13-00$/,'12-55').replaceAll(/14-00$/,'13-55').replaceAll(/15-00$/,'14-55').replaceAll(/16-00$/,'15-55').replaceAll(/17-00$/,'16-55').replaceAll(/18-00$/,'17-55').replaceAll(/19-00$/,'18-55').replaceAll(/20-00$/,'19-55').replaceAll(/21-00$/,'20-55').replaceAll(/22-00$/,'21-55').replaceAll(/23-00$/,'22-55')==it[0])a='#Doppelt#/'+it[3]};a ;new File(feedlist).splitEachLine(';'){if(fn.replaceAll(/(.rec)$/).replaceAll(/[(]DEC[)]/).replaceAll(/-[123]$/).replaceAll(/ - .+ - /,' - ').replaceAll(/[(].+[)] /).replaceAll(/[012346789]$/,'5').replaceAll(/00-55$/,'01-00').replaceAll(/01-55$/,'02-00').replaceAll(/02-55$/,'03-00').replaceAll(/03-55$/,'04-00').replaceAll(/04-55$/,'05-00').replaceAll(/05-55$/,'06-00').replaceAll(/06-55$/,'07-00').replaceAll(/07-55$/,'08-00').replaceAll(/08-55$/,'09-00').replaceAll(/09-55$/,'10,00').replaceAll(/10-55$/,'11-00').replaceAll(/11-55$/,'12-00').replaceAll(/12-55$/,'13-00').replaceAll(/13-55$/,'14-00').replaceAll(/14-55$/,'15-00').replaceAll(/15-55$/,'16-00').replaceAll(/16-55$/,'17-00').replaceAll(/17-55$/,'18-00').replaceAll(/18-55$/,'19-00').replaceAll(/19-55$/,'20-00').replaceAll(/20-55$/,'21-00').replaceAll(/21-55$/,'22-00').replaceAll(/22-55$/,'23-00').replaceAll(/23-55$/,'00-00')==it[0])a='#Doppelt#/'+it[3]};a ;new File(feedlist).splitEachLine(';'){if(fn.replaceAll(/(.rec)$/).replaceAll(/[(]DEC[)]/).replaceAll(/-[123]$/).replaceAll(/ - .+ - /,' - ').replaceAll(/[(].+[)] /).replaceAll(/[123]$/,'0').replaceAll(/[46789]$/,'5').replaceAll(/00$/,'01').replaceAll(/05$/,'01').replaceAll(/10$/,'01').replaceAll(/15$/,'00').replaceAll(/20$/,'05').replaceAll(/25$/,'10').replaceAll(/30$/,'15').replaceAll(/35$/,'20').replaceAll(/40$/,'25').replaceAll(/45$/,'30').replaceAll(/50$/,'35').replaceAll(/55$/,'40')==it[0])a='#Doppelt#/'+it[3]};a ;new File(feedlist).splitEachLine(';'){if(fn.replaceAll(/(.rec)$/).replaceAll(/[(]DEC[)]/).replaceAll(/-[123]$/).replaceAll(/ - .+ - /,' - ').replaceAll(/[(].+[)] /).replaceAll(/[123]$/,'0').replaceAll(/[46789]$/,'5').replaceAll(/55$/,'59').replaceAll(/50$/,'59').replaceAll(/45$/,'59').replaceAll(/40$/,'55').replaceAll(/35$/,'50').replaceAll(/30$/,'45').replaceAll(/25$/,'40').replaceAll(/20$/,'35').replaceAll(/15$/,'30').replaceAll(/10$/,'25').replaceAll(/05$/,'20').replaceAll(/00$/,'15')==it[0])a='#Doppelt#/'+it[3]};a ;new File(feedlist).splitEachLine(';'){if(fn.replaceAll(/(.rec)$/).replaceAll(/[(]DEC[)]/).replaceAll(/-[123]$/).replaceAll(/ - .+ - /,' - ').replaceAll(/[(].+[)] /).replaceAll(/[123]$/,'0').replaceAll(/[46789]$/,'5').replaceAll(/00$/,'01').replaceAll(/05$/,'01').replaceAll(/10$/,'00').replaceAll(/15$/,'05').replaceAll(/20$/,'10').replaceAll(/25$/,'15').replaceAll(/30$/,'20').replaceAll(/35$/,'25').replaceAll(/40$/,'30').replaceAll(/45$/,'35').replaceAll(/50$/,'40').replaceAll(/55$/,'45')==it[0])a='#Doppelt#/'+it[3]};a ;new File(feedlist).splitEachLine(';'){if(fn.replaceAll(/(.rec)$/).replaceAll(/[(]DEC[)]/).replaceAll(/-[123]$/).replaceAll(/ - .+ - /,' - ').replaceAll(/[(].+[)] /).replaceAll(/[123]$/,'0').replaceAll(/[46789]$/,'5').replaceAll(/55$/,'59').replaceAll(/50$/,'59').replaceAll(/45$/,'55').replaceAll(/40$/,'50').replaceAll(/35$/,'45').replaceAll(/30$/,'40').replaceAll(/25$/,'35').replaceAll(/20$/,'30').replaceAll(/15$/,'25').replaceAll(/10$/,'20').replaceAll(/05$/,'15').replaceAll(/00$/,'10')==it[0])a='#Doppelt#/'+it[3]};a ;new File(feedlist).splitEachLine(';'){if(fn.replaceAll(/(.rec)$/).replaceAll(/[(]DEC[)]/).replaceAll(/-[123]$/).replaceAll(/ - .+ - /,' - ').replaceAll(/[(].+[)] /).replaceAll(/[123]$/,'0').replaceAll(/[46789]$/,'5').replaceAll(/00$/,'01').replaceAll(/05$/,'00').replaceAll(/10$/,'05').replaceAll(/15$/,'10').replaceAll(/20$/,'15').replaceAll(/25$/,'20').replaceAll(/30$/,'25').replaceAll(/35$/,'30').replaceAll(/40$/,'35').replaceAll(/45$/,'40').replaceAll(/50$/,'45').replaceAll(/55$/,'50')==it[0])a='#Doppelt#/'+it[3]};a ;new File(feedlist).splitEachLine(';'){if(fn.replaceAll(/(.rec)$/).replaceAll(/[(]DEC[)]/).replaceAll(/-[123]$/).replaceAll(/ - .+ - /,' - ').replaceAll(/[(].+[)] /).replaceAll(/[123]$/,'0').replaceAll(/[46789]$/,'5').replaceAll(/55$/,'59').replaceAll(/50$/,'55').replaceAll(/45$/,'50').replaceAll(/40$/,'45').replaceAll(/35$/,'40').replaceAll(/30$/,'35').replaceAll(/25$/,'30').replaceAll(/20$/,'25').replaceAll(/15$/,'20').replaceAll(/10$/,'15').replaceAll(/05$/,'10').replaceAll(/00$/,'05')==it[0])a='#Doppelt#/'+it[3]};a ;new File (feedlist).splitEachLine(';'){if(fn.replaceAll(/(.rec)$/).replaceAll(/[(]DEC[)]/).replaceAll(/-[123]$/).replaceAll(/ - .+ - /,' - ').replaceAll(/[(].+[)] /).replaceAll(/[123]$/,'0').replaceAll(/[46789]$/,'5')==it[0])a='#Doppelt#/'+it[3]};a?: '#NoName#/'+(fn.replaceAll(/(.rec)$/).replaceAll(/[(]DEC[)]/))}{fn.match(/.rec$/)}" --output "/volume1/NAS-DATEN/Topfield/DataFiles" --action move --conflict skip -non-strict --db TheTVDB --lang de --log info --log-file "/volume1/NAS-DATEN/DATEN/Filebot/Log/watcher-log1.txt" --log-lock no & filebot -script "/volume1/NAS-DATEN/DATEN/Filebot/Script2/watcher.groovy" -rename "/volume1/NAS-DATEN/Topfield/DataFiles/#Doppelt#" --format "{def feedlist='/volume1/NAS-DATEN/Sync-Synology-Dropbox/serien-rss-feed.txt'; def a;new File (feedlist).splitEachLine(';'){if(fn.replaceAll(/(.rec)$/)==it[3])a=it[1]+'/'+it[2]+'/'+it[3]};a?: '#NoName#/'+(fn.replaceAll(/(.rec)$/))}{fn.match(/.rec$/)}" --output "/volume1/NAS-DATEN/Topfield/DataFiles" --action move --conflict skip -non-strict --db TheTVDB --lang de --log info --log-file "/volume1/NAS-DATEN/DATEN/Filebot/Log/watcher-log2.txt" --log-lock no

Code: Select all

[MOVE] Rename [/Continuum - 2013-08-14 02-07.rec] to [/Continuum/Staffel 01/Continuum - 1x06 - Lösegeld.rec]
[MOVE] Rename [/Continuum - 2013-08-14 02-07.rec.inf] to [/Continuum/Staffel 01/Continuum - 1x06 - Lösegeld.rec.inf]
[MOVE] Rename [/Continuum - 2013-08-14 02-07.rec.nav] to [/Continuum/Staffel 01/Continuum - 1x06 - Lösegeld.rec.nav]

Actually, it works almost perfectly, I have just three questions. :roll:

[1]Since I use the RRS-Feed as a data source I no longer needed the "--db TheTVDB" actually.
  • Can I turn off the lookup?
[2]The time of the recorded series and the RSS feed is not always quite the same!
  • Therefore I use in the script, to start FileBot, very many regex commands to compensate for these time differences (+-15min)!
    (.replaceAll(/00$/,'05').replaceAll(/00$/,'10').replaceAll(/00$/,'15')................)

    The problem is, if there is an offset for a full hour or a whole day!
    eg. Rss-Feed Time 2013-08-18 23:55 -> recording Time 2013-08-19 00-01
    • Maybe do you know another way how I could solve better? (If not, it's not so bad, because it works in 98 percent of cases!)
[3]If i wants to rename the serie "Navy CIS L.A." then i get an error message!

Code: Select all

Filename: Navy CIS L.A. - 2013-08-05 20-15.rec

Rename episodes using [TheTVDB]
Auto-detected query: [Navy L A]
Failure (°_°)
Launch4j: Failed to run the given command.
  • How can I avoid this error?

Thanks for all!
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename recordings from a satellite receiver!

Post by rednoah »

I think the cleanest solution would be a pre-processor script that renames your files with the data from your text file. And then only call filebot on the already reasonable named files. With that you could also fix series names that somehow cause issues with lookup.
:idea: Please read the FAQ and How to Request Help.
Post Reply