[other] Extend g_player with title, description, etc (1 Viewer)

Shukuyen

Community Plugin Dev
  • Premium Supporter
  • May 8, 2008
    557
    300
    Lake of Constance
    Home Country
    Germany Germany
    Hi,

    almost all the plugins I plan to develop or started to develop would like to get some more information about a file played by g_player.

    My thought was to extend g_player with a pretty title, description, file type (video, movie, episode, music, ...) and a thumbnail. Maybe the plugin name which started the player, too. A plugin or Mediaportal component would then supply those properties with the start method and g_player would make the skin properties available. This way all the "wait x seconds then update the skin" hack most plugins use would not be neccessary.

    While looking at the code I noticed that there already are properties vor _title and _description in the g_player class, but they aren't used anywhere.

    Does it make sense to code what I described above? Is it not possible for some reason? (I admit that I don't really know what's going on in the Mediaportal internals). If it makes sense, do you have any hints which places I have to touch?

    Thanks for all your input,
    Shukuyen.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    I'm not sure what you mean, but it is possible to set some of the properties for the player like this:

    Code:
    g_Player.currentTitle = rec.Title; //Just an example from the TVPlugin
    g_Player.currentDescription = rec.Description;

    the type of media (Music, Radio, Recording, TV, Video, Unknown) is set when you start playback with g_Player.Play
     

    Shukuyen

    Community Plugin Dev
  • Premium Supporter
  • May 8, 2008
    557
    300
    Lake of Constance
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #3
    Hey pilehave,

    I mean something like that:
    MoviePlayer.cs - moving-pictures - Project Hosting on Google Code

    I think this is a step that shouldn't be neccessary but more important I want to do something like this in my plugin when I receive a g_player.PlaybackChanged event:
    string Title = g_player.Title; // Would be the media title, not the file name
    string Description = g_player.Description; // A description
    string Caller = g_player.Caller; // The plugin this is played from, ie "MovingPictures" or "TV Series"


    I saw that the type of media is automatically determined, but I would like to go further. A video may be a movie, a video (little clip, home movie ...), a trailer, a streamed online video and so on. It would be great to know what type the file is for all kinds of plugin.

    Hope you get what I want to say, my "half knowledge" doesn't make it easy to express what I want to do. And who knows, maybe it's already possible via a way I don't know of.
     

    Users who are viewing this thread

    Top Bottom