Ejemplo n.º 1
0
        public override bool Equals(PlayableBase other)
        {
            if (other == null)
            {
                return(false);
            }
            if (!other.TrackExists || !TrackExists)
            {
                return(false);
            }
            if (GetType() != other.GetType())
            {
                return(false);
            }

            var otherAsLocalTrack = (LocalTrack)other;

            if (UniqueId == otherAsLocalTrack.UniqueId)
            {
                return(true);
            }

            // Mike: commented out temporarily; this is drastic measure, why is it needed?
            //if (TrackInformation.Length == otherAsLocalTrack.TrackInformation.Length)
            //{
            //    if (string.IsNullOrEmpty(_fileHash))
            //        _fileHash = GeneralHelper.FileToMD5Hash(TrackInformation.FullName);
            //    if (string.IsNullOrEmpty(otherAsLocalTrack._fileHash))
            //        otherAsLocalTrack._fileHash = GeneralHelper.FileToMD5Hash(TrackInformation.FullName);
            //    if (otherAsLocalTrack._fileHash == _fileHash) return true;
            //}

            return(false);
        }
Ejemplo n.º 2
0
 public override bool Equals(PlayableBase other)
 {
     if (other == null)
     {
         return(false);
     }
     if (GetType() != other.GetType())
     {
         return(false);
     }
     return(SoundCloudID == ((SoundCloudTrack)other).SoundCloudID);
 }
Ejemplo n.º 3
0
 public override bool Equals(PlayableBase other)
 {
     if (other == null)
     {
         return(false);
     }
     if (GetType() != other.GetType())
     {
         return(false);
     }
     return(Link == ((YouTubeTrack)other).Link);
 }
Ejemplo n.º 4
0
        public override bool Equals(PlayableBase other)
        {
            if (other == null)
            {
                return(false);
            }
            if (!other.TrackExists || !TrackExists)
            {
                return(false);
            }
            if (GetType() != other.GetType())
            {
                return(false);
            }

            var otherAsLocalTrack = (LocalTrack)other;

            if (UniqueId == otherAsLocalTrack.UniqueId)
            {
                return(true);
            }
            return(false);
        }