SageWMP is a Java plugin and STVI for using Windows Media audio files with SageTV. It is not a replacement for the Sage music library UI, but an add-on that lets you import and play back, using the standard UI, any audio format supported by Windows Media Player, including DRM-protected WMA files. You can also use it to play audio CDs directly from the CD drive, without having to rip them and import the tracks.
It does all this by using Windows Media Player's COM interface to read out media file properties and to play back the file. So to use this plugin you must have (a) an up-to-date version of Windows Media Player, and (b) valid licenses for any DRM content you want to import into Sage. No other external player apps are needed.
Note that neither visualization nor video playback is supported yet, just tag parsing and audio playback.
NOTE: SageWMP 1.3 requires SageTV 5.0.2 or later, and Java 1.5 or later.
1. Download SageWMP.zip if you haven't already done so.
2. Shut down SageTV. If you're running SageTV as a service, stop the service.
3. Unzip SageWMP.zip into your Program Files\SageTV\SageTV folder. Make sure that DLL files land in Program Files\SageTV\SageTV and JARs land in Program Files\SageTV\SageTV\JARs.
4. Restart the SageTV service (if you're using it) and reload SageTV.
5. Go into Setup > Detailed Setup > Advanced > Import SageTV Application Package and import SageWMP.stvi.
6. Go to Media Center > Music > Music CD > Configure and enable or disable file types as desired. (See the section on Configuration properties below for advanced configuration options.)
If you have one or more SageTVClient installations, repeat steps 2-6 on those machines as well to enable client-side DRM and CD playback. (Make sure the client machines are licensed for your DRM content.)
To get your music files rescanned with the new tag parser:
7. Go into Setup > Detailed Setup > General > Media Center Import Directories and remove your music directories.
8. On the main Setup screen, click Refresh Imported Media.
9. Wait until the Song Titles list is empty (except perhaps for Hauppauge FM tuner entries).
10. Go back into Detailed Setup and add back your music import directories.
11. Refresh Imported Media again. It may take a little while for all the files to get reparsed.
Once everything is re-indexed you should be able to select your WMA DRM files for playback through the standard SageTV media library browser.
The Music CD menu
SageWMP.stvi adds a new item to the Music menu called Music CD. Clicking this item brings up the Music CD menu. If there's no CD in the drive, this menu will be mostly blank except for a couple of buttons on the right. After you insert a CD, the menu will automatically refresh with the title of the disc, the album artist, and a list of tracks on the disc. If this is the first time you've played that particular disc, some of the displayed information may be "Unknown" at first while Windows Media Player downloads metadata from the Internet. The menu should refresh again with valid data once the download is complete.
You can play the entire disc using the Play button on your remote or the Play CD command on the left side of the menu. Or you can play a particular track by highlighting it and pushing Play or Enter. You can also play a CD by inserting it into the drive and clicking Play DVD or CD on the Media Center menu.
During playback, the OSD button on the left takes you to Sage's On-Screen Display. Here you can see album info and a playback timeline, but visualizations are not yet implemented. Note that the up-and-down track navigation controls on the OSD won't work, since the tracks are not actually in the Sage media library.
When the selected track finishes, playback will continue with the next track on the disc as long as the Music CD menu or OSD screen is displayed. (If you navigate away from the Music CD or OSD screens, playback will stop at the end of the currently playing track.)
The other buttons should be self-explanatory. Music Menu takes you back to the Music menu. Eject ejects the disc. Configure brings up a dialog allowing you to enable or disable plugin features for specific file types.
Basic configuration of the plugin happens automatically when you import the STVI. You can enable or disable parsing and playback of specific file types using the Configuration dialog on the Music CD menu. For most purposes this should be sufficient.
However if you don't want to use the STVI, or if you want to enable SageWMP for file types other than those that appear in the Configuration dialog, you can edit the following configuration properties directly in Sage.properties and SageClient.properties. (Remember to shut down Sage, including the service, before editing your properties files.)
The SageWMP tag parser must be registered with Sage using this property:
Make sure any file types you want Sage to import are listed in this property:
Optional: If you want SageWMP to add all track artists (as well as album artists) to the Arists list in the Sage media library, use this property:
Optional: If you're developing your own STV and want SageWMP to copy all tag data into the Sage media library, use this property:
Optional: To enable detailed debug logging for troubleshooting purposes, use this property:
If want to use SageWMP's back-end features in developing your own STV, I've included Java source and documentation in the zip. Source
and docs for SageWMP proper may be found in Program Files\SageTV\SageTV\SageWMP; I've also included a library of support functions in
One feature that may be of particular interest is the ability to copy raw tag data from media files into the Sage media library and then access it from STV code. To enable this feature, turn on this property before importing your music files:
You can access the raw tag data as a single large string using GetShowMisc(media_file), or you can access individual tag values using SageWMP_Parser_GetTrackTagValue(media_file, "tag_name"). For convenience, I have implemented the following wrapper functions suitable for use with FilterByMethod, GroupByMethod, and Sort: