Maybe a stupid question, but why not create an array with extensions, then Join() the array to a string and use InStr (looked that one up
) to define weather the extension is allowed? Seems easier maintainable to me
InArray() would be nicer, but it seems like it doesn't exist in VB.
nul7 Wrote:Ok... maybe it is that easy. Question: where do the nfo/fanart/poster go? In the VIDEO_TS folder or in the main movie folder? If they go in the VIDEO_TS folder that IS all it will take, it seems. If they go in the main movie folder then there's a little more work to do. lol
All the files go in the VIDEO_TS directory so it's all nice and easy! The only difference in naming of the files I believe is that they need to be called video_ts.nfo and tbn if using the <movie>.nfo style approach.
Bram77 Wrote:Maybe a stupid question, but why not create an array with extensions, then Join() the array to a string and use InStr (looked that one up ) to define weather the extension is allowed? Seems easier maintainable to me
InArray() would be nicer, but it seems like it doesn't exist in VB.
For VB it's .Contains().
If I did it that way I would have to loop through every file to see if the array contains the extension. This way, it's only picking up files with the proper extension in the first place. I guess, technically, there is iteration in FindAll, but I
think it's faster than a for/next.
clackerdacker Wrote:All the files go in the VIDEO_TS directory so it's all nice and easy! The only difference in naming of the files I believe is that they need to be called video_ts.nfo and tbn if using the <movie>.nfo style approach.
Ok... so it can use movie.nfo or <movie>.nfo? And if <movie>.nfo is selected, use video_ts.nfo. Is that correct?
EDIT: So, for example -
Code:
Public Shared Sub SaveMovieToNFO(ByVal movieToSave As Media.Movie, ByVal sPath As String, ByVal isFile As Boolean)
'//
' Serialize Media.Movie to an NFO
'\\
Try
Dim tmpName As String = CleanStackingMarkers(GetNameFromPath(sPath))
Dim nPath As String = String.Concat(Directory.GetParent(sPath).FullName, "\", tmpName)
Dim xmlSer As New XmlSerializer(GetType(Media.Movie))
Dim tPath As String = String.Empty
If uSettings.MovieNameNFO OrElse isFile Then
If Directory.GetParent(sPath).Name.ToLower = "video_ts" Then
tPath = String.Concat(Directory.GetParent(sPath).FullName, "video_ts.nfo")
Else
tPath = String.Concat(RemoveExtFromPath(nPath), ".nfo")
End If
If Not File.Exists(tPath) OrElse (Not CBool(File.GetAttributes(tPath) And FileAttributes.ReadOnly)) Then
Dim xmlSW As New StreamWriter(tPath)
xmlSer.Serialize(xmlSW, movieToSave)
xmlSW.Close()
xmlSW.Dispose()
End If
End If
If Not isFile AndAlso uSettings.MovieNFO Then
tPath = String.Concat(Directory.GetParent(nPath).FullName.ToString, "\movie.nfo")
If Not File.Exists(tPath) OrElse (Not CBool(File.GetAttributes(tPath) And FileAttributes.ReadOnly)) Then
Dim xmlSW As New StreamWriter(tPath)
xmlSer.Serialize(xmlSW, movieToSave)
xmlSW.Close()
xmlSW.Dispose()
End If
End If
Catch ex As Exception
eLog.WriteToErrorLog(ex.Message, ex.StackTrace, "Error")
End Try
End Sub
nul7 Wrote:Ok... so it can use movie.nfo or <movie>.nfo? And if <movie>.nfo is selected, use video_ts.nfo. Is that correct?
I'm at work at the moment, 09:30 Tuesday morning here, but it looks good to me. I'll give it a test later this afternoon when I get home if you'd like?
Hmm, I just tried adding "A View to a Kill" and got some weird results. The scrape shows only 1 result and choosing it gives me a really empty scrape (many fields are empty) but it seems like it's the right movie. Looking on imdb I see the movie (first result) is ID tt0090264, and putting in that ID gives me a proper scrape with all the info filled in. It seems like maybe it's choosing the video game entry instead of the movie one?
clackerdacker Wrote:I'm at work at the moment, 09:30 Tuesday morning here, but it looks good to me. I'll give it a test later this afternoon when I get home if you'd like?
That would be great. It's all up on SVN now... use r72 or later.
midgetspy Wrote:Hmm, I just tried adding "A View to a Kill" and got some weird results. The scrape shows only 1 result and choosing it gives me a really empty scrape (many fields are empty) but it seems like it's the right movie. Looking on imdb I see the movie (first result) is ID tt0090264, and putting in that ID gives me a proper scrape with all the info filled in. It seems like maybe it's choosing the video game entry instead of the movie one?
I get 18 partial matches, 1 popular match, and 1 exact match. I find that the popular match is the best result (that's what I use for the auto-pilot autos). It appears the "exact match" is something else, but the popular match is the correct one. How did you scrape for it? One of the auto-pilots or the single scrape?
EDIT: Just to make things more consistent, I'll change the search results box to default to the popular match as well.
EDIT2: I just tried with auto-pilot update auto, and it returned the proper result.
nul7 Wrote:That would be great. It's all up on SVN now... use r72 or later.
Nul7
this app is great! I've used them all and MiP is way to busy - your app is sweet.
I install r59 and get a blank screen... google does not show r72?
Can you update the first post to link to the SVN?
thx
Livin Wrote:Nul7
this app is great! I've used them all and MiP is way to busy - your app is sweet
Can you update the first post to link to the SVN?
thx
It already does. lol
nul7 Wrote:Source code is available via SVN:
Code:
svn checkout http://embermediamanager.googlecode.com/svn/trunk/ embermediamanager-read-only
EDIT: Do you have .NET 3.5 installed? Do you have the Extras pack installed? (not that it would cause the form to be blank... just some features not to work and some annoying popups stating so lol) Not sure why it would be blank.
EDIT2: Just to clarify, r59 is the latest build, but the SVN is up to r73 as of right this moment.
nul7 Wrote:Do you have .NET 3.5 installed? Do you have the Extras pack installed? (not that it would cause the form to be blank... just some features not to work and some annoying popups stating so lol) Not sure why it would be blank.
yes, all previous builds ran fine.
here's the screenshot (same issue with all movies)
Livin Wrote:yes, all previous builds ran fine.
here's the screenshot (same issue with all movies)
[snip image]
It looks to me like you just haven't selected which file types to use. The checkboxes show you HAVE posters, fanart, and nfo, but they are not loading because you have not told it to load the proper files. Go to Settings->Movies, and you'll find all the supported files to select from in the lower left hand corner.
EDIT: Looks weird on XP. lol
EDIT2: Also, if you don't want "Imax" showing in the movie list, you can add "((?i)imax)" without the quotes to the custom filter in Settings.
nul7 Wrote:It looks to me like you just haven't selected which file types to use. The checkboxes show you HAVE posters, fanart, and nfo, but they are not loading because you have not told it to load the proper files. Go to Settings->Movies, and you'll find all the supported files to select from in the lower left hand corner.
EDIT: Looks weird on XP. lol
EDIT2: Also, if you don't want "Imax" showing in the movie list, you can add "((?i)imax)" without the quotes to the custom filter in Settings.
got it, thx... you might want to have some defaults for the posters and flag settings