INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Is there an easy way to generate playlists?  (Read 1129 times)

radio1

  • Member
  • *
  • Posts: 2
Is there an easy way to generate playlists?
« on: April 05, 2008, 10:46:31 am »

Hi,

I've used MC12 for a long while. But I have never used playlists...
I have over 7,000 mp3 files. Is there an easy way to generate playlists in MC12 for all those albums?

I have just bought a Roku SoundBridge m500, and I am starting to realize I may need to generate playists for easier surfing on the device. Some people over at the Roku forums mentioned Firefly + iTunes.

But I don't own an iPod, nor do I want to a market popping up when I want chill out with music. Furthermore, there are a lot of horror stories of how iTunes screws your metadata and library structure you do have.
Logged

eba

  • Galactic Citizen
  • ****
  • Posts: 351
Re: Help!
« Reply #1 on: April 06, 2008, 12:37:23 pm »

Not really sure I understand what you mean, do you just want a playlist of every album?
If you do, you could use Mr ChriZ' scripting plugin:

http://yabb.jriver.com/interact/index.php?topic=38693.0

and this script, which does exactly that:

using System;

//css_reference MediaCenter.dll;

class Script : MarshalByRefObject
{
    public void Init(MediaCenter.MCAutomation mediaCenterInterface)
    {
        //Get a set of files with one track for every album (add to the search string if not all albums required)
        MediaCenter.IMJFilesAutomation albums = mediaCenterInterface.Search("[Media Type]=Audio ~nodup[Album],[Album Artist (Auto)]");
       
        //for each album's track
        for (int albumCounter = 0; albumCounter < albums.GetNumberFiles() ; ++albumCounter)
        {
            String album = albums.Get(albumCounter,"Album"); //get album's artist
            String artist = albums.Get(albumCounter,"Album Artist (Auto)"); //get album's name
           
            //Create a playlist
            MediaCenter.IMJPlaylistAutomation playlist = mediaCenterInterface.GetPlaylists().CreatePlaylist("Albums\\",artist + " - " + album);
            //Get all files in that album by that album artist.
            MediaCenter.IMJFilesAutomation tracks = mediaCenterInterface.Search("album=[" + album + "] autoalbumartist=[" + artist + "]");
           
            //Add each track from that album into the playlist
            for(int trackCounter = 0; trackCounter < tracks.GetNumberFiles(); ++trackCounter)
            {
                playlist.AddFile(tracks.Get(trackCounter,"filename"),trackCounter);
            }
        }
    }
}


radio1

  • Member
  • *
  • Posts: 2
Re: Help!
« Reply #2 on: April 11, 2008, 08:09:29 am »

Thanks eba!

I am sorry I took so long to reply. After fiddling around with the tagging feature for an afternoon, I figured out how to start generating playlists.
Logged
Pages: [1]   Go Up