public DifferentResult(ServerMedia serverMedia, int friendId)
        {
            FriendId = friendId;

            ServerMediaId = serverMedia.Id;
            MovieId = serverMedia.MovieId;
            EpisodeId = serverMedia.EpisodeId;
            VideoType = serverMedia.Movie != null ? VideoType.Movie : VideoType.TvShowEpisode;

            Title = serverMedia.Title();
            AspectRatio = serverMedia.AspectRatio;
            Resolution = serverMedia.Resolution;
        }
        /// <summary>
        /// Creates ServerMedia object (assigns content to server) for Movie
        /// </summary>
        /// <param name="db"></param>
        /// <param name="server"></param>
        /// <param name="contentModel"></param>
        /// <param name="movie"></param>
        private void AssignMovieToServer(MediaManagerDataContext db, Server server, ContentModel contentModel, Movie movie)
        {
            // load the libraries for the specific server
            var libraries = db.Libraries.Where(a => a.Server == server).ToList();

            foreach (var file in contentModel.MediaModels)
            {
                // check and see if the files exist, if not then create a new one
                if (!db.ServerMedias.Any(a => a.Server == server && a.MediaId == file.MediaId))
                {
                    var mvs = new ServerMedia()
                    {
                        Server = server,
                        Movie = movie,
                        VideoId = file.VideoId,
                        MediaId = file.MediaId,
                        Resolution = file.Resolution,
                        AspectRatio = file.AspectRatio,
                        FilePath = file.FilePath,
                        DateAdded = file.DateAdded,
                        Size = file.Size,
                        LastCheckin = DateTime.Now,
                        Hash = contentModel.ModelHash,
                        Library = libraries.FirstOrDefault(a => a.Name == contentModel.LibraryName)
                    };

                    db.ServerMedias.InsertOnSubmit(mvs);
                }
            }
        }
        /// <summary>
        /// Creates ServerMedia object (assigns content to server) for Show / Episode
        /// </summary>
        /// <param name="db"></param>
        /// <param name="server"></param>
        /// <param name="contentModel"></param>
        /// <param name="episode"></param>
        private void AssignEpisodeToServer(MediaManagerDataContext db, Server server, ContentModel contentModel, Episode episode)
        {
            var libraries = db.Libraries.Where(a => a.Server == server).ToList();

            foreach (var file in contentModel.MediaModels)
            {
                var sm = db.ServerMedias.FirstOrDefault(a => a.MediaId == file.MediaId);

                // media file does not exist on server, create new meida object
                if (sm == null)
                {
                    var evs = new ServerMedia()
                    {
                        Server = server,
                        Episode = episode,
                        VideoId = file.VideoId,
                        MediaId = file.MediaId,
                        Resolution = file.Resolution,
                        AspectRatio = file.AspectRatio,
                        FilePath = file.FilePath,
                        DateAdded = file.DateAdded,
                        Size = file.Size,
                        LastCheckin = DateTime.Now,
                        Hash = contentModel.ModelHash,
                        Library = libraries.FirstOrDefault(a => a.Name == contentModel.LibraryName)
                    };

                    db.ServerMedias.InsertOnSubmit(evs);
                }
                // update an existing
                else
                {
                    sm.VideoId = file.VideoId;
                    sm.MediaId = file.MediaId;
                    sm.Resolution = file.Resolution;
                    sm.AspectRatio = file.AspectRatio;
                    sm.FilePath = file.FilePath;
                    sm.DateAdded = file.DateAdded;
                    sm.Size = file.Size;
                    sm.LastCheckin = DateTime.Now;
                    sm.Hash = contentModel.ModelHash;
                    sm.Library = libraries.FirstOrDefault(a => a.Name == contentModel.LibraryName);
                }
            }
        }