|
From: <ren...@us...> - 2007-11-21 15:06:28
|
Revision: 890
http://gmyth.svn.sourceforge.net/gmyth/?rev=890&view=rev
Author: renatofilho
Date: 2007-11-21 07:06:32 -0800 (Wed, 21 Nov 2007)
Log Message:
-----------
fixed dbname on backendinfo constructor; fixed uri livetv detect
Modified Paths:
--------------
trunk/gmyth/src/gmyth_backendinfo.c
trunk/gmyth/src/gmyth_uri.c
Modified: trunk/gmyth/src/gmyth_backendinfo.c
===================================================================
--- trunk/gmyth/src/gmyth_backendinfo.c 2007-11-21 13:10:19 UTC (rev 889)
+++ trunk/gmyth/src/gmyth_backendinfo.c 2007-11-21 15:06:32 UTC (rev 890)
@@ -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,13 +169,17 @@
* 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));
g_object_unref(uri);
Modified: trunk/gmyth/src/gmyth_uri.c
===================================================================
--- trunk/gmyth/src/gmyth_uri.c 2007-11-21 13:10:19 UTC (rev 889)
+++ trunk/gmyth/src/gmyth_uri.c 2007-11-21 15:06:32 UTC (rev 890)
@@ -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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|