mrlucas84 / embermediamanager

Automatically exported from code.google.com/p/embermediamanager
0 stars 0 forks source link

URGENT.. bug in current svn version #148

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi
using the 273 svn version
Just tring to add some new movies to library found out that when checking a
VIDEO_TS folder will pass to LoadMovieFromNFO the vob file ;) ...
will stuck for a eternity ofc .. deserealization of a vob is not nice ;)
problem is this lines

Else
'return movie path so we can use it for looking for non-conforming nfos
Return sPath
End If

i think it should only return it if the extesion is nfo ... to solve the
issue MrDVD talk about in forum

Original issue reported on code.google.com by nfnovais@gmail.com on 9 Jun 2009 at 9:33

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago

Original comment by jason.schnitzler on 14 Jun 2009 at 9:01