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)



- gugahoi - 2011-12-26

@Mar2zz

I've created a patch for your fork for you to have an idea, it outputs basic things. You can download it here and in case you need any more help, just ask.

If you need help applying the patch, I found this website to be quite usefull.

It would be nice if you could develop it in a separate branch from your other modifications tho.

Oh, and also if you want to continue to discuss development, I would suggest doing it over at lighthouse so that we don't keep flooding this thread - https://maraschino.lighthouseapp.com/projects/85614-maraschino/overview


- Mar2zz - 2011-12-26

What has to come @ ['queue']? Python is always bugging me with:
TypeError: 'instancemethod' object is not subscriptable
or
keyerror

When this, in a independent testscript, gives me the name of the first torrent, as it should do:
Code:
transmission = transmissionrpc.Client(**params)
torrent = transmission.info(1)[1]

print torrent.name



- gugahoi - 2011-12-26

Mar2zz Wrote:What has to come @ ['queue']? Python is always bugging me with:
TypeError: 'instancemethod' object is not subscriptable
or
keyerror

When this, in a independent testscript, gives me the name of the first torrent, as it should do:
Code:
transmission = transmissionrpc.Client(**params)
torrent = transmission.info(1)[1]

print torrent.name

That was just an example. 'queue' is not actually a key in the dict. If you still want, just apply the patch and see my changes but someone else just submitted another pull request with exactly the same purpose.


- Mar2zz - 2011-12-26

Smile that one is ok Smile nice. I read his code and still don't really see what is happening to make it all work, there are so many different approaches.


- gugahoi - 2011-12-26

I know, there are tons of ways. I'll leave my patch there in case you want to see my approach, it is quite basic.

I've created an 'experimental' branch on the repo now. I'm not sure if I can merge pull requests into it or if they need to be started by the creators themselves. Therefore, just in case, could you create another pull request to that branch?

Actually, I think I found a way to do it myself so nevermind.


- Mar2zz - 2011-12-26

:p github can be difficult sometimes

About openelec, it has an built-in addonbuilder?
https://github.com/OpenELEC/OpenELEC.tv/blob/master/scripts/create_addon

