2013-03-28, 02:49
(2013-03-27, 02:33)FreddyKrueger Wrote: Hi guys
I'm having a problem with multipart movies and the associated poster/fanart.
having the files "whatever-cd1.avi" and "whatever-cd2.avi", should have "whatever-poster" and whatever-fanart"... but instead i get "whatever--poster" and "whatever--fanart" (two dashes instead of one).
Is it just me or is this a known bug??
My Ember version is 1.3.0.10.1
Thanks
This was bugging me alot... so i grab the source code, and fixed it.
What i did was :
In file clsAPIStringUtils.vb :
Code:
Public Shared Function CleanStackingMarkers(ByVal sPath As String, Optional ByVal Asterisk As Boolean = False) As String
If AdvancedSettings.GetBooleanSetting("DisableMultiPartMedia", False) Then Return sPath
If String.IsNullOrEmpty(sPath) Then Return String.Empty
Dim sReturn As String = Regex.Replace(sPath, AdvancedSettings.GetSetting("DeleteStackMarkers", "\|?\-*\.*((cd|dvd|part|dis[ck])([0-9]))"), If(Asterisk, "*", " "), RegexOptions.IgnoreCase).Trim
If Not sReturn = sPath Then
Return Regex.Replace(sReturn, "\s\s(\s+)?", " ").Trim
Else
Return sPath
End If
End Function
Code:
Public Shared Function CleanStackingMarkers(ByVal sPath As String, Optional ByVal Asterisk As Boolean = False) As String
If AdvancedSettings.GetBooleanSetting("DisableMultiPartMedia", False) Then Return sPath
If String.IsNullOrEmpty(sPath) Then Return String.Empty
Dim sReturn As String = Regex.Replace(sPath, AdvancedSettings.GetSetting("DeleteStackMarkers", "\|?\-*\.*((cd|dvd|part|dis[ck])([0-9]))"), If(Asterisk, "*", " "), RegexOptions.IgnoreCase).Trim
If sReturn.Last = "-" Then sReturn = sReturn.Remove(sReturn.Length - 1, 1)
If Not sReturn = sPath Then
Return Regex.Replace(sReturn, "\s\s(\s+)?", " ").Trim
Else
Return sPath
End If
End Function
I only tested this for movies, because i use ember only for movies... i don't use it for tvshows, nor dvd's
I've uploaded the file to dropbox... and here is the link : EmberAPI.zip
Just replace the EmberAPI.dll in ember folder, but first... make a backup of the existing one.
Careful guys... i take no responsability if this brakes your ember or your database.... this fix works for me and to a few friends that tested it also.
Regards