TraktPlugin.GUI.GUIListItems.GetListItemLabel C# (CSharp) Méthode

GetListItemLabel() private méthode

private GetListItemLabel ( TraktListItem listItem ) : string
listItem TraktPlugin.TraktAPI.DataStructures.TraktListItem
Résultat string
        private string GetListItemLabel(TraktListItem listItem)
        {
            string retValue = string.Empty;

            switch (listItem.Type)
            {
                case "movie":
                    retValue = listItem.Movie.Title;
                    break;

                case "show":
                    retValue = listItem.Show.Title;
                    break;

                case "season":
                    retValue = string.Format("{0} {1} {2}", listItem.Show.Title, GUI.Translation.Season, listItem.Season.Number);
                    break;

                case "episode":
                    retValue = string.Format("{0} - {1}x{2}{3}", listItem.Show.Title, listItem.Episode.Season, listItem.Episode.Number, string.IsNullOrEmpty(listItem.Episode.Title) ? string.Empty : " - " + listItem.Episode.Title);
                    break;

                case "person":
                    retValue = listItem.Person.Name;
                    break;
            }
            return retValue;
        }