Also sickbeard, couchpotato are allready built in. I need to run openelec to see how, but I like having an ubuntu-based OS too much to give it up. openelec gives me troubles in a virtualmachine (as in, won't install). So I can't write an addon script if I can't get acces to all the files of the couchpotato/sickbeard addon.


- gugahoi - 2011-12-26

Mar2zz Wrote::p github can be difficult sometimes

About openelec, it has an built-in addonbuilder?
https://github.com/OpenELEC/OpenELEC.tv/blob/master/scripts/create_addon

Also sickbeard, couchpotato are allready built in. I need to run openelec to see how, but I like having an ubuntu-based OS too much to give it up. openelec gives me troubles in a virtualmachine (as in, won't install). So I can't write an addon script if I can't get acces to all the files of the couchpotato/sickbeard addon.

Wouldn't an XBMC add-on by default work on OpenElec?


- remb0 - 2011-12-26

I have copied the github from Mar2zzz to my download folder.
I started the following commands (i hope that it make sense and someone can help me to get it work):

root ~/downloads/mar # cp settings_example.py settings.py
root ~/downloads/mar # python setup.py

my output on ssh:

Code:
root ~/downloads/mar # python setup.py
Traceback (most recent call last):
  File "setup.py", line 30, in <module>
    init_db()
  File "/storage/downloads/mar/lib/database.py", line 16, in init_db
    Base.metadata.create_all(bind=engine)
  File "/storage/downloads/mar/external/sqlalchemy/schema.py", line 2515, in cre                                   ate_all
    tables=tables)
  File "/storage/downloads/mar/external/sqlalchemy/engine/base.py", line 2230, i                                   n _run_visitor
    conn = self.contextual_connect(close_with_result=False)
  File "/storage/downloads/mar/external/sqlalchemy/engine/base.py", line 2340, i                                   n contextual_connect
    self.pool.connect(),
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 210, in connec                                   t
    return _ConnectionFairy(self).checkout()
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 371, in __init                                   __
    rec = self._connection_record = pool._do_get()
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 758, in _do_ge                                   t
    return self._create_connection()
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 174, in _creat                                   e_connection
    return _ConnectionRecord(self)
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 256, in __init                                   __
    self.connection = self.__connect()
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 316, in __conn                                   ect
    connection = self.__pool._creator()
  File "/storage/downloads/mar/external/sqlalchemy/engine/strategies.py", line 8                                   0, in connect
    return dialect.connect(*cargs, **cparams)
  File "/storage/downloads/mar/external/sqlalchemy/engine/default.py", line 280,                                    in connect
    return self.dbapi.connect(*cargs, **cparams)
sqlalchemy.exc.OperationalError: (OperationalError) unable to open database file                                    None None
root ~/downloads/mar # python maraschino.py

* Running on http://0.0.0.0:5000/
* Restarting with reloader
80.57.92.56 - - [26/Dec/2011 16:04:14] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/storage/downloads/mar/external/flask/app.py", line 1518, in __call__
    return self.wsgi_app(environ, start_response)
  File "/storage/downloads/mar/external/flask/app.py", line 1506, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/storage/downloads/mar/external/flask/app.py", line 1504, in wsgi_app
    response = self.full_dispatch_request()
  File "/storage/downloads/mar/external/flask/app.py", line 1264, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/storage/downloads/mar/external/flask/app.py", line 1262, in full_dispatch_request
    rv = self.dispatch_request()
  File "/storage/downloads/mar/external/flask/app.py", line 1248, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/storage/downloads/mar/lib/tools.py", line 29, in decorated
    return f(*args, **kwargs)
  File "/storage/downloads/mar/maraschino.py", line 55, in index
    for module in unorganised_modules:
  File "/storage/downloads/mar/external/sqlalchemy/orm/query.py", line 2057, in __iter__
    return self._execute_and_instances(context)
  File "/storage/downloads/mar/external/sqlalchemy/orm/query.py", line 2070, in _execute_and_instances
    close_with_result=True)
  File "/storage/downloads/mar/external/sqlalchemy/orm/query.py", line 2061, in _connection_from_session
    **kw)
  File "/storage/downloads/mar/external/sqlalchemy/orm/session.py", line 719, in connection
    close_with_result=close_with_result)
  File "/storage/downloads/mar/external/sqlalchemy/orm/session.py", line 723, in _connection_for_bind
    return self.transaction._connection_for_bind(engine)
  File "/storage/downloads/mar/external/sqlalchemy/orm/session.py", line 266, in _connection_for_bind
    conn = bind.contextual_connect()
  File "/storage/downloads/mar/external/sqlalchemy/engine/base.py", line 2340, in contextual_connect
    self.pool.connect(),
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 210, in connect
    return _ConnectionFairy(self).checkout()
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 371, in __init__
    rec = self._connection_record = pool._do_get()
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 758, in _do_get
    return self._create_connection()
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 174, in _create_connection
    return _ConnectionRecord(self)
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 256, in __init__
    self.connection = self.__connect()
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 316, in __connect
    connection = self.__pool._creator()
  File "/storage/downloads/mar/external/sqlalchemy/engine/strategies.py", line 80, in connect
    return dialect.connect(*cargs, **cparams)
  File "/storage/downloads/mar/external/sqlalchemy/engine/default.py", line 280, in connect
    return self.dbapi.connect(*cargs, **cparams)
OperationalError: (OperationalError) unable to open database file None None
80.57.92.56 - - [26/Dec/2011 16:04:14] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
80.57.92.56 - - [26/Dec/2011 16:04:14] "GET /?__debugger__=yes&cmd=resource&f=jquery.js HTTP/1.1" 200 -
80.57.92.56 - - [26/Dec/2011 16:04:14] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
80.57.92.56 - - [26/Dec/2011 16:04:14] "GET /?__debugger__=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1" 200 -
80.57.92.56 - - [26/Dec/2011 16:04:14] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
80.57.92.56 - - [26/Dec/2011 16:04:14] "GET /?__debugger__=yes&cmd=resource&f=source.png HTTP/1.1" 200 -
80.57.92.56 - - [26/Dec/2011 16:04:15] "GET /favicon.ico HTTP/1.1" 404 -
80.57.92.56 - - [26/Dec/2011 16:08:13] "GET /?__debugger__=yes&cmd=source&frm=160033780&s=msqfWkxCADzoZoHBCJYS HTTP/1.1" 200 -



