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)



- DejaVu - 2011-12-23

I've just had to reinstall my system and I'm having trouble getting it to run using the CherryPY instructions.

The PATH is setup in settings.py.

As fas as I can tell, everything is installed, but I'm getting this error -

Code:
root@XBMCLive:/home/xbmc/.maraschino# easy_install Flask-SQLAlchemy
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 /usr/local/lib/python2.7/dist-packages/Flask_SQLAlchemy-0.15-py2.7.egg
Processing dependencies for Flask-SQLAlchemy
Finished processing dependencies for Flask-SQLAlchemy
root@XBMCLive:/home/xbmc/.maraschino# python setup.py
[b]You need to specify DATABASE in settings.py, and ensure that Flask-SQLAlchemy is installed.[/b]
root@XBMCLive:/home/xbmc/.maraschino#

--EDIT
Nevermind - Typo again! Doh.

--EDIT2
Now settings will not save and I cannot add Modules... Write Permissions?


- Mar2zz - 2011-12-23

@Mr. Kipling:
This project is great, I really love how it comes together. I have some remarks though.

Files in /maraschino become cluttered. Also the dependency's are.
I know it's an early 0.1 version but it looks messy.

All modules should go in a subfolder called modules or something.
And cherrypy, flask, sql-alchemy should be made local. I thought that was just a matter of downloading the sources, copy it into maraschino directory and use
import cherrypy
or put it in a folder called lib and do:
import lib.flask
import lib.flask-sqlalchemy

Install is much easier that way and you will not be presented with sudden changes in those python-repo's that could break your code. And if you need new features that are in them, just renew your source, only when you want to.

In this case, all maraschino users are using the exact same library-versions of those dependency's, so you are in control of solving issues and conflicts also. When Eden hits the street Maraschino will be a lot more popular I think, it could rocket in users, and also in questions/bugreports/issues/noobiequestions etc.

I am not sure about all the above, I am no python-hero, but that is how I understand how Sickbeard, Couchpotato and other manage python-library's they use.


- N3MIS15 - 2011-12-23

Agreed Mar2zz
my setup would benefit from have dependencies included in source as i have to reinstall them every boot on my unraid server.

it would also make the setup process easier.


- Mar2zz - 2011-12-24

I fiddled around with it a bit.

It comes to this:
drop source in a subfolder. Throw an empty __init__.py inside that subfolder.

now instead of
Code:
from flask import filea, fileb, filec
in a python file you just do
Code:
import subfolder.flask.filea
or
Code:
from subfolder.flask import filea,fileb,filec

This can also be done for all plugins. Create a subfolder called plugins, drop all plugins like sickbeard and stuff inside with an __init__.py and all plugins can be imported elsewhere with import plugins.sickbeard for example.

My fork is now really messed up, got kinda lost in how things are arranged inside the code. There are some more things that need attention.
Like a good configparser instead of a settings.py it would be great to have a config.ini.

I could hop in coding, but it's hard to get an overview now because dependencys are outside maraschino's directory, so I have to spend a lot of time to find files to read what they do to understand what's going on. If Mr. Kipling manages to clean up code/files/dependency's it's easier for others to climb aboard.

Some progress in making it independend of easy_install is here:
https://github.com/Mar2zz/maraschino


- gugahoi - 2011-12-24

Mar2zz Wrote:I fiddled around with it a bit.

It comes to this:
drop source in a subfolder. Throw an empty __init__.py inside that subfolder.

now instead of
Code:
from flask import filea, fileb, filec
in a python file you just do
Code:
import subfolder.flask.filea
or
Code:
from subfolder.flask import filea,fileb,filec

This can also be done for all plugins. Create a subfolder called plugins, drop all plugins like sickbeard and stuff inside with an __init__.py and all plugins can be imported elsewhere with import plugins.sickbeard for example.

My fork is now really messed up, got kinda lost in how things are arranged inside the code. There are some more things that need attention.
Like a good configparser instead of a settings.py it would be great to have a config.ini.

I could hop in coding, but it's hard to get an overview now because dependencys are outside maraschino's directory, so I have to spend a lot of time to find files to read what they do to understand what's going on. If Mr. Kipling manages to clean up code/files/dependency's it's easier for others to climb aboard.

Some progress in making it independend of easy_install is here:
https://github.com/Mar2zz/maraschino

GREAT WORK MARZ! I have used your script a couple of times lately and was going to point out Maraschino to you so you could add to it but if you can jump in and help coding, it's even better! One question: will it add a lot to the size?


- N3MIS15 - 2011-12-24

i downloaded the dependencies with intent on making an unraid pkg, they cam to about 3.5 meg, but they had sample/test files with them too. i think you could probly half that.


- Mar2zz - 2011-12-24

You shouldn't compare size. It's the same size as you add all sizes from all downloaded packages through easy_install. As Nemesis says, one could throw away stuff that isn't needed.

Also, I want to add maraschino to my script. Could be done allready, but depending on 5 packages from pypi-repo kinda holds me back.


- gugahoi - 2011-12-24

MarkHT Wrote:sorry if this has already been covered in this thread. But can someone show me how to extend the "recently added movies" (module?) so i can see the full posters?

Image

There is no way to do that. MrK probably forgot to modify some CSS when he switched fanart to posters and should be an easy fix next time he gets to update it. Otherwise, modifying the css is extremely easy to fix that.

Mar2zz Wrote:You shouldn't compare size. It's the same size as you add all sizes from all downloaded packages through easy_install. As Nemesis says, one could throw away stuff that isn't needed.

Also, I want to add maraschino to my script. Could be done allready, but depending on 5 packages from pypi-repo kinda holds me back.

I was just wandering. I know they have to be downloaded anyway and it would make installation easier so it's definitely a no-brainer.


- Mar2zz - 2011-12-24

My first pull request is online. cherrypy and jsonrpclib were easy to add local.
flask-sqlalchemy is giving me a headache right now, but tackling that atm.

install comes to this now: git clone && easy_install flask && easy_install flask-sqlalchemy.
create settings.py, run setup.py and done.


- N3MIS15 - 2011-12-24

i know almost nothing about git, but if the dependencies are added to the source, when updating source they could be ignored right?


- Mar2zz - 2011-12-24

I have done it! Total independent maraschino here: https://github.com/Mar2zz/maraschino

local dependencys have one great benefit for developers: updates to external packages are ignored until the developer imports them.

The initial download will be bigger, but once downloaded git pull will only download differences.

A setup with my repo should be this now:
git clone https://github.com/Mar2zz/maraschino
cp settings_example.py settings.py
# edit settings.py
python setup.py
python maraschino.py
Done!

Works on my machine, which is running Oneiric desktop.


- N3MIS15 - 2011-12-24

Great work Mar2zz, i will try your git repo on my unraid server and let you know how it goes.


- Mar2zz - 2011-12-24

Ok great. Maraschino is now a 20 Mb download, kinda big. But I tested it now on my 11.10 Oneiric 64bit desktop and my 10.4 Lucid 32bit headless server. Works on both Smile


- N3MIS15 - 2011-12-24

getting error.

[email]root@UNRAID:/mnt/cache/.custom[/email]/maraschino# python maraschino-cherrypy.py
Traceback (most recent call last):
File "maraschino-cherrypy.py", line 2, in <module>
from maraschino import app
File "/mnt/cache/.custom/maraschino/maraschino.py", line 1, in <module>
from flask import Flask, jsonify, render_template, request
File "/mnt/cache/.custom/maraschino/flask/__init__.py", line 17, in <module>
from werkzeug.exceptions import abort
ImportError: No module named werkzeug.exceptions

I downloaded zip from github webpage, file was only 3.5meg


- Mar2zz - 2011-12-24

use python maraschino.py to start it. A cherrypyserver will listen on port 5000 then. I will try to address your issue.

What version of python do you use? (python --version in terminal)

I tried python maraschino-cherrypy.py too, but it doesn't give me that error.

When downloaded from github it inflates to 20 megs. 3.5 Mb isn't that big after all. Smile