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)



- N3MIS15 - 2011-12-30

no dice, seems some code from Mar2zz commits is missing from maraschino.py

Code:
import sys
import os

rundir = os.path.dirname(os.path.abspath(__file__))

try:
    frozen = sys.frozen
except AttributeError:
    frozen = False

# Define path based on frozen state
if frozen:
    path_base = os.environ['_MEIPASS2']
    rundir = os.path.dirname(sys.executable)
    #path_base = os.path.dirname(sys.executable)
else:
    path_base = rundir

# Include paths
sys.path.insert(0, path_base)
sys.path.insert(0, os.path.join(path_base, 'plugins'))
sys.path.insert(0, os.path.join(path_base, 'external'))

should go before anything in maraschino.py

Also after i added that code i am getting: You need to specify a database in settings.py.
I have a settings.pyc so the file is being used.

EDIT: Should note that i am using an unraid build that requires all dependencies within maraschino to run, they are not installed on the machine.
EDIT2: "sys.path.insert(0, os.path.join(path_base, 'plugins'))" should be changed to "sys.path.insert(0, os.path.join(path_base, 'modules'))" if im not mistaken (im using a build a few days old from mar2zz as my 'stable'


- gugahoi - 2011-12-30

N3MIS15 Wrote:no dice, seems some code from Mar2zz commits is missing from maraschino.py

Code:
import sys
import os

rundir = os.path.dirname(os.path.abspath(__file__))

try:
    frozen = sys.frozen
except AttributeError:
    frozen = False

# Define path based on frozen state
if frozen:
    path_base = os.environ['_MEIPASS2']
    rundir = os.path.dirname(sys.executable)
    #path_base = os.path.dirname(sys.executable)
else:
    path_base = rundir

# Include paths
sys.path.insert(0, path_base)
sys.path.insert(0, os.path.join(path_base, 'plugins'))
sys.path.insert(0, os.path.join(path_base, 'external'))

should go before anything in maraschino.py

Also after i added that code i am getting: You need to specify a database in settings.py.
I have a settings.pyc so the file is being used.

EDIT: Should note that i am using an unraid build that requires all dependencies within maraschino to run, they are not installed on the machine.
EDIT2: "sys.path.insert(0, os.path.join(path_base, 'plugins'))" should be changed to "sys.path.insert(0, os.path.join(path_base, 'modules'))" if im not mistaken (im using a build a few days old from mar2zz as my 'stable'

I've made these changes. It seems to work when running from my repo's directory. Will try a fresh download.


- N3MIS15 - 2011-12-30

got it.
line 114 maraschino.py

from database import *

should be

from lib.database import *


- gugahoi - 2011-12-30

N3MIS15 Wrote:got it.
line 114 maraschino.py

from database import *

should be

from lib.database import *

Nice! Pushed now. Will try a fresh install again.


- N3MIS15 - 2011-12-30

cant seem to get anything from newznab module
using https://nzb.su/ and my api key (copy paste from sickbeard)


- gugahoi - 2011-12-30

N3MIS15 Wrote:cant seem to get anything from newznab module
using https://nzb.su/ and my api key (copy paste from sickbeard)

use
Code:
nzb.su



- N3MIS15 - 2011-12-30

did the trick, now i cant seem to get the transmission module running Confused

url= 192.168.1.66
port= 8085

i have transmissionrpc installed
is there anything else config-wise needed? i had mar2zz's transmission module giving me torrent names so i am assuming this should work with the settings ive put in..


- gugahoi - 2011-12-30

N3MIS15 Wrote:did the trick, now i cant seem to get the transmission module running Confused

url= 192.168.1.66
port= 8085

i have transmissionrpc installed
is there anything else config-wise needed? i had mar2zz's transmission module giving me torrent names so i am assuming this should work with the settings ive put in..

Pull again and give it a try.

@Mar2zz: would you be able to give it a look and see why it won't import the transmissionrpc library in the external folder?


- N3MIS15 - 2011-12-30

mar2zz's changes in maraschino.py were missing again. after adding them in i got transmission runng, thanks gugahoi

just noticed error message from transmissionrpc
Code:
/mnt/cache/.custom/maraschinotest/external/transmissionrpc/client.py:34: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  'msg': error.message,



- gugahoi - 2011-12-30

N3MIS15 Wrote:mar2zz's changes in maraschino.py were missing again. after adding them in i got transmission runng, thanks gugahoi

just noticed error message from transmissionrpc
Code:
/mnt/cache/.custom/maraschinotest/external/transmissionrpc/client.py:34: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  'msg': error.message,

I keep overlooking them because they aren't in the lastest pull request, sorry. Should now be able to use the internal transmissionrpc library.

I don't get that error btw. What were you doing when you got it?


- N3MIS15 - 2011-12-30

seems to happen when it looses connection to transmission server. not a maraschino problem i guess

Another 1 Tongue
Code:
/mnt/cache/.custom/maraschinotest/modules/sickbeard.py:240:
DeprecationWarning: In future flask releases etags will no longer be
generated for file objects passed to the send_file function because this
behaviour was unreliable.  Pass filenames instead if possible, otherwise attach
an etag yourself based on another value
  return send_file(img, mimetype='image/jpeg')



- N3MIS15 - 2011-12-30

Suggestion for newznab module, in settings have options for both tv and movies with variable of sd and hd. It was just fetching alot of german stuff i wasnt interested in. I edited newznab.py to fetch the catagories i wanted, but it would be nice to have settings for them.


- gugahoi - 2011-12-30

N3MIS15 Wrote:Suggestion for newznab module, in settings have options for both tv and movies with variable of sd and hd. It was just fetching alot of german stuff i wasnt interested in. I edited newznab.py to fetch the catagories i wanted, but it would be nice to have settings for them.

I suggest you make these here: http://maraschino.lighthouseapp.com/projects/85614-maraschino/overview

otherwise we might not find them in the thread anymore.


- Mar2zz - 2011-12-30

N3MIS15 Wrote:Maybe default path should be app root and only require settings.py to overwrite? Nod

EDIT: must have posted while i was writing this gugahoi

Thats an easy one.
In commandline branch I also added the option to create/use a database with the command:
python maraschino.py --database=/path/to/database

This overwrites settings.py's database setting.
Also ports can be forced with python maraschino.py --port=5500 for example. This is great for running multiple maraschino instances from 1 sourcefolder.

Also working on daemonize mode and creating pidfile, but the wsgi-cherrypy is giving me a headache in that (gives error 500 @ http). Why is wsgi used by the way? the flask server can be run independent from apache too. Disable debugging and it's silent.

Can mr Kipling elaborate on that? Remove the cherrypy server is my idea.


- gugahoi - 2011-12-30

Mar2zz Wrote:Thats an easy one.
In commandline branch I also added the option to create/use a database with the command:
python maraschino.py --database=/path/to/database

This overwrites settings.py's database setting.
Also ports can be forced with python maraschino.py --port=5500 for example. This is great for running multiple maraschino instances from 1 sourcefolder.

Also working on daemonize mode and creating pidfile, but the wsgi-cherrypy is giving me a headache in that (gives error 500 @ http). Why is wsgi used by the way? the flask server can be run independent from apache too. Disable debugging and it's silent.

Can mr Kipling elaborate on that? Remove the cherrypy server is my idea.

I'll have a look at that pull request later on and try to make it install db to root dir if no settings.py is found. If you guys have time to do this before and make a pull request (it would actually be a good addition to Pull Request #23.

I have also added the ability to add a new show to sb from maraschino! You can now use sb's thetvdb search function and select which show you'd like to add, all from the sb module. At the moments it uses sb's default settings but I may add options to customise further. Please test and give me feedback! Will go to bed now.