subtitles aint been moved to new folder

All your suggestions, requests and ideas for future development
Post Reply
maortal
Posts: 31
Joined: 16 Dec 2012, 11:18

subtitles aint been moved to new folder

Post by maortal »

Parameter: subtitles = y
Parameter: artwork = y
Parameter: ut_dir = C:\Users\Maor\Videos\Moran\New.Girl.S02E01.HDTV.x264-LOL
Parameter: ut_file =
Parameter: ut_title = New.Girl.S02E01.HDTV.x264-LOL
Parameter: ut_label = TL
Parameter: ut_state = 5
Parameter: ut_kind = %K
Read archive [new.girl.201.hdtv-lol.rar] to [C:\Users\Maor\Videos]
Extracting files [C:\Users\Maor\Videos\new.girl.201.hdtv-lol.mp4]
Input: C:\Users\Maor\Videos\new.girl.201.hdtv-lol.mp4
new.girl.201.hdtv-lol.mp4 [series: new girl, movie: Girl$ (2010)]
Exclude Movie: Girl$ (2010)
Group: [tvs:new girl, mov:null, anime:null] => [new.girl.201.hdtv-lol.mp4]
Missing subtitles for 1 video files
Looking up subtitles by filehash via OpenSubtitles
Matched [new.girl.201.hdtv-lol.mp4] to [New Girl - 02x01] via filehash
Fetching [New Girl - 02x01.srt]
Export [New Girl - 02x01.srt] as: null / UTF-8
Writing [New Girl - 02x01.srt] to [new.girl.201.hdtv-lol.eng.srt]
Missing subtitles for 1 video files
Looking up subtitles by filehash via OpenSubtitles
Matched [new.girl.201.hdtv-lol.mp4] to [New.Girl.S02E02.HDTV.XviD-AFG] via filehash
Fetching [New.Girl.S02E02.HDTV.XviD-AFG.srt]
Export [New.Girl.S02E02.HDTV.XviD-AFG.srt] as: null / windows-1255
Writing [New.Girl.S02E02.HDTV.XviD-AFG.srt] to [new.girl.201.hdtv-lol.heb.srt]
Rename episodes using [TheTVDB]
Auto-detected query: [new girl, new girl 201 lol]
Fetching episode data for [New Girl]
No matching episode: new.girl.201.hdtv-lol.eng.srt
No matching episode: new.girl.201.hdtv-lol.heb.srt
[MOVE] Rename [C:\Users\Maor\Videos\new.girl.201.hdtv-lol.mp4] to [C:\Users\Maor\Videos\TV Sho
ws\New Girl\Season 2\new.girl.201.hdtv-lol.mp4]
Processed 1 files
Fetching artwork for C:\Users\Maor\Videos\TV Shows\New Girl\Season 2 from TheTVDB
Fetching C:\Users\Maor\Videos\TV Shows\New Girl\folder.jpg => {id=917785, BannerMirror=http://
thetvdb.com/banners/, BannerPath=posters/248682-9.jpg, BannerType=poster, BannerType2=680x1000
, Language=en, Rating=8.6000, RatingCount=10}
as you can see i download the file extract it in C:\Users\Maor\Videos\
and then the organizer moves the file to its directory C:\Users\Maor\Videos\TV Shows\New Girl\Season 2\
problem is that the subtitles are still left in that directory and aint been moved also to the new directory...

ps.. sorry for the gay example of new girl its for my girlfriend :P
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: subtitles aint been moved to new folder

Post by rednoah »

The standard script works:

Code: Select all

