Esempio 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);
        }
Esempio 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);
 }
Esempio 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);
 }
Esempio 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);
        }
Esempio n. 5
0
 public override bool Equals(PlayableBase other)
 {
     return(other == this);
 }
Esempio n. 6
0
 public override abstract bool Equals(PlayableBase other);