Наследование: MediaItem_Album
Пример #1
0
        public static MediaItem newFromUpnpItemClass(String _upnpItemClass, String _raumfeldSection)
        {
            MediaItem mediaItem;

            switch (_upnpItemClass)
            {
            case "object.item.audioItem.musicTrack":
                mediaItem = new MediaItem_Track();
                break;

            case "object.container.album.musicAlbum":
                mediaItem = new MediaItem_Album();
                break;

            case "object.container.albumContainer":
                mediaItem = new MediaItem();     // @@@
                break;

            case "object.container.person.musicArtist":
                mediaItem = new MediaItem_Artist();
                break;

            case "object.container.genre.musicGenre":
                mediaItem = new MediaItem_Genre();
                break;

            case "object.container.person.musicComposer":
                mediaItem = new MediaItem_Composer();
                break;

            case "object.container.trackContainer":
                mediaItem = new MediaItem_TrackContainer();
                break;

            case "object.container.trackContainer.napster":
                mediaItem = new MediaItem_TrackContainer();
                break;

            case "object.item.audioItem.audioBroadcast.radio":
                mediaItem = new MediaItem_Radio();
                break;

            case "object.item.audioItem.audioBroadcast.lastFM":
                mediaItem = new MediaItem_LastFm();
                break;

            case "object.item.audioItem.audioBroadcast.rhapsody":
                mediaItem = new MediaItem_RhapsodyRadio();
                break;

            case "object.item.audioItem.audioBroadcast.lineIn":
                mediaItem = new MediaItem_LineIn();
                break;

            case "object.container.playlistContainer":
                mediaItem = new MediaItem_Playlist();
                break;

            case "object.container.playlistContainer.queue":
                if (_raumfeldSection == "Playlists")
                {
                    mediaItem = new MediaItem_Playlist();
                }
                else
                {
                    mediaItem = new MediaItem();
                }
                break;

            case "object.container":
                mediaItem = new MediaItem();
                break;

            case "object.container.storageFolder":
                mediaItem = new MediaItem_StorageFolder();
                break;

            case "object.container.favoritesContainer":
                mediaItem = new MediaItem();
                break;

            case "object.container.playlistContainer.shuffle":
                mediaItem = new MediaItem_Shuffle();
                break;

            default:
                mediaItem = new MediaItem();
                break;
            }

            mediaItem.upnpItemClass = _upnpItemClass;

            return(mediaItem);
        }
Пример #2
0
        public static MediaItem newFromUpnpItemClass(String _upnpItemClass, String _raumfeldSection)
        {
            MediaItem mediaItem;

            switch (_upnpItemClass)
            {
                case "object.item.audioItem.musicTrack":
                    mediaItem = new MediaItem_Track();
                    break;
                case "object.container.album.musicAlbum":
                    mediaItem = new MediaItem_Album();
                    break;
                case "object.container.albumContainer":
                    mediaItem = new MediaItem(); // @@@
                    break;
                case "object.container.person.musicArtist":
                    mediaItem = new MediaItem_Artist();
                    break;
                case "object.container.genre.musicGenre":
                    mediaItem = new MediaItem_Genre();
                    break;
                case "object.container.person.musicComposer":
                    mediaItem = new MediaItem_Composer();
                    break;
                case "object.container.trackContainer":
                    mediaItem = new MediaItem_TrackContainer();
                    break;
                case "object.container.trackContainer.napster":
                    mediaItem = new MediaItem_TrackContainer();
                    break;
                case "object.item.audioItem.audioBroadcast.radio":
                    mediaItem = new MediaItem_Radio();
                    break;
                case "object.item.audioItem.audioBroadcast.lastFM":
                    mediaItem = new MediaItem_LastFm();
                    break;
                case "object.item.audioItem.audioBroadcast.rhapsody":
                    mediaItem = new MediaItem_RhapsodyRadio();
                    break;
                case "object.item.audioItem.audioBroadcast.lineIn":
                    mediaItem = new MediaItem_LineIn();
                    break;
                case "object.container.playlistContainer":
                    mediaItem = new MediaItem_Playlist();
                    break;
                case "object.container.playlistContainer.queue":
                    if (_raumfeldSection == "Playlists")
                    {
                        mediaItem = new MediaItem_Playlist();
                    }
                    else
                    {
                        mediaItem = new MediaItem();
                    }
                    break;
                case "object.container":
                    mediaItem = new MediaItem();
                    break;
                case "object.container.storageFolder":
                    mediaItem = new MediaItem_StorageFolder();
                    break;
                case "object.container.favoritesContainer":
                    mediaItem = new MediaItem();
                    break;
                case "object.container.playlistContainer.shuffle":
                    mediaItem = new MediaItem_Shuffle();
                    break;
                default:
                    mediaItem = new MediaItem();
                    break;
            }

            mediaItem.upnpItemClass = _upnpItemClass;

            return mediaItem;
        }