package com.viaccessorca.voplayerdemo.mediamgt;

public class LocalFileMediaItem extends MediaItem {

	public LocalFileMediaItem(String mediaId, String mediaUri, String displayName) {
		super(mediaId, mediaUri, displayName);
		this.mediaType = MediaType.LOCAL_MEDIA;
	}
	
	@Override
	public int compareTo(MediaItem another) {

		switch(another.mediaType) {

		case HTTP_STREAMING_MEDIA:
		case HTTP_STREAMING_MEDIA_EBD:
        case MEDIA_PLAYLIST:
			return -1;

		case LOCAL_MEDIA:
			return this.displayName.compareToIgnoreCase(another.displayName);

		case SUBTITLE_FILE:
		case UNKNOWN:
		default:
			return 1;
		}
	}
}