Parameter: ut_kind = multi
Parameter: ut_state = 11
Parameter: ut_state_allow = 11
Parameter: ut_dir = E:\testdata\New.Girl.S02E01.HDTV.x264-LOL
Parameter: subtitles = y
Parameter: artwork = n
Parameter: backdrops = n
Parameter: ut_title = Deluge Test Folder
Input: E:\testdata\New.Girl.S02E01.HDTV.x264-LOL\new.girl.201.hdtv-lol.mp4
new.girl.201.hdtv-lol.mp4 [series: New Girl, movie: Girl$ (2010)]
Exclude Movie: Girl$ (2010)
Group: [tvs:New Girl, mov:null, anime:null] => [new.girl.201.hdtv-lol.mp4]
Missing subtitles for 1 video files
Looking up subtitles by filehash via OpenSubtitles
Looking up subtitles by filehash via Sublight
15.01.2013 23:50:48 net.sourceforge.filebot.web.SublightSubtitleClient getSubtitleList
WARNUNG: Error computing video hash: Failed to read video duration
Searching for [New Girl] at [OpenSubtitles]
Matched [new.girl.201.hdtv-lol.mp4] to [New Girl - 02x01] via filename
Fetching [New Girl - 02x01.srt]
Export [New Girl - 02x01.srt] as: SubRip / UTF-8
Writing [New Girl - 02x01.srt] to [new.girl.201.hdtv-lol.eng.srt]
Rename episodes using [TheTVDB]
Auto-detected query: [New Girl, new girl 201 lol]
Fetching episode data for [New Girl]
[TEST] Rename [E:\testdata\New.Girl.S02E01.HDTV.x264-LOL\new.girl.201.hdtv-lol.mp4] to [E:\testdata\Deluge\output\TV Shows\New Girl\Season 2\New Girl - S02E01 - Re-Launch.mp4]
[TEST] Rename [E:\testdata\New.Girl.S02E01.HDTV.x264-LOL\new.girl.201.hdtv-lol.eng.srt] to [E:\testdata\Deluge\output\TV Shows\New Girl\Season 2\New Girl - S02E01 - Re-Launch.srt]
Processed 2 files
Done ヾ(@⌒ー⌒@)ノ
Since you added extra lines for english+hebrew subtitles I guess you forgot to add those newly downloaded subtitles to the target fileset:

@see my code:
files += getMissingSubtitles(file:files, output:"srt", encoding:"utf-8")
:idea: Please read the FAQ and How to Request Help.
maortal
Posts: 31
Joined: 16 Dec 2012, 11:18

Re: subtitles aint been moved to new folder

Post by maortal »

