Kodi Community Forum
MediaFrontPage - Web interface with widget type architecture to control multiple apps - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: MediaFrontPage - Web interface with widget type architecture to control multiple apps (/showthread.php?tid=83304)



- _Mikie_ - 2011-05-12

While I'm here. In comingepisodes.css, #header-fix, .notify-text needs to be added to the top property so that the update available thing doesn't show in coming episodes on mediafrontpage. Unless you want it to?

Regards


- SleepyP - 2011-05-12

_Mikie_ Wrote:DejaVu I have authentication enabled because friends over the interwebs view my series to see what I have etc. I managed to get it working for now tho.

Another question. Mediafrontpage uses phpcurl to get the sickbeard pages right? In curl what is the command to fix the relative link problem? I'm busy working on something and it has me stuck. Kinda teaching myself curl as I go. Any help would be appreciated.

Regards

Actually I was just about to post about the SickBeard widget.
I have been experimenting with different MFP config settings. The current thing I am working on is getting MFP to use "local" addresses properly instead of "public" addresses. What do I mean by "local"?

Examples:
My "Public" URL is http://divinitycycle.yourhda.com:x/
My "Local" URL is http://192.168.1.x:x/
Where x is the port # associated with whatever service. To make the "public" versions work I must do a port forward through my router. I'm trying to reduce the number of open public ports, so ideally I'd like to have MFP use only the "local" URLs for everything possible.

