# HG changeset patch # User renatofilho # Date 1195657592 0 # Node ID d3d62eca131ccbad84e2a519640a965a08d71d98 # Parent e8a82fc5f075ed9c36bd7ead6d24137b118e8cee [svn r890] fixed dbname on backendinfo constructor; fixed uri livetv detect diff -r e8a82fc5f075 -r d3d62eca131c gmyth/src/gmyth_backendinfo.c --- a/gmyth/src/gmyth_backendinfo.c Wed Nov 21 13:10:19 2007 +0000 +++ b/gmyth/src/gmyth_backendinfo.c Wed Nov 21 15:06:32 2007 +0000 @@ -155,6 +155,7 @@ GMythBackendInfo *backend_info; GMythURI *uri; gchar **path_parts; + gchar *db; backend_info = GMYTH_BACKEND_INFO(g_object_new(GMYTH_BACKEND_INFO_TYPE, NULL)); uri = gmyth_uri_new_with_value (uri_str); @@ -168,12 +169,16 @@ * gets the path info to database name, from the URI, and removes the * trash chars */ - gmyth_backend_info_set_db_name(backend_info, path_parts != NULL && - strlen(path_parts[0]) > 0 ? - g_strstrip(g_strdelimit - (path_parts[0], "/?", - ' ')) : - gmyth_uri_get_path(uri)); + if ((path_parts != NULL) && (strlen (path_parts[0]) > 0)) + { + db = path_parts[0]+2; + } + else + { + db = gmyth_uri_get_path(uri); + } + + gmyth_backend_info_set_db_name(backend_info, db); gmyth_backend_info_set_port(backend_info, gmyth_uri_get_port(uri)); diff -r e8a82fc5f075 -r d3d62eca131c gmyth/src/gmyth_uri.c --- a/gmyth/src/gmyth_uri.c Wed Nov 21 13:10:19 2007 +0000 +++ b/gmyth/src/gmyth_uri.c Wed Nov 21 15:06:32 2007 +0000 @@ -472,7 +472,7 @@ g_return_val_if_fail(uri->uri != NULL, FALSE); g_return_val_if_fail(uri->uri->str != NULL, FALSE); - if ((strstr(uri->uri->str, "channel") == NULL) || + if ((strstr(uri->uri->str, "channel=") == NULL) && (strstr(uri->uri->str, "livetv") == NULL)) ret = FALSE;