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!
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
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.)
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
[1]Since I use the RRS-Feed as a data source I no longer needed the "--db TheTVDB" actually.
[2]The time of the recorded series and the RSS feed is not always quite the same!
[3]If i wants to rename the serie "Navy CIS L.A." then i get an error message!