diff --git a/couchpotato/static/scripts/couchpotato.js b/couchpotato/static/scripts/couchpotato.js index 644e4f7..d7ae68c 100644 --- a/couchpotato/static/scripts/couchpotato.js +++ b/couchpotato/static/scripts/couchpotato.js @@ -87,7 +87,7 @@ var CouchPotato = new Class({ if(current_url == self.current_url) return; - self.route.parse(url); + self.route.parse(); var page_name = self.route.getPage().capitalize(); var action = self.route.getAction(); var params = self.route.getParams(); @@ -190,10 +190,10 @@ var Route = new Class({ self.defaults = defaults }, - parse: function(url_string){ + parse: function(){ var self = this; - var path = History.getPath().replace(App.getOption('base_url'), '/') + var path = History.getPath().replace(App.getOption('base_url'), '/').replace(Api.getOption('url'), '/') var current = path.replace(/^\/+|\/+$/g, '') var url = current.split('/') diff --git a/couchpotato/templates/_desktop.html b/couchpotato/templates/_desktop.html index b517fe7..e459d95 100644 --- a/couchpotato/templates/_desktop.html +++ b/couchpotato/templates/_desktop.html @@ -81,7 +81,7 @@ File.Type.setup({{ fireEvent('file.types', single = True)|tojson|safe }}); App.setup({ - 'base_url': {{ request.path|tojson|safe }}, + 'base_url': {{ url_for('web.index')|tojson|safe }}, 'args': {{ env.get('args')|tojson|safe }}, 'options': "{{ env.get('options')|safe }}", 'app_dir': {{ env.get('app_dir')|tojson|safe }},