|
SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
STVI: CD player & Windows Media DRM tag parser/player
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 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 play. No other external player apps are needed. Note that neither visualization nor video playback is supported, just audio playback. The latest version of SageWMP is version 1.4 intended for use with SageTV V6.1. Version 1.4 may also work to some degree with SageTV V6.0, but there are some known issues in the SageTV core that are fixed in 6.1. I'm also leaving SageWMP version 1.3 available for users of SageTV V5, but don't expect much ongoing support for this version.
__________________
-- Greg Last edited by GKusnick; 03-22-2007 at 05:27 PM. |
#2
|
||||
|
||||
Nice job Greg!
This is the FIRST plugin that uses the MediaFileMetadataImporter plugin to support extraction of metadata from a MediaFile without having the SageTV core support it. We didn't give out any info on it previously. But now it's available. This is a great example of how to extend support in SageTV to support a new format; and of course a nice plugin in and of itself.
__________________
Jeffrey Kardatzke Founder of SageTV |
#3
|
||||
|
||||
Quote:
|
#4
|
||||
|
||||
I'm not an iTunes user myself, so I'm not familiar with the iTunes player software. But if there's a way to interface with the player programmatically to (a) extract metadata and (b) control playback, then something similar should be possible.
__________________
-- Greg |
#5
|
||||
|
||||
Quote:
Quote:
Oh, and Greg, if you don't mind me asking, how did you generate the com wrapper? Last edited by stanger89; 04-25-2006 at 08:14 PM. |
#6
|
||||
|
||||
The parser and player interfaces are separate. So you can implement a custom parser for a format that's supported natively, and Sage will use it in preference to the built-in parser, while still using the native player. (Or vice versa.)
If you have more than one custom parser class, separate them with semicolons like so: mediafile_metadata_parser_plugins=Package1.Parser1;Package2.Parser2;... For each file to be parsed, Sage will go down the list, trying each parser in turn until it finds one that returns a valid Airing from Parser.extractMetadata. So if you don't want to handle a particular format in your parser, just return null for that file and Sage will fall through to the next parser in the list (or the default parser if it falls off the end of the list). Take a look at my source code (included in the zip) for a working example of all this. Quote:
__________________
-- Greg |
#7
|
||||
|
||||
OK, well I'm embarrassed to admit I've already found a bug in which I had hard-coded the string "SageTVClient.exe" instead of checking to see whether I was running on the server. I've now uploaded a fix for that, so the six of you who downloaded it so far might want to download again.
__________________
-- Greg |
#8
|
||||
|
||||
Wonderful job, Greg. I've been waiting for the tag parser since Sage added playback support for WMA. I am all over this tonight!
How would one access your parser from Studio in order to create an import that reads and displays tags using your parser? I've only worked through about 1/3 of the Studio tutorial before life got too busy and I quit but for this import I'll jump back in. Also, my server is not used for playback at all, just clients. I assume then that I only need to import this on the clients, correct? Scott |
#9
|
||||
|
||||
The tag parser executes on the server during media import. So if you want your DRM files indexed properly, you need to install this on the server and re-import. (Although you don't necessarily need to hook up the media_player_plugin_class property on the server if you don't plan on using it for playback.)
The only time the tag parser executes on the client is if you Browse Media Files and choose one that's not already in the library. As for the Studio question, the STV doesn't interact directly with the plugin. Rather, once all your files have been re-imported using the plugin, you would then use the AlbumAPI to access the media library just as you would using the default tag parser.
__________________
-- Greg |
#10
|
||||
|
||||
OK, then how would one access the tags that AlbumAPI does not support yet are in the files and readable by your parser. Tags such as Album Artist (vs. Artist), Composer, Label, etc.? I need to display these tags in the Sage UI as well as sort on some of them.
Scott |
#11
|
|||
|
|||
Great job, Greg !
Would something similar be possible for FLAC files ? Dirk |
#12
|
||||
|
||||
Quote:
What I could do (but haven't done yet) is provide a SageWMP_Parser_GetTags(file) API that would return a Map containing name/value pairs for all the defined tags in a file. Then you could do what you like with that. However since Sage is not caching that info anywhere in its database, there might be performance issues with reparsing the files every time you fire up Sage. Another option is to pull info from the Windows Media Player database. This contains a copy of all the tag data from all the files WMP knows about, all in one place, so doing it this way might be more efficient than the previous option. The downside here is that you have to make sure your WMP DB is in sync with your Sage media library. I'll take a look at including one or both of these options in the next release.
__________________
-- Greg |
#13
|
||||
|
||||
Quote:
media_player_plugin_class/flac=SageWMP.Player (This will automatically enable SageWMP.Parser for .flac files as well.) Let me know how it goes.
__________________
-- Greg |
#14
|
|||
|
|||
Quote:
Thanks !! One more question: I assume that there is no way to use your plugin class only for importing, but not for playback ? Dirk |
#15
|
||||
|
||||
Quote:
For the next release, I could add an optional SageWMP/parser/tags property to control tag parsing separately from playback.
__________________
-- Greg |
#16
|
||||
|
||||
I have not tried any of the FLAC plugins for WMP in months but back then they did not enable WMP to read (or write) the tags in FLAC files. Only play them. I gave up and converted everything to WMA lossless.
As far as the AlbumArtist and Artist tags go in WM files go, I really need the ability to display both in a Sage screen. If you are correct and your parser returns the AlbumArtist tag instead of the Artist tag (if both are present) then I'm halfway there. Sages parser only returns the Artist tag and never the AlbumArtist tag so my library in Sage gets scrambled to the point of uselessness. It still sounds to me like Sage needs to update the core AlbumAPI to support more tags in Studio created menu screens. In the meantime, option 2 to pull the metadata from the WMP database sounds like the better option to me. |
#17
|
|||
|
|||
Quote:
I'll play around with it and let you know ... Thanks, Dirk |
#18
|
||||
|
||||
Quote:
__________________
-- Greg |
#19
|
||||
|
||||
This is on the list to update in the core. We'll be adding an Album Artist role type so you can independently specify the Song Artist vs. the Album Artist. More info will be available when it's out. An FYI for any planning you're doing.
__________________
Jeffrey Kardatzke Founder of SageTV |
#20
|
||||
|
||||
Quote:
Sweet! Thanks a lot for the heads up. I'm sure you have more than this planned but just in case I would suggest supporting as many tag types as possible. I personally use: Track # Track (Name) Album Artist Artist Composer Conductor Album Genre Label Date Released Another thing I have noticed Sage getting confused by is when there is more than one artist listed such as "Al Kooper; Johnny Winter; Michael Bloomfield". Some songs from the album get listed under Various in Sage while others like this get listed under only the first artist listed. The album is often listed multiple times under different artists but each listing for that album shows only the song(s) by that artist. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|