Nope, it's not the FreeDB entry, that returns fine. I've located the problem and fixed it. If the freeDB track entries return across more than one line, ie:
TTITLE1=Fedde La Grand / Put Your Hands Up For Detroit (Slipmatt & Billy 'Danie
TTITLE1=l' Bunter Remix)
...the code in AddTitle doesn't cope with this. It's a simple change, entire procedure is pasted below:
VB Code:
Private Sub AddTitle( _
ByVal sLine As String _
)
Dim iPos As Long
Dim iNextPos As Long
Dim sTrack As String
Dim lTrack As Long
iPos = InStr(sLine, "TTITLE")
iNextPos = InStr(iPos + 6, sLine, "=")
If (iNextPos > iPos) Then
sTrack = Mid(sLine, iPos + 6, iNextPos - iPos - 6)
If IsNumeric(sTrack) Then
lTrack = CLng(sTrack) + 1
If (m_iTrackCount < lTrack) Then
m_iTrackCount = lTrack
ReDim Preserve m_sTitles(1 To m_iTrackCount) As String
ReDim Preserve m_sExtended(1 To m_iTrackCount) As String
End If
'Fixed by VorTechS - multi-line track info only resulted in last line being accounted for
'm_sTitles(lTrack) = Trim(Mid(sLine, iNextPos + 1))
m_sTitles(lTrack) = m_sTitles(lTrack) & Trim(Mid(sLine, iNextPos + 1))
End If
End If
End Sub
Essentially it's only this line that was wrong:
VB Code:
m_sTitles(lTrack) = Trim(Mid(sLine, iNextPos + 1))
And the same problem exists with the extended info:
VB Code:
Private Sub AddExtendedDetails( _
ByVal sLine As String _
)
Dim iPos As Long
Dim iNextPos As Long
Dim sTrack As String
Dim lTrack As Long
iPos = InStr(sLine, "EXTT")
iNextPos = InStr(iPos + 4, sLine, "=")
If (iNextPos > iPos) Then
sTrack = Mid(sLine, iPos + 4, iNextPos - iPos - 4)
If IsNumeric(sTrack) Then
lTrack = CLng(sTrack) + 1
If (m_iTrackCount < lTrack) Then
m_iTrackCount = lTrack
ReDim Preserve m_sTitles(1 To m_iTrackCount) As String
ReDim Preserve m_sExtended(1 To m_iTrackCount) As String
End If
'Fixed by VorTechS - multi-line track info only resulted in last line being accounted for
'm_sExtended(lTrack) = Trim(Mid(sLine, iNextPos + 1))
m_sExtended(lTrack) = m_sExtended(lTrack) & Trim(Mid(sLine, iNextPos + 1))
End If
End If
End Sub