Updated version for MediaPortal 1.1.1 (1 Viewer)

toaroa

New Member
August 11, 2008
2
0
WORKING! I uninstalled the version which Oxan has created (I'm sure it may work for some others; just not me), went back to RC3.msi and followed the AcesHigh approach which had worked for me previously. Working for remote scheduling of recordings (htpc/server = MP 1.1.1 on W7) without the "*Please select a channel" problem.
 

hassegubben

Portal Pro
November 25, 2006
163
2
57
Uppsala
Home Country
Sweden Sweden
The recording functionality must be broken in Oxans build. I'm on Win XP SP3. Still waiting for Oxan to come back with a reply. He was going to look into it. Perhaps it's only some small configuration?
 

Oxan

Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    Re: AW: Updated version for MediaPortal 1.1.1

    Hi all,

    I've created an updated version with just 2 changes:
    * Fixes the 'Select a channel' bug. I still don't know how it's possible that it didn't work in my earlier build, but that it did work in gemx's build, as the code was exact the same... Anyway, it's fixed now.
    * Integrates the new layout made by P4G0 (from here)

    Source code is available from github.
    download moved to headpost
     

    Oxan

    Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    where are the css files, they seem to be missing on my install. BTW is there any reason why Cassini was used over IIS?
    The css files are in the Setup and should be installed into plugins/MPWebServices/htdocs/stylesheets. It worked for me... Did you try Ctrl+F5 in your browser?
    I don't exactly know why gemx has chosen for Cassini, but I think IIS is a lot heavier. Cassini worked fine for me, so I didn't think about changing it (which means spending a lot of time fighting with IIS).
     

    KayDiefenthal

    MP Donator
  • Premium Supporter
  • July 18, 2006
    1,176
    92
    46
    Germany - Bonn
    Home Country
    Germany Germany
    AW: Updated version for MediaPortal 1.1.1

    here is an feature for webService to get Active (Running )Streams
    #Add this in TvServiceWebService.asmx.cs#
    [WebMethod]
    public List<WebActiveStream> GetActiveStreams()
    {

    IList<Card> cards = Card.ListAll();
    List<Channel> channels = new List<Channel>();
    TvServer server = new TvServer();
    List<User> _users = new List<User>();

    List<WebActiveStream> activestream = new List<WebActiveStream>();
    foreach (Card card in cards)
    {
    if (card.Enabled == false)
    {
    continue;
    }
    if (!RemoteControl.Instance.CardPresent(card.IdCard))
    {
    continue;
    }
    User[] users = RemoteControl.Instance.GetUsersForCard(card.IdCard);
    if (users == null)
    {
    return activestream;
    }
    for (int i = 0; i < users.Length; ++i)
    {
    User user = users;
    if (card.IdCard != user.CardId)
    {
    continue;
    }
    bool isRecording;
    bool isTimeShifting;

    VirtualCard tvcard = new VirtualCard(user, RemoteControl.HostName);
    isRecording = tvcard.IsRecording;
    isTimeShifting = tvcard.IsTimeShifting;
    if (isTimeShifting || (isRecording && !isTimeShifting))
    {
    int idChannel = tvcard.IdChannel;
    try
    {
    WebChannel channel = new WebChannel(Channel.Retrieve(idChannel));
    WebTvServerUser tvServerUser = new WebTvServerUser(tvcard.User);
    WebActiveStream stream = new WebActiveStream(tvServerUser, channel);
    activestream.Add(stream);
    }
    catch
    { }

    }


    }
    }
    return activestream;
    }
    #Add this in Classes.cs#
    public class WebActiveStream
    {
    #region Private Fields

    private Int32 _id;
    private String _user;
    private String _displayname;

    #endregion

    #region Constructor

    public WebActiveStream()
    {
    }

    public WebActiveStream(WebTvServerUser webuser, WebChannel webchannel)
    {
    this._user = webuser._name;
    this._id = webuser._idChannel;
    this._displayname = webchannel.DisplayName;

    }

    #endregion

    #region Properties

    private Int32 ID
    {
    get { return _id; }
    set { _id = value; }
    }

    public String User
    {
    get { return _user; }
    set {_user = value;}
    }

    public String DisplayName
    {
    get { return _displayname; }
    set { _displayname = value; }
    }

    #endregion

    }
     

    HappyTalk

    Portal Pro
    July 16, 2006
    307
    8
    UK
    where are the css files, they seem to be missing on my install. BTW is there any reason why Cassini was used over IIS?
    The css files are in the Setup and should be installed into plugins/MPWebServices/htdocs/stylesheets. It worked for me... Did you try Ctrl+F5 in your browser?.

    I looked at the aspx and saw it ref styesheets in the stylesheets folder but none were there, hence my query. I uninstalled and tried a prev version but that didn't install them either. They're not in the setup. Can someone zip up their htdocs folder and attach it, cheers.

    OK I found them here on that german dude's site :- http://files.techspread.de/mpwebservices.zip (unzip and copy into htdocs folder (after backing it up)
     

    Oxan

    Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    Re: AW: Updated version for MediaPortal 1.1.1

    here is an feature for webService to get Active (Running )Streams
    Thanks, I've merged it (after slightly changing it for codestyle).
    I looked at the aspx and saw it ref styesheets in the stylesheets folder but none were there, hence my query. I uninstalled and tried a prev version but that didn't install them either. They're not in the setup. Can someone zip up their htdocs folder and attach it, cheers.

    OK I found them here on that german dude's site :- http://files.techspread.de/mpwebservices.zip (unzip and copy into htdocs folder (after backing it up)
    That the stylesheets folder isn't in previous versions is right, they aren't using stylesheets: I introduced them in my last version (which should show up in SetupTv as version 1.0.0.2+o2). I'm not sure why that didn't work for you. When you use the version from the german site, you also get old .cs files, with some bugs, so it's preferable to just use his stylesheets, which are great :)
    I've attached my stylesheets directory to this post, in case somebody else needs them :)
     

    Attachments

    • stylesheets.zip
      2.8 KB

    HappyTalk

    Portal Pro
    July 16, 2006
    307
    8
    UK
    Re: AW: Updated version for MediaPortal 1.1.1

    yer i saw some bugs and copied code in from new to old. is his stuff JUST css changes? can you tell me is your stuff providing a web services interface to the tv server AND a web app that talks to mp via this web service. i couldnt see any refs to web service though only had brief look.
     

    Users who are viewing this thread

    Top Bottom