Closed GoogleCodeExporter closed 9 years ago
further investigation found that passing is ok.. because loadMovieFromNfo should
check extention.. problem is.. my vob file is .VOB and will check against .vob
..
case problem
this solve the problem
Index: Ember Media Manager/clsGlobal.vb
===================================================================
--- Ember Media Manager/clsGlobal.vb (revision 274)
+++ Ember Media Manager/clsGlobal.vb (working copy)
@@ -708,7 +708,7 @@
Dim xmlSer As XmlSerializer = Nothing
Dim xmlMov As New Media.Movie
Try
- If File.Exists(sPath) AndAlso Not
Master.eSettings.ValidExts.Contains(Path.GetExtension(sPath)) Then
+ If File.Exists(sPath) AndAlso Not
Master.eSettings.ValidExts.Contains(Path.GetExtension(sPath).ToLower) Then
Using xmlSR As StreamReader = New StreamReader(sPath)
xmlSer = New XmlSerializer(GetType(Media.Movie))
xmlMov = CType(xmlSer.Deserialize(xmlSR), Media.Movie)
Original comment by nfnovais@gmail.com
on 9 Jun 2009 at 9:40
hummm.. if a .xyz file have 2gb will try to parse it because is not in list of
movie
extention...
maybe some size verication could ensure no large file will try to desiarilze
freezinf EMM
ie:(20k file, nfo should be bigger than 50k i think)
If File.Exists(sPath) AndAlso Not
Master.eSettings.ValidExts.Contains(Path.GetExtension(sPath).ToLower) AndAlso
Not
My.Computer.FileSystem.GetFileInfo(sPath).Length > 50000 Then
Original comment by nfnovais@gmail.com
on 9 Jun 2009 at 9:59
In what instance would this ".xyz" file be parsed though? If it doesn't have an
extension that's not in the list of valid extensions, it won't even be added to
the
database.
Original comment by jason.schnitzler
on 9 Jun 2009 at 10:25
Ok another issue but about nfos in same modules
if you have a file folder and no nfo on it... during bwFolderData in
If Not String.IsNullOrEmpty(sFile.Filename) Then
If Master.eSettings.UseNameFromNfo Then
tmpMovie = Master.LoadMovieFromNFO(Master.GetNfoPath(sFile.Filename, sFile.isFile))
GetNfoPath will return
If isFile Then
Return String.Empty <------
Else
LoadMovieFromNFo will try execute .. because spath dont exist (If
File.Exists(sPath))
Else
xmlMov.IMDBID = GetIMDBFromNonConf(sPath)
End If
that will cause a catch ... and in there
Catch
xmlMov = New Media.Movie
If Not IsNothing(xmlSer) Then
xmlSer = Nothing
End If
xmlMov.IMDBID = GetIMDBFromNonConf(sPath) <----
Will cause another one .. leaving the bwFolderData .. scaning nothing
...I will look for a solution ...
Original comment by nfnovais@gmail.com
on 9 Jun 2009 at 10:26
because you do a NOT contain ... so any not in list will match and used for
if File.Exists(sPath) AndAlso Not
Master.eSettings.ValidExts.Contains(Path.GetExtension(sPath).ToLower)
Original comment by nfnovais@gmail.com
on 9 Jun 2009 at 10:29
ok... in LoadMoviefromnfo both
xmlMov.IMDBID = GetIMDBFromNonConf(sPath)
should be
If Not sPath = vbNullString Then xmlMov.IMDBID = GetIMDBFromNonConf(sPath)
Original comment by nfnovais@gmail.com
on 9 Jun 2009 at 10:37
It's a "not contains" but there's no way for a file that's not ".nfo" or not in
the
valid extensions list to be passed to the function. GetNfoPath either returns a
".nfo", the movie path, or an empty string. And there's no way for the movie
path to
have a non-valid extension because if it's not in the validexts list it
wouldn't be
added to the db in the first place.
I agree about the empty string check though... I'll add that real quick.
Original comment by jason.schnitzler
on 9 Jun 2009 at 10:43
Maybe you right about the .xyz :)
is the empty will break bwFolderData
and the tolower also ;)
TIA
Original comment by nfnovais@gmail.com
on 9 Jun 2009 at 10:47
Original comment by jason.schnitzler
on 14 Jun 2009 at 9:01
Original issue reported on code.google.com by
nfnovais@gmail.com
on 9 Jun 2009 at 9:33