Kodi Community Forum
Maraschino (formerly HTPC Frontend) - a summary web interface for your XBMC HTPC - 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: Maraschino (formerly HTPC Frontend) - a summary web interface for your XBMC HTPC (/showthread.php?tid=113136)



- mrkipling - 2011-11-10

gugahoi Wrote:Most programming I know came from need. So hopefully I'll be able to learn this too. One thing I'm trying to figure out tho. In the add_edit_application_dialog.html template, what kind of variables are accessible to me? If I want to create another variable, how should I pass it to this template? Is it through the render_template function you have already created? And if so, I presume I'd have to modify it to accomodate other variables right?

The code which renders the add/edit application dialog is in "applications.py", and the function is "add_edit_application_dialog" (line 28). In this function you need to get a list of image files in the image directory. This is actually pretty simple as I added a helper function this morning which returns all files in a directory, filtered by extension (I did this for the "use random background image" setting). The code for it would look something like this:

Code:
icons = get_file_list('static/images/applications', ['.png', '.jpg'])

Pass it to the template in render_template, and in the template replace the text input with a select dropdown containing the list of icons.

I think that should pretty much do it! Any more questions then let me know.


- Archigos - 2011-11-10

dannycorker Wrote:For the setup tools, should I download the Windows exe version? I have tried it with that, using the easy_install.exe provided, and everything seemed to go fine, but I get an error when I run setup:

Yes, download the Windows EXE version and for the database location, change it to this:
Code:
DATABASE = '/Users/Danny/.maraschino/maraschino.db'

After you change that, rerun this from the Maraschino directory
Code:
Python setup.py
Then:
Code:
python maraschino-cherrypy.py



- Archigos - 2011-11-10

Image
Above: Taken in Chrome on Windows 7 Pro (75%) - Below: Taken in Atomic on iPad
Image
Two questions...
1. As you can see in the two shots above, the images for the Recently Added don't work and I was wondering if you had any pointers on how/where to fix that.
2. Also, from your site (and screenshots) it appears the Trakt widget should display more than just a Shout box, which it doesn't. If media is playing, I get the one that appears above and it fully disappears if nothing is playing. If I misunderstood the use of it, that's fine, I'll just remove it since I probably wont comment to Trakt's site.


- mrkipling - 2011-11-10

Archigos Wrote:Two questions...
1. As you can see in the two shots above, the images for the Recently Added don't work and I was wondering if you had any pointers on how/where to fix that.

This is probably because the images are served by your XBMC web server, so you need to be logged in to your XBMC web interface in order to display them. I use AWX, so I log in to that and then the thumbnails display for me.

To get around this I added a feature a while ago - if you use HTTP basic auth in Maraschino then it embeds the username and password for your XBMC web server in the image URLs (so, http://user : pass@xbmcseveraddress:8080/whatever).

Long story short: enable basic auth in your Maraschino settings.py file, like so:

Code:
AUTH = {
  'username': 'whatever',
  'password': 'whatever',
}

and let me know if you're still having problems.

Actually, if you're still having problems then if you could let me know the URL for one of the broken images then that would help.

Archigos Wrote:2. Also, from your site (and screenshots) it appears the Trakt widget should display more than just a Shout box, which it doesn't. If media is playing, I get the one that appears above and it fully disappears if nothing is playing. If I misunderstood the use of it, that's fine, I'll just remove it since I probably wont comment to Trakt's site.

The trakt module also displays shouts, but only if there are actually any shouts to display. To test that it's working properly, find a movie or episode on trakt that you know for sure has shouts, and play it in XBMC. If it doesn't display shouts then something is up.


- Archigos - 2011-11-10

mrkipling Wrote:This is probably because the images are served by your XBMC web server, so you need to be logged in to your XBMC web interface in order to display them. I use AWX, so I log in to that and then the thumbnails display for me.

To get around this I added a feature a while ago - if you use HTTP basic auth in Maraschino then it embeds the username and password for your XBMC web server in the image URLs (so, http://user : pass@xbmcseveraddress:8080/whatever).

Long story short: enable basic auth in your Maraschino settings.py file, like so:

Code:
AUTH = {
  'username': 'whatever',
  'password': 'whatever',
}

and let me know if you're still having problems.

Actually, if you're still having problems then if you could let me know the URL for one of the broken images then that would help.

Long story short, I fixed it...
I enabled the AUTH in settings.py (not sure why I forgot this setting it up for Windows since I did it in Linux). After setting that it still didn't work but when I grabbed the image URL you requested I noticed something. When configuring the XBMC settings in Maraschino, using "localhost" for the server works for pulling the info, but not images obviously when viewed from a different system. I changed it from localhost to the IP address of that system and the images displayed almost instantly.


- mybrain87 - 2011-11-10

How can i update this from git, without losing all my configuration.

Doing : "cd /home/xbmc/.maraschino && git pull" results in the following:

Updating e14f944..fe9dbcf
error: Your local changes to '.gitignore' would be overwritten by merge. Aborting.
Please, commit your changes or stash them before you can merge.


- mrkipling - 2011-11-10

mybrain87 Wrote:How can i update this from git, without losing all my configuration.

Doing : "cd /home/xbmc/.maraschino && git pull" results in the following:

Updating e14f944..fe9dbcf
error: Your local changes to '.gitignore' would be overwritten by merge. Aborting.
Please, commit your changes or stash them before you can merge.

You could stash the changes, pull, and then re-apply them after pulling:

Code:
git stash
git pull
git stash pop

However, if you've modified a line which has also changed in the repository then you're going to have merge errors.

In your specific case it looks like you've just added stuff to the .gitignore file, so I would recommend moving your additions out of the .gitignore file and putting them in ".git/info/exclude" instead (as this file was designed to contain your own personal git ignores, and won't be affected by updates to the repository).

If you're still having problems pulling and you don't mind losing changes that you've made then you can do this:

Code:
git reset --hard HEAD
git pull



- mybrain87 - 2011-11-10

mrkipling Wrote:You could stash the changes, pull, and then re-apply them after pulling:

Code:
git stash
git pull
git stash pop

However, if you've modified a line which has also changed in the repository then you're going to have merge errors.

In your specific case it looks like you've just added stuff to the .gitignore file, so I would recommend moving your additions out of the .gitignore file and putting them in ".git/info/exclude" instead (as this file was designed to contain your own personal git ignores, and won't be affected by updates to the repository).