the output on browser:
Code:
sqlalchemy.exc.OperationalError
OperationalError: (OperationalError) unable to open database file None None

Traceback (most recent call last)
File "/storage/downloads/mar/external/flask/app.py", line 1518, in __call__
return self.wsgi_app(environ, start_response)
File "/storage/downloads/mar/external/flask/app.py", line 1506, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/storage/downloads/mar/external/flask/app.py", line 1504, in wsgi_app
response = self.full_dispatch_request()
File "/storage/downloads/mar/external/flask/app.py", line 1264, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/storage/downloads/mar/external/flask/app.py", line 1262, in full_dispatch_request
rv = self.dispatch_request()
File "/storage/downloads/mar/external/flask/app.py", line 1248, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/storage/downloads/mar/lib/tools.py", line 29, in decorated
return f(*args, **kwargs)
File "/storage/downloads/mar/maraschino.py", line 55, in index
for module in unorganised_modules:
File "/storage/downloads/mar/external/sqlalchemy/orm/query.py", line 2057, in __iter__
return self._execute_and_instances(context)
File "/storage/downloads/mar/external/sqlalchemy/orm/query.py", line 2070, in _execute_and_instances
close_with_result=True)
File "/storage/downloads/mar/external/sqlalchemy/orm/query.py", line 2061, in _connection_from_session
**kw)
File "/storage/downloads/mar/external/sqlalchemy/orm/session.py", line 719, in connection
close_with_result=close_with_result)
File "/storage/downloads/mar/external/sqlalchemy/orm/session.py", line 723, in _connection_for_bind
return self.transaction._connection_for_bind(engine)
File "/storage/downloads/mar/external/sqlalchemy/orm/session.py", line 266, in _connection_for_bind
conn = bind.contextual_connect()
File "/storage/downloads/mar/external/sqlalchemy/engine/base.py", line 2340, in contextual_connect
self.pool.connect(),
File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 210, in connect
return _ConnectionFairy(self).checkout()
File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 371, in __init__
rec = self._connection_record = pool._do_get()
File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 758, in _do_get
return self._create_connection()
File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 174, in _create_connection
return _ConnectionRecord(self)
File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 256, in __init__
self.connection = self.__connect()
File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 316, in __connect
connection = self.__pool._creator()
File "/storage/downloads/mar/external/sqlalchemy/engine/strategies.py", line 80, in connect
return dialect.connect(*cargs, **cparams)
File "/storage/downloads/mar/external/sqlalchemy/engine/default.py", line 280, in connect
return self.dbapi.connect(*cargs, **cparams)
OperationalError: (OperationalError) unable to open database file None None



- gugahoi - 2011-12-26

Okay. I've taken the liberty to create a separate branch wits all the pull requests. It seems to be working on both my computers (OS X and xubuntu) so I believe it should work for anyone who may want to try it. The only thing I cannot be 100% sure is wether it really depends on any "easy_install" as both my computers already had them previously.

This branch now should have an HDD module compatible with Windows, Transmission Module and the ability to manage episode's status from within the sickbeard manager itself.

Image

If you're using git from MrK, it should be a simple couple of commands:
Code:
git fetch origin
git checkout experimental

Otherwise, just download it from here: https://github.com/mrkipling/maraschino/tree/experimental


- gugahoi - 2011-12-26

remb0 Wrote:I have copied the github from Mar2zzz to my download folder.
I started the following commands (i hope that it make sense and someone can help me to get it work):

root ~/downloads/mar # cp settings_example.py settings.py
root ~/downloads/mar # python setup.py

my output on ssh:

Code:
root ~/downloads/mar # python setup.py
Traceback (most recent call last):
  File "setup.py", line 30, in <module>
    init_db()
  File "/storage/downloads/mar/lib/database.py", line 16, in init_db
    Base.metadata.create_all(bind=engine)
  File "/storage/downloads/mar/external/sqlalchemy/schema.py", line 2515, in cre                                   ate_all
    tables=tables)
  File "/storage/downloads/mar/external/sqlalchemy/engine/base.py", line 2230, i                                   n _run_visitor
    conn = self.contextual_connect(close_with_result=False)
  File "/storage/downloads/mar/external/sqlalchemy/engine/base.py", line 2340, i                                   n contextual_connect
    self.pool.connect(),
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 210, in connec                                   t
    return _ConnectionFairy(self).checkout()
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 371, in __init                                   __
    rec = self._connection_record = pool._do_get()
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 758, in _do_ge                                   t
    return self._create_connection()
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 174, in _creat                                   e_connection
    return _ConnectionRecord(self)
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 256, in __init                                   __
    self.connection = self.__connect()
  File "/storage/downloads/mar/external/sqlalchemy/pool.py", line 316, in __conn                                   ect
    connection = self.__pool._creator()
  File "/storage/downloads/mar/external/sqlalchemy/engine/strategies.py", line 8                                   0, in connect
    return dialect.connect(*cargs, **cparams)
  File "/storage/downloads/mar/external/sqlalchemy/engine/default.py", line 280,                                    in connect
    return self.dbapi.connect(*cargs, **cparams)