The local settings work great when the computer I am visiting MFP with is on the same LAN. However, some things do NOT work when I am viewing MFP from outside my LAN (like I am doing right now since I'm at work). If you run into anything definitely post here, since I'd love to get this stuff working as expected.


- _Mikie_ - 2011-05-12

SleepyP Wrote:Actually I was just about to post about the SickBeard widget.
I have been experimenting with different MFP config settings. The current thing I am working on is getting MFP to use "local" addresses properly instead of "public" addresses. What do I mean by "local"?

Examples:
My "Public" URL is http://divinitycycle.yourhda.com:x/
My "Local" URL is http://192.168.1.x:x/
Where x is the port # associated with whatever service. To make the "public" versions work I must do a port forward through my router. I'm trying to reduce the number of open public ports, so ideally I'd like to have MFP use only the "local" URLs for everything possible.

The local settings work great when the computer I am visiting MFP with is on the same LAN. However, some things do NOT work when I am viewing MFP from outside my LAN (like I am doing right now since I'm at work). If you run into anything definitely post here, since I'd love to get this stuff working as expected.

Good luck! To rephrase my original question now that I actually know what I want Big Grin (More a curl question but anyways) I curl_setopt sickbeard's home page. Now I click a link and it gives me errors about file not found on server. What I want to happen is when I click a link I want it to curl_setopt that link with the proper link not the relative link. Hope that makes sense..


- DejaVu - 2011-05-12

_Mikie_ Wrote:DejaVu I have authentication enabled because friends over the interwebs view my series to see what I have etc. I managed to get it working for now tho.
http://www.Trakt.tv?
Quote:Another question. Mediafrontpage uses phpcurl to get the sickbeard pages right? In curl what is the command to fix the relative link problem? I'm busy working on something and it has me stuck. Kinda teaching myself curl as I go. Any help would be appreciated.

Regards
It does use PHP-Curl, I could not tell you the in's and out's as I am clueless.
'relative link problem'? I have not seen or heard of this? What do you mean?


- _Mikie_ - 2011-05-12

DejaVu Wrote:http://www.Trakt.tv?

It does use PHP-Curl, I could not tell you the in's and out's as I am clueless.
'relative link problem'? I have not seen or heard of this? What do you mean?

Its not a problem with MFP its something that MFP does to make it work that doesn't work straight out with curl. Was wondering if you could point me in the right direction but no worries Smile


- Nick8888 - 2011-05-13

SleepyP Wrote:Actually I was just about to post about the SickBeard widget.
I have been experimenting with different MFP config settings. The current thing I am working on is getting MFP to use "local" addresses properly instead of "public" addresses. What do I mean by "local"?

Examples:
My "Public" URL is http://divinitycycle.yourhda.com:x/
My "Local" URL is http://192.168.1.x:x/
Where x is the port # associated with whatever service. To make the "public" versions work I must do a port forward through my router. I'm trying to reduce the number of open public ports, so ideally I'd like to have MFP use only the "local" URLs for everything possible.

The local settings work great when the computer I am visiting MFP with is on the same LAN. However, some things do NOT work when I am viewing MFP from outside my LAN (like I am doing right now since I'm at work). If you run into anything definitely post here, since I'd love to get this stuff working as expected.

Have you looked into setting up apache with virtual hosts. Basically allows you to access your xbmc webserver through apache. The same can be done for sickbeard, couchpotato etc.

so that your setup would look like this:

http://divinitycycle.yourhda.com/xbmc
http://divinitycycle.yourhda.com/sickbeard
http://divinitycycle.yourhda.com/couchpotato

and you only need to forward port 80

Ive posted my apache conf here:
http://forum.xbmc.org/showpost.php?p=619811&postcount=729


- Nick8888 - 2011-05-13

_Mikie_ Wrote:Its not a problem with MFP its something that MFP does to make it work that doesn't work straight out with curl. Was wondering if you could point me in the right direction but no worries Smile

From widgets/wComingEpisodes.php...
Code:
function changeLinks($body) {
global $sickbeardcomingepisodes;

$urldata = parse_url($sickbeardcomingepisodes);
$pos = strrpos($sickbeardcomingepisodes, "/");
if($pos < strlen($sickbeardcomingepisodes)) {
$uri_full = substr($sickbeardcomingepisodes, 0, $pos + 1);
} else {
$uri_full = $sickbeardcomingepisodes;
}
$uri_domain = str_replace($urldata["path"], "", $sickbeardcomingepisodes);

$regex = '/(<[(img)|(a)]\s*(.*?)\s*[(src)|(href)]=(?P<link>[\'"]+?\s*\S+\s*[\'"])+?\s*(.*?)\s*>)/i';

preg_match_all($regex, $body, $matches);
foreach($matches['link'] as $link) {
$pos = strpos($link, "/");
if($pos && strpos($link, "//")===false) {
if($pos==1) {
$newlink = substr($link , 0, 1).$uri_domain.substr($link , 1);
} else {
$newlink = substr($link , 0, 1).$uri_full.substr($link , 1);
}
}
//$body = str_replace($link, "\"".sickbeardposter(str_replace("\"", "", $newlink))."\"", $body);
$body = str_replace($link, $newlink, $body);
}

return $body;
}



- DejaVu - 2011-05-13

I just want to give a quick update to where my Repo is now.
I thought it was significant, hence the thread announcement. Will be popping into Lighthouse soon! Wink

Screenshot -
Image
  • Gugahoi's Search Widget - Working perfectly.

  • ComingEpisodes Widget with integrated scroller - Working Perfectly

  • 4 Columns w/submenu perfected by Gugahoi (adjusted slightly by me to fit the font size - no longer a %)

  • Permanently active scrollbar has been dealt with (only when needed).

  • Cool shadow effect added to widgets (I like the pop effect which matches the Nav bar).

  • Stripped unneeded JQuery calls from Mediafrontpage.php that were causing some conflicts.

I think this only really needs the new Trakt Widget that Gugahoi's working on to be completely up to speed...?

A couple of things I would like to work on next -

  1. Customised Scroll bar for the Library widget when it expands - not visible when it's not. I'm mildly confident this should be easy now the scrollbar is comfortable. Smile

  2. SabNZBd Widget staying within it's boundaries (buttons shoot of the edge).

I would call this almost one perfect!

@gugahoi, the Search Widget on my Repo is working great and no longer conflicts with the scroller, you can pull from mine if you like and convert it back to 3 columns.
It would probably be easier to do that way! Wink

I would also like to request, as I have already done it with mine - is to scrap the uTorrent Widget completely - ready for a rebuild, my (first) attempt was poor at best!


- gugahoi - 2011-05-13

SleepyP Wrote:Excellent. The only real "gotcha" I haven't resolved yet is the thumbnails.

You CAN use a SMB share on your server and then make symbolic links in the userdata folder for each XBMC client, so that the client Thumbnails folder is actually linking back to the Thumbnails share on the server. This works, but on my large library, it made my Windows 7 clients take forever and a day to open things like the Movies view. Switching to local thumbnail files got rid of the delay, so I know its the thumbnails.

My plan to "fix" this is to have the thumbnails folder on each client shared to the network and then have a scheduled rsync job on the server to sync everyone's thumbnails folders together. I have done shell scripts and cron jobs and stuff but never messed with rsync yet.

Also, I started writing up a troubleshooting page on Lighthouse so when we can point people there when they post questions, thereby reducing the support workload a bit.

DejaVu Wrote:Is it not possible to store the img locations in MySQL? Why would this not work? It only needs to be cached once to the local machine then it's there for good. No?

I am going to enable DDS, but will this not work either?
My network consists of 6 wireless laptops, this could take a while.

What you mean is like a cron job that automatically copies (syncs) the Thumbnail folder to the local machine on boot or similar?

I think you've nailed it with the - http://lifehacker.com/software/rsync/geek-to-live--mirror-files-across-systems-with-rsync-196122.php though. Wink

This all being said - all my clients are Windows 7 anyway and used a lot for other stuff as well as XBMC. I think Sync Toy pulling from my Revo (XBMCLive) when they are surfing Facebook would be sufficient for now. I tried Symblinks and it is SLOOOOOOOOOW!

If you find a solution for this let me know. I had MySQL setup a few months back but it made xbmc useless as I had to wait a few minutes every time the fanart needed to load. Gave up in the end as it's not that big a deal syncing a couple of libraries when the computer turns on. Specially using NFS now... so much faster then SMB, have you guys tried?


hernandito Wrote:Guga did you get my files? I sent you a PM...

I did indeed. I'm going to have a look thought them because the files are way too big, probably because of the flash player. Can't you get the images to load remotely? As in a path to the images? Or a website to fetch them from? 13 or so megs increases the sizes of MFP sooo much!

Also, if you want to have a look at the trakt widget I accidentally committed it to the backup test branch.

SleepyP Wrote:Actually I was just about to post about the SickBeard widget.
I have been experimenting with different MFP config settings. The current thing I am working on is getting MFP to use "local" addresses properly instead of "public" addresses. What do I mean by "local"?

Examples:
My "Public" URL is http://divinitycycle.yourhda.com:x/
My "Local" URL is http://192.168.1.x:x/
Where x is the port # associated with whatever service. To make the "public" versions work I must do a port forward through my router. I'm trying to reduce the number of open public ports, so ideally I'd like to have MFP use only the "local" URLs for everything possible.

The local settings work great when the computer I am visiting MFP with is on the same LAN. However, some things do NOT work when I am viewing MFP from outside my LAN (like I am doing right now since I'm at work). If you run into anything definitely post here, since I'd love to get this stuff working as expected.

I think that happens because it uses the url relative to the client and not the server. So when you're away from LAN the address wouldn't make much sense.

Nick8888 Wrote:Have you looked into setting up apache with virtual hosts. Basically allows you to access your xbmc webserver through apache. The same can be done for sickbeard, couchpotato etc.

so that your setup would look like this:

http://divinitycycle.yourhda.com/xbmc
http://divinitycycle.yourhda.com/sickbeard
http://divinitycycle.yourhda.com/couchpotato

and you only need to forward port 80

Ive posted my apache conf here:
http://forum.xbmc.org/showpost.php?p=619811&postcount=729

I didn't know about that! Very nice. But if you have an htaccess file, will that also work on the subdomains for pass protection?


- gugahoi - 2011-05-13

DejaVu Wrote:I just want to give a quick update to where my Repo is now.

Screenshot -
Image
  • Gugahoi's Search Widget - Working perfectly.

  • ComingEpisodes Widget with integrated scroller - Working Perfectly

  • 4 Columns w/submenu perfected by Gugahoi (adjusted slightly by me to fit the font size - no longer a %)

  • Permanently active scrollbar has been dealt with (only when needed).

  • Cool shadow effect added to widgets (I like the pop effect which matches the Nav bar).

  • Stripped unneeded JQuery calls from Mediafrontpage.php that were causing some conflicts.

I think this only really needs the new Trakt Widget that Gugahoi's working on to be completely up to speed...?

A couple of things I would like to work on next -

  1. Customised Scroll bar for the Library widget when it expands - not visible when it's not. I'm mildly confident this should be easy now the scrollbar is comfortable. Smile

  2. SabNZBd Widget staying within it's boundaries (buttons shoot of the edge).

You fixed it ?!?!? SWEEEEEETTT! Gonna have a look now. But can I ask you something? And this is probably personal. Any chance we can keep some kind of symmetry between the columns? For me it looks real messy when the columns are everywhere... and I also find important to get a main column in the middle that takes more space the the others. So for example middle can be 40% and let 30% on each side or something. Could even try and go for 5 columns and see how that looks (10%/20%/40%/20%/10% - as an example)?


And ye, (2) has been happening for a while, I think I know the fix - tables


- chaoticmaster - 2011-05-13

@DejaVu,

Are you testing with a nightly build? Also I did not see the layout.php file in your repo.


- DejaVu - 2011-05-13

chaoticmaster Wrote:@DejaVu,

Are you testing with a nightly build? Also I did not see the layout.php file in your repo.

Announced before updated. It's there now.
As for the nightly's, I come back from the future. I did not see the point yet. My Repo is for 10.1, you can download the new file being created to help support the new JSON Queries from my Repo though. Just rename it. Wink

SleepyP is concentrating on the changes and so far, making some great headway!


- Nick8888 - 2011-05-13

gugahoi Wrote:I didn't know about that! Very nice. But if you have an htaccess file, will that also work on the subdomains for pass protection?
I'm not certain whether it does for an unsecured sickbeard etc. I have sickbeard, couchpotato and sabnzbd all configured with the same username and password as in the htpasswd file which means I only have to login once as it counts for all the others. Hope that makes sense.


- DejaVu - 2011-05-13

gugahoi Wrote:So for example middle can be 40% and let 30% on each side or something. Could even try and go for 5 columns and see how that looks (10%/20%/40%/20%/10% - as an example)?
Or we could work on giving the end user the choice via the config file? It'll only be calls for the values... would'nt it?

3-4 columns might get a bit awkward though.

The reason mine has 4 is only because of the ComingEpisodes widget takes quite a bit of space. When I view it on my TV, it looks pretty symetrical. Although, on my PC, it looks totally different.

What I went for, similar to and reasons...
These are guestimates or (ish's) -

25% <- for the ComingEpisodes to look 'snug' and not a million miles away from the Scroller.
15% <- Smallish for the little info widgets I hardly ever use or just for quick reference. (XMBC Library and the Recents)
35% <- For the search results.
25% <- for the SabNZBd widget (to compensate for the buttons popping out).

Or moreso I categorized them subconsciously Big Grin
(Coming) - (REF) - (SEARCH) - (DOWNLOAD)


- gugahoi - 2011-05-13

DejaVu Wrote:Announced before updated. It's there now.
As for the nightly's, I come back from the future. I did not see the point yet. My Repo is for 10.1, you can download the new file being created to help support the new JSON Queries from my Repo though. Just rename it. Wink

SleepyP is concentrating on the changes and so far, making some great headway!

I was about to say something was wrong cause it was not working here but now all is good. A few bugfixes you should address tho. Mostly related to sizes in the search widget. Make sure the sab and cp icons don't go over the table border. I think they have the widths set as pixels, maybe change to percentage?

Also noticed the scroll only works with the default css, maybe we should address that problem too? I can do it, once I get it working in my repo, if that's the case. Which leads me to the question: which files are required for the scroll? Could you point them out explicitly?

Nick8888 Wrote:I'm not certain whether it does for an unsecured sickbeard etc. I have sickbeard, couchpotato and sabnzbd all configured with the same username and password as in the htpasswd file which means I only have to login once as it counts for all the others. Hope that makes sense.

Makes sense, but I don't know if it works for me as my passwords aren't the same. I should maybe figure out how get it working that way.