Click here to Skip to main content
15,896,154 members
Articles / Desktop Programming / Windows Forms

Autogenerate Playlists for iTunes in Directory Order

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
12 Jan 2010GPL38 min read 30K   533   4  
This article demonstrates a tool which can auto-generate playlists for iTunes.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iTunesLib;

namespace ItnuesPlayListManager
{
    public class TrackElement
    {
        /// <summary>
        /// Creates trackobject for provided Itnues track
        /// </summary>
        /// <param name="playlistobject">playlist object which the track need to reside</param>
        /// <param name="trackobject">Itnues track object</param>
        public TrackElement(PlayListElement playlistobject, IITTrack trackobject)
        {
            ItnuesTrackSource = trackobject;
            object obj = (object)trackobject;
            playlistobject.ItnuesFolderSource.AddTrack(ref obj);
            Parent = playlistobject;
        }
                
        /// <summary>
        /// Gets the parent of the current Itunes Track Element.
        /// </summary>
        public PlayListElement Parent
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets Itnues backreference object
        /// </summary>
        public IITTrack ItnuesTrackSource
        {
            get;
            private set;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Technical Lead
United States United States
Started Programming career with VB 6 and VC++ and now Into .Net Development. Working with .Net since its first release (Version 1.0 Beta). Lucky enough to continue always with most updated versions of .Net and as of now; May 2007, fighting with .Net 3.0 (WPF,WCF...etc) and it's next most anticipated version LINQ.

Got familiarity up on the .Net Technologies and Guidelines like CAB, and Patterns and Practices, Enterprise Library and now with it's WPF version etc.

Specialized in Windows and Distributed and Service oriented applications.

Comments and Discussions