If you're still having problems pulling and you don't mind losing changes that you've made then you can do this:

Code:
git reset --hard HEAD
git pull

Thank you


- dannycorker - 2011-11-11

Archigos Wrote:Yes, download the Windows EXE version and for the database location, change it to this:
Code:
DATABASE = '/Users/Danny/.maraschino/maraschino.db'

After you change that, rerun this from the Maraschino directory
Code:
Python setup.py
Then:
Code:
python maraschino-cherrypy.py

I still get the same message when attempting to run setup :/


- gugahoi - 2011-11-11

mrkipling Wrote:The code which renders the add/edit application dialog is in "applications.py", and the function is "add_edit_application_dialog" (line 28). In this function you need to get a list of image files in the image directory. This is actually pretty simple as I added a helper function this morning which returns all files in a directory, filtered by extension (I did this for the "use random background image" setting). The code for it would look something like this:

Code:
icons = get_file_list('static/images/applications', ['.png', '.jpg'])

Pass it to the template in render_template, and in the template replace the text input with a select dropdown containing the list of icons.

I think that should pretty much do it! Any more questions then let me know.

Awesome. I did notice there was a function the seemed to get a directory listing. I thinks I've implemented it now. Pull request has already been made.


- Zarquon - 2011-11-11

First Off this looks great.

Second of all Help.

Ok I think I have it configured to run on Apache using another port. Using Port 7000. But when I bring up the settings Dialog and make my adjustments and try to click save NOTHING happens the dialog remains and nothing seems to save.


Edit: Not sure what the problem is but I worked around it by launching the Dev Server manually (sudo python maraschino.py) and making a few changes on the dev port 5000 and then switched back to 7000 and things seem to work.


- Archigos - 2011-11-11

dannycorker Wrote:I still get the same message when attempting to run setup :/

It's probably read/write issues being in a User folder, try placing the database outside of that to avoid requiring Admin Privileges. Sorry I didn't mention that before, slipped my mind since I run all my HTPC related apps (this, SB, CP, etc.) from C:\HTPC-Apps\ which solves the Admin problems.


- DejaVu - 2011-11-11

Wow - welcome back Zarquon! Wink

It is definitely permissions. Chmod'ing or Chowning will solve it in Linux.


- Zarquon - 2011-11-11

DejaVu Wrote:Wow - welcome back Zarquon! Wink

It is definitely permissions. Chmod'ing or Chowning will solve it in Linux.
Thanks finally getting back at this after a major project at work.

Not sure as it works when running on the dev port. I think it has to be the Apache setup. Only effects configuration, normal operation is fine.

Edit: Switched to using the CherryPy and now it all works fine.


- dannycorker - 2011-11-11

Archigos Wrote:It's probably read/write issues being in a User folder, try placing the database outside of that to avoid requiring Admin Privileges. Sorry I didn't mention that before, slipped my mind since I run all my HTPC related apps (this, SB, CP, etc.) from C:\HTPC-Apps\ which solves the Admin problems.

Still the same problem. Have moved the whole maraschino folder to C:\HTPC-Apps and have set database path to 'C:/HTPC-Apps/.maraschino/maraschino.db' and also tried 'HTPC-Apps/.maraschino/maraschino.db'. Both still give the same error. I think it must be to do with the easy installs, but I don't know what. If I run them now I get this message, which seems to indicate all is well:

Quote:Searching for Flask-SQLAlchemy
Best match: flask-sqlalchemy 0.15
Processing flask_sqlalchemy-0.15-py2.7.egg
flask-sqlalchemy 0.15 is already the active version in easy-install.pth

Using c:\python27\lib\site-packages\flask_sqlalchemy-0.15-py2.7.egg
Processing dependencies for Flask-SQLAlchemy
Finished processing dependencies for Flask-SQLAlchemy