sqlalchemy.exc.OperationalError: (OperationalError) unable to open database file                                    None None

Did you edit the settings before running "python setup.py"? May I also ask that you download from the experimental branch I posted above?


- remb0 - 2011-12-26

gugahoi Wrote:Did you edit the settings before running "python setup.py"? May I also ask that you download from the experimental branch I posted above?

I did edit the settings. I shall test your branch asap.


- gugahoi - 2011-12-26

remb0 Wrote:I did edit the settings. I shall test your branch asap.

Before I forget: please post your OS info as well. If possible, let me know the DB path you chose in settings.py and any information you may think might be relevant. Did you use easy_install at all to get any components?

Just a heads up: if it didn't work with Mar2zz's it prob won't work with mine as I just used his modifications but that branch does have more features.


- _Mikie_ - 2011-12-26

gugahoi your branch works for me on windows 7. Used this guide originally to setup weeks ago and didn't need to do anything new, just copied files and ran setup.

Hard drives work.

DATABASE = 'C:/HTPC/Maraschino/maraschino.db'

I really think we need an ini file and auto data base setup like sickbeard. Would also be awesome to have a shutdown button built in so I don't need to end tasks.

Cheers

EDIT: In the sickbeard module when viewing show information like in season 1 there is an overlap with quality and airdate. Also Can we add the ability to pause a show from the module? Could it be possible that in the coming soon list like the default front page if you click the title of a show it takes you to sickbeard. Could that be a new tab so maraschino stays open. Also if you click on the image could it take you to the show info in the module because there's no quick way to jump to a show if its airing tomorrow for example. Let me know if I need to explain better


- Mar2zz - 2011-12-26

I have made a debian installerfile for maraschino. FIXED *But how can I clone the experimental branch directly?

Now it gives me this:
Code:
mars@laptop:~/Dropbox/Public/LaSi_repo$ sudo dpkg -i maraschino.deb
Selecteren van voorheen niet geselecteerd pakket maraschino.
(Database inlezen ... 221453 files and directories currently installed.)
Uitpakken van maraschino (uit maraschino.deb) ...
Instellen van maraschino (2011.12.26) ...
Cloning into /opt/maraschino...
remote: Counting objects: 4101, done.
remote: Compressing objects: 100% (1976/1976), done.
remote: Total 4101 (delta 2132), reused 3991 (delta 2025)
Receiving objects: 100% (4101/4101), 20.92 MiB | 498 KiB/s, done.
Resolving deltas: 100% (2132/2132), done.
Adding system startup for /etc/init.d/maraschino ...
* Maraschino: daemon not enabled, aborting. See /etc/default/maraschino
Processing triggers for ureadahead ...
mars@laptop:~/Dropbox/Public/LaSi_repo$ sudo nano /etc/default/maraschino
mars@laptop:~/Dropbox/Public/LaSi_repo$ sudo service maraschino start
* Starting Maraschino                                                                                                                        Traceback (most recent call last):
  File "maraschino.py", line 1, in <module>
    from flask import Flask, jsonify, render_template, request
ImportError: No module named flask

Which is because it's mr Kipling's default repo without integrated dependencys.

Another question: I have a very hard time daemonizing maraschino. Both the maraschino-cherrypy.py and maraschino.py won't daemonize? Anyone?


- percula - 2011-12-27

A thought on the "Recently Added" module(s).

So its possible to see if the episode or movie has been watched or not.

It would be cool if there was a toggle setting of "show watched episodes/movies". Checked (could be a default setting) shows all recently added, unchecked it does not show "watched".