groups.each{ group, files ->
// fetch subtitles
if (subtitles) {
files += (getMissingSubtitles(file:files, lang:"en") ?: [])
files += (getMissingSubtitles(file:files, lang:"he", encoding:"WINDOWS-1255") ?: [])
}
thats what i did...

oh i see you changed it abit you dropped the ?:[]
maortal
Posts: 31
Joined: 16 Dec 2012, 11:18

Re: subtitles aint been moved to new folder

Post by maortal »

well i changed it its still no good
maortal
Posts: 31
Joined: 16 Dec 2012, 11:18

Re: subtitles aint been moved to new folder

Post by maortal »

okey i changd few stuff figured out the problem is only when i try to download both subtitles...
any idea why it breaks everything?

Code: Select all

// process each batch
groups.each{ group, files ->
	// fetch subtitles
	if (subtitles) {
		files += getSubtitles(file:files, output:"srt", encoding:"utf-8")
		files += getSubtitles(file:files, lang:"he", output:"srt", encoding:"windows-1255")
	}
	
if its only one of them everything is okey if its both then files aint been moved...

also there is a huge messup with the subtitle script
there aren't many subtitles in hebrew for tv-series in opensubtitles or they are not getting updated so often as the english ones
so when the script doesnt find ex. S02E03
BUT S01E03 does exists in hebrew then the script will download it... even tho its obviously useless...
maybe its opensubtitles search algorithem... not sure but it happends to me alot...
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: subtitles aint been moved to new folder

Post by rednoah »

You can just add some println files statements and see whats going on. Rename is called with rename(file:files, ...) so all files that are in the files list will be handled.

As for the subtitles not sure, maybe it's only that one letter that makes a difference but the filename is still 95% the same it might slip through. Send me the logs for that so I can have a look.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: subtitles aint been moved to new folder

Post by rednoah »

Fixed with r1405 and uploaded new HEAD jar.
:idea: Please read the FAQ and How to Request Help.
maortal
Posts: 31
Joined: 16 Dec 2012, 11:18

Re: subtitles aint been moved to new folder

Post by maortal »

ok i added few printlns to the code

Code: Select all

groups.each{ group, files ->
	// fetch subtitles
	if (subtitles) {
		files += getSubtitles(file:files, output:"srt", encoding:"utf-8")
		//files += getSubtitles(file:files, lang:"he", output:"srt", encoding:"windows-1255")
	}
	println "";
	println "--------------LOG-----------";
	println "";
	files.each() { println "PRINTING FILE: ${it}" }; println "";
	// EPISODE MODE
	if ((group.tvs || group.anime) && !group.mov) {
		// choose series / anime config
		def config = group.tvs ? [name:group.tvs,   format:format.tvs,   db:'TheTVDB', seasonFolder:true ]
		                       : [name:group.anime, format:format.anime, db:'AniDB',   seasonFolder:false]
		def dest = rename(file: files, format: config.format, db: config.db)
		if (dest && artwork) {
this is the output when i download just 1 srt file like its written above
Group: [tvs:New Girl, mov:null, anime:null] => [new.girl.209.hdtv-lol.mp4]
Looking up subtitles by filehash via OpenSubtitles
Matched [new.girl.209.hdtv-lol.mp4] to [New Girl - 02x09 - Eggs.LOL.English.C.] via filehash
Fetching [New Girl - 02x09 - Eggs.LOL.English.C..srt]
Export [New Girl - 02x09 - Eggs.LOL.English.C..srt] as: SubRip / UTF-8
Writing [New Girl - 02x09 - Eggs.LOL.English.C..srt] to [new.girl.209.hdtv-lol.eng.srt]

--------------LOG-----------

PRINTING FILE: C:\Users\Maor\Videos\Moran\New.Girl.S02E09.HDTV.x264-LOL\new.girl.209.hdtv-lol\new.girl.209.hdtv-lol.mp4
PRINTING FILE: C:\Users\Maor\Videos\Moran\New.Girl.S02E09.HDTV.x264-LOL\new.girl.209.hdtv-lol\new.girl.209.hdtv-lol.eng.srt

Rename episodes using [TheTVDB]
Auto-detected query: [New Girl, new girl 209 lol]
Fetching episode data for [New Girl]
[MOVE] Rename [C:\Users\Maor\Videos\Moran\New.Girl.S02E09.HDTV.x264-LOL\new.girl.209.hdtv-lol\new.girl.209.hdtv-lol.mp4] to [C:\Users\Maor\Videos\TV Shows\New Girl\Season 2\new.girl.209.hdtv-lol.mp4]
[MOVE] Rename [C:\Users\Maor\Videos\Moran\New.Girl.S02E09.HDTV.x264-LOL\new.girl.209.hdtv-lol\new.girl.209.hdtv-lol.eng.srt] to [C:\Users\Maor\Videos\TV Shows\New Girl\Season 2\new.girl.209.hdtv-lol.eng.srt]
Processed 2 files


now when i uncomment that row the output is like that:
Group: [tvs:New Girl, mov:null, anime:null] => [new.girl.209.hdtv-lol.mp4]
Looking up subtitles by filehash via OpenSubtitles
Matched [new.girl.209.hdtv-lol.mp4] to [New Girl - 02x09 - Eggs.LOL.English.C.] via filehash
Fetching [New Girl - 02x09 - Eggs.LOL.English.C..srt]
Export [New Girl - 02x09 - Eggs.LOL.English.C..srt] as: SubRip / UTF-8
Writing [New Girl - 02x09 - Eggs.LOL.English.C..srt] to [new.girl.209.hdtv-lol.eng.srt]
Looking up subtitles by filehash via OpenSubtitles
Matched [new.girl.209.hdtv-lol.mp4] to [New.Girl.S01E01.720p.HDTV.X264-DIMENSION] via filehash

Fetching [New.Girl.S01E01.720p.HDTV.X264-DIMENSION.srt]
Export [New.Girl.S01E01.720p.HDTV.X264-DIMENSION.srt] as: SubRip / windows-1255
Writing [New.Girl.S01E01.720p.HDTV.X264-DIMENSION.srt] to [new.girl.209.hdtv-lol.heb.srt]

--------------LOG-----------

PRINTING FILE: C:\Users\Maor\Videos\Moran\New.Girl.S02E09.HDTV.x264-LOL\new.girl.209.hdtv-lol\new.girl.209.hdtv-lol.mp4
PRINTING FILE: C:\Users\Maor\Videos\Moran\New.Girl.S02E09.HDTV.x264-LOL\new.girl.209.hdtv-lol\new.girl.209.hdtv-lol.eng.srt
PRINTING FILE: C:\Users\Maor\Videos\Moran\New.Girl.S02E09.HDTV.x264-LOL\new.girl.209.hdtv-lol\new.girl.209.hdtv-lol.heb.srt

Rename episodes using [TheTVDB]
Auto-detected query: [New Girl, new girl 209 lol]
Fetching episode data for [New Girl]
No matching episode: new.girl.209.hdtv-lol.eng.srt
No matching episode: new.girl.209.hdtv-lol.heb.srt
[MOVE] Rename [C:\Users\Maor\Videos\Moran\New.Girl.S02E09.HDTV.x264-LOL\new.girl.209.hdtv-lol\new.girl.209.hdtv-lol.mp4] to [C:\Users\Maor\Videos\TV Shows\New Girl\Season 2\new.girl.209.hdtv-lol.mp4]
Processed 1 files
as you can see files seems perfect and the srt files are also good
so it could only be bug in rename
(ignoring the fact ofcourse that the subtitle that was download was for season 1 episode 1 and not season 2 episode 9 (which doesnt exist) in the hebrew version)

thanks for your help
Last edited by maortal on 16 Jan 2013, 20:40, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: subtitles aint been moved to new folder

Post by rednoah »

SEE naming is kinda bad on many cases. Not sure what exactly is going bad here but with clear SxE patterns it'll be able to use different logic. Also the reason why it's still downloading the wrong subtitles. If it was S00E00 that wouldn't happen. But things have to work for movies and episodes at the same time.

Maybe you should grab subtitles after the rename(...)? That'll probably work better in this case.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: subtitles aint been moved to new folder

Post by rednoah »

So I played with it for a few hours now. Can't put more trust into the 101 patterns. If I'd treat it like S01E01 or 1x01 it'll totally mess up episode/movie detection and probably lots of other nasty side effects.

Though in your case we have a a trusted S01E01 pattern in the path so I'll have it take that into consideration as well. Uploaded r1409 and it should work for your case of "New.Girl.S02E09.HDTV.x264-LOL\new.girl.209.hdtv-lol.***.srt" but it won't work for cases like this "New.Girl\new.girl.209.hdtv-lol.***.srt".
:idea: Please read the FAQ and How to Request Help.
maortal
Posts: 31
Joined: 16 Dec 2012, 11:18

Re: subtitles aint been moved to new folder

Post by maortal »

thanks for the quick response as always
but you got any idea why the renaming and moving aint working?
files are exactly the same when i download 1 srt file or 2
and for some reason it fails to locate the files...
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: subtitles aint been moved to new folder

Post by rednoah »

Simple answer: It's way more complicated than you think. :P

Complicated answer: FileBot doesn't process 1 file at a time. But directly matches up a set of files and a set of episodes trying to optimize the resulting combinatory set. That way knowledge of the Episode list flows into the matching => e.g. New Girl 209 is considered to be both New E209 and S02E09 until matching against the episode list reveals it can only be S02E09 since there is not Episode 209. Also it become even more important when u only have episode titles, possibly slightly different from what's in the db, and no SxE.

The whole idea assumes each file matches exactly one episode. So on the core level FileBot can't deal with multiple equal SxE episodes at the same time. But I build lots of preprocessing around that, like grouping match sets by possible series names and further splitting those groups into groups where each SxE is unique (for that we need a good SxE pattern in the filename). And then running the algorithms described above multiple times on different file groups.

Anyway, added a special case for 101 patterns in that preprocessing logic, but not in the general SxE parsing logic that is reused through the code. Should work with r1410 but it'll only take these specific 3-digit SxE patterns into account.
:idea: Please read the FAQ and How to Request Help.
maortal
Posts: 31
Joined: 16 Dec 2012, 11:18

Re: subtitles aint been moved to new folder

Post by maortal »

yeah i did another test now with a file thats not from the type of SEE

ex. Boardwalk.Empire.S03E09.720p.HDTV.x264-EVOLVE

and it all works well even when downloading 2 srt files...
lucky this shit happends only with my gf's shitty TV series and mine works perfect :)
Post Reply