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)



- Archigos - 2011-11-09

I'm going to leave the original guide here, but for a newer, more detailed version you can visit here. This page includes some tips and troubleshooting as well.

Instructions for installing on Windows 7 or Windows Server 2008 R2
--Edited with some notes at bottom--

If you haven't done so already, install Python 2.7 and Python Setup-tools.

Once these are installed, open an Administrative Command Prompt (Click Start and in the run box type 'cmd' and right-click on 'cmd' and "Run as Administrator")

In Command Prompt (Note: You may or may not see different errors while running these commands, if you do, it's because of the packages that are being downloaded, there is nothing you can do about it and it will still run fine.)
Code:
cd %SystemDrive%\Python27\Scripts
Once in the script folder, do the following commands (one per line)
Code:
easy_install cherrypy
easy_install Flask
easy_install Flask-SQLAlchemy
easy_install jsonrpclib
Once each of those have been installed, change back to the folder you have downloaded the Maraschino files to and:
Code:
copy settings_example.py settings.py
notepad settings.py
Set the correct path to the Database file.
Do NOT use "C:" as part of your database location: Ex. "/HTPC-Apps/Maraschino/maraschino.db" and when possible, make sure there are no spaces in the directory name. Using "/maraschino.db" for database setting will put it on the root of your C drive.
While inside the settings.py, make sure to un-comment the AUTH section and fill that in with the details for your XBMC Web Interface (this is NOT for MySQL details) as well as un-commenting the Port. If you use CouchPotato on default settings it will be using port 5000 so change this to port 5001 for example.

Next (still in command prompt)
Code:
python setup.py
start python maraschino-cherrypy.py
Only do the second command if the first one stated it was successful. Congrats.

If you want this to run on each boot, the easiest way is to create a bat file and put it in your Startup folder (this method only works while someone is logged in) there are other ways of making it run without log in.

Maraschino.bat
Code:
cd "Path to Maraschino"
Python maraschino-cherrypy.py

--Notes--
Due to the way easy_install works, you may find that after you installed all five packages, you may want to run the command to install Cherrypy a second time, it will overwrite itself and correct any issues. Also make sure to exclude the drive letter from your database settings as stated above, that will account for a majority of the issues users seem to have.

If you get a "Socket Error" while trying to run the CherryPy version, it is most likely due to something else already using port 7000 and a quick change to settings.py to port 7001 fixes it. Below is an example settings.py for Windows:

Code:
# For Windows Systems, do NOT include the C: and un-comment one DATABASE line below.
# This setting will put your database in the root of your C drive
# DATABASE = '/maraschino.db'
# If you want it in your Maraschino directory, change/un-comment this line
# DATABASE = '/PATHtoMARASCHINO/maraschino.db'
# Example: '/HTPC-Apps/Maraschino/maraschino.db'

# Windows should be serving using CherryPy (maraschino-cherrypy.py)
# If you get a "Sockets Error" change the CHERRYPY_PORT to 7001 below

CHERRYPY_PORT = 7000

# If your XBMC Web Interface (XBMC Network Settings) uses a username/password,
# un-comment and enter them below:

# AUTH = {
#     'username': 'xbmc',
#     'password': 'xbmc'
# }

# The below port is required for the built in Dev-Server if you run 'maraschino.py' instead of CherryPy.
PORT = 5000
A complete/clean settings.py should look like the following: (it's the one I use)
Code:
DATABASE = '/HTPC-Apps/Maraschino/maraschino.db'
CHERRYPY_PORT = 7000
PORT = 5001
AUTH = {
    'username': 'xbmc',
    'password': 'xbmc'
}



- DejaVu - 2011-11-09

Archigos Wrote:The main reason for my post is to ask if the Hard Drive Widget is hard coded for Linux paths only since I can't figure out how to get any Windows Drives to show (they all come up with Invalid Path or something like that).
The code written is only supportive for Linux at this time because getting Python to read both OS's using one script is not an easy feat.

Mentioned above, I recommended a script that could possibly do it, but MrK does not use Windows and has no real way to test. He did mention a VM, but we shall just have to be patient! Wink

Another work around I have made is to mount Windows drives to Linux and tell the script where the mounts are - that works perfectly! Wink

A couple of minor observations I would like to ask would be the ability to 'Nickname' the drives.
Instead of the Path showing, perhaps a way to Name the drive to Movies 1, Movies 2, Movies 3, etc - Yes, my library is pretty big! Big Grin

And
albeit minor - Kb, Mb, Gb & Tb. Is there a way to specify rather than 0.50Gb showing or 1,893Gb...?

PHP does it thus - can it be adjusted for Python?
Code:
<?php

function ByteSize($bytes)
    {
    $size = $bytes / 1024;
    if($size < 1024)
        {
        $size = number_format($size, 1);
        $size .= ' KB';
        }
    else
        {
        if($size / 1024 < 1024)
            {
            $size = number_format($size / 1024, 0);
            $size .= ' MB';
            }
        else if ($size / 1024 / 1024 < 1024)  
            {
            $size = number_format($size / 1024 / 1024, 0);
            $size .= ' GB';
            }
        
            else if ($size / 1024 / 1024 / 1024 < 1024)  
            {
            $size = number_format($size / 1024 / 1024/ 1024, 1);
            $size .= ' TB';
            }
        }
    return $size;
    }
?>



- Archigos - 2011-11-09

DejaVu Wrote:The code written is only supportive for Linux at this time because getting Python to read both OS's using one script is not an easy feat.

Mentioned above, I recommended a script that could possibly do it, but MrK does not use Windows and has no real way to test. He did mention a VM, but we shall just have to be patient! Wink

Another work around I have made is to mount Windows drives to Linux and tell the script where the mounts are - that works perfectly! Wink

1 Minor thing I would like to ask would be the ability to 'Nickname' the drives.
Instead of the Path showing, perhaps a way to Name the drive to Movies 1, Movies 2, Movies 3, etc - Yes, my library is pretty big! Big Grin

That would/could work, except for the fact that the only Linux system I have is a secondary OS on my laptop that I rarely use, therefore no running Linux to mount the drives in. It's no problem and it's something I can wait for, to me, the HDD widget is one of those "don't really need it, but would be cool if it was there" so no hurry.


- Zenshi - 2011-11-09

Hey MrK,

Image

Any clues why this is happening to me?
Maybe because i'm using raid volumes?

Cheers,

Zenshi.


- niietzshe - 2011-11-09

Those "headphones" and "subsonic" apps look great! I'll install them when I get back from dinner. The icons look great as well, mind sharing them in a zip so we don't have to go and make our own?

I noticed someone mentioned NAS install. I myself am currently building a a FreeNAS system with the hope of running everything that is on my revo on that. It runs under FreeBSD I believe. A lot of research is a head of me without the actual box in front of me, but I don't see why all this stuff can't be installed if the dependencies are all there (which I hope they are).

Again, good job! I'm getting my new Tomato Router tomorrow, which will hopefully solve a few problems I have accessing the interface from outside of my network. Love it!

Christian


- Aenima99x - 2011-11-09

Zenshi Wrote:Hey MrK,

Image

Any clues why this is happening to me?
Maybe because i'm using raid volumes?

Cheers,

Zenshi.

Use the actual mount point.....I've got a RAID5 setup and it shows fine. So instead of /dev/md0 I have it as my mount point (/home/xbmc/Media)


- Archigos - 2011-11-10

niietzshe Wrote:Those "headphones" and "subsonic" apps look great! I'll install them when I get back from dinner. The icons look great as well, mind sharing them in a zip so we don't have to go and make our own?

I noticed someone mentioned NAS install. I myself am currently building a a FreeNAS system with the hope of running everything that is on my revo on that. It runs under FreeBSD I believe. A lot of research is a head of me without the actual box in front of me, but I don't see why all this stuff can't be installed if the dependencies are all there (which I hope they are).

Again, good job! I'm getting my new Tomato Router tomorrow, which will hopefully solve a few problems I have accessing the interface from outside of my network. Love it!

Christian

You can grab any of the HTPC related icons from my server here... just click the icon you want so you go to that page, then right-click and save as. If you right-click and save as from the index page of them you 'may' get stretched icons since they are smaller than the thumbnails on that page.


- DejaVu - 2011-11-10

All the HTPC Images are already part of the Maraschino Git.

Check in /static/images/applications Wink
To use one, simply type the filename when asked for the image to use.


- Archigos - 2011-11-10

DejaVu Wrote:All the HTPC Images are already part of the Maraschino Git.

Check in /static/images/applications Wink
To use one, simply type the filename when asked for the image to use.

I'm too lazy to check right now, but I think I added a few that aren't in Maraschino to that link... :p

I'm going to bed now Big Grin


- niietzshe - 2011-11-10

Thanks. Yeah I think only XBMC and Sabnzbd is in there. But I haven't updated for a day or two Wink


- mrkipling - 2011-11-10

snoopy1492 Wrote:I thought of that and I still implemented it because in the worst case scenario the time will be wrong for 5 seconds then it will be corrected by the request to xbmc.

Anyway, I will still try to implement the possibility to seek Wink

Excellent! I was planning on implementing click-to-seek on the progress bar, but if you're thinking of giving it a go then I'll focus on other things for now Smile


- gugahoi - 2011-11-10

Dude, this project seems to be advancing really quickly! I gotta go get me the latest version to see how it performs!!

Can't wait for next week when I finally have some free time and can start my attempt at some python coding!


- mrkipling - 2011-11-10

Archigos Wrote:Instructions for installing on Windows 7 or Windows Server 2008 R2

Thanks for the instructions, I'm sure that Windows users will find them very useful.

I noticed that you're using Flask's built-in dev server though which is pretty unstable. If you installed CherryPy and and changed "python maraschino.py" to "python maraschino-cherrypy.py" then it should (I imagine, although obviously haven't tested in Windows) run using CherryPy's far more stable server. Probably the better option if you're running this on a server.

If you're up for testing this and could let me know then that would be fantastic, otherwise I'll set up a VM at some point and have a go myself. Will add the instructions to the website soon!


- mrkipling - 2011-11-10

DejaVu Wrote:A couple of minor observations I would like to ask would be the ability to 'Nickname' the drives.
Instead of the Path showing, perhaps a way to Name the drive to Movies 1, Movies 2, Movies 3, etc - Yes, my library is pretty big! Big Grin

Yep, I agree that would be useful, even I would prefer that!

I need to figure out a database migration system for this project in order to do it, but it has to be done at some point anyway. It's on the list Smile

DejaVu Wrote:And
albeit minor - Kb, Mb, Gb & Tb. Is there a way to specify rather than 0.50Gb showing or 1,893Gb...?

Flask has a nice built-in filter ("filesizeformat") but it wasn't working nicely for me at the time. I'll have a play around with it when I get round to adding the labels/naming stuff.


- Archigos - 2011-11-10

mrkipling Wrote:Thanks for the instructions, I'm sure that Windows users will find them very useful.

I noticed that you're using Flask's built-in dev server though which is pretty unstable. If you installed CherryPy and and changed "python maraschino.py" to "python maraschino-cherrypy.py" then it should (I imagine, although obviously haven't tested in Windows) run using CherryPy's far more stable server. Probably the better option if you're running this on a server.

If you're up for testing this and could let me know then that would be fantastic, otherwise I'll set up a VM at some point and have a go myself. Will add the instructions to the website soon!

I tried doing that and not sure exactly why, but I assume it's a Windows issue, but when you run the CherryPy version it throws errors and refuses to run, that's why I wrote those that way since it worked without a problem. If you'd like, I can try running the CherryPy version again and screenshot the error for you.

--Edit--
This is the error you get running 'python maraschino-cherrypy.py'.
Code:
Traceback (most recent call last):
   File "maraschino-cherrypy.py", line 1, in <module>
      from cherrypy import wsgiserver
ImportError: No module named cherrypy