Exemplo n.º 1
0
        private ListViewItem GetTrack(IAimpPlaylistItem item)
        {
            var trackItem = new ListViewItem {
                Text = item.PlaybackIndex.ToString()
            };

            trackItem.SubItems.Add(item.DisplayText);
            trackItem.SubItems.Add(TimeSpan.FromSeconds(item.FileInfo.Duration).ToString());
            // save playlist item to tag.
            trackItem.Tag = item;

            return(trackItem);
        }
Exemplo n.º 2
0
        public TagEditorForm(IAimpPlaylistItem item, IAimpPlayer player)
        {
            InitializeComponent();

            var fileName = item.FileName;

            fileName = fileName.EndsWith(":0") ? fileName.Replace(":0", string.Empty) : fileName;
            var result = player.ServiceFileTagEditor.EditFile(fileName);

            if (result.ResultType == ActionResultType.OK)
            {
                var editor      = result.Result;
                var mixedResult = editor.GetMixedInfo();

                if (mixedResult.ResultType == ActionResultType.OK)
                {
                    lTitle.Text  = mixedResult.Result.Title;
                    lAlbum.Text  = mixedResult.Result.Album;
                    lArtist.Text = mixedResult.Result.Artist;
                    lGenre.Text  = mixedResult.Result.Genre;

                    if (mixedResult.Result.AlbumArt != null)
                    {
                        cover.Image = mixedResult.Result.AlbumArt;
                    }
                }

                var count = editor.GetTagCount();
                for (var i = 0; i < count; i++)
                {
                    var r = editor.GetTag(i);
                    if (r.ResultType == ActionResultType.OK)
                    {
                        var tab = new TabPage(r.Result.TagId.ToString())
                        {
                            Text = r.Result.TagId.ToString(),
                            Tag  = r.Result
                        };

                        var editorControl = new TagEditControl(r.Result);
                        tab.Controls.Add(editorControl);
                        tabControl1.TabPages.Add(tab);
                    }
                }
            }
        }
Exemplo n.º 3
0
 public void OnSelect(IAimpPlaylistItem item, IAimpPlaybackQueueItem queueItem)
 {
 }
Exemplo n.º 4
0
 private bool FilterFunc(IAimpPlaylistItem aimpPlaylistItem, object o)
 {
     return(true);
 }