# HG changeset patch # User renatofilho # Date 1178831373 -3600 # Node ID 653976fae5dd0464daf91ea6d07d2c6431b62ed6 # Parent 8105bca5313fc4f7e5a1adea5293e033f75908d8 [svn r649] gmythuri is livetv fixed diff -r 8105bca5313f -r 653976fae5dd gmyth/src/gmyth_uri.c --- a/gmyth/src/gmyth_uri.c Thu May 10 22:08:17 2007 +0100 +++ b/gmyth/src/gmyth_uri.c Thu May 10 22:09:33 2007 +0100 @@ -411,16 +411,26 @@ gmyth_uri_is_livetv( GMythURI* uri ) { gboolean ret = FALSE; + + g_return_val_if_fail (uri != NULL, FALSE); + g_return_val_if_fail (uri->uri != NULL, FALSE); + g_return_val_if_fail (uri->uri->str != NULL, FALSE); + + g_debug ("verify [%s]", uri->uri->str); + + if ((strstr (uri->uri->str, "channel") == NULL) || + (strstr (uri->uri->str, "livetv") == NULL)) + ret = FALSE; + + g_debug ("AAAAAAAAAAAAAAAAAAAAA"); - g_return_val_if_fail( uri != NULL && uri->uri != NULL && uri->uri->str != NULL, FALSE ); - - ret = ( g_strstr_len( uri->uri->str, strlen( uri->uri->str ), "/?" ) != NULL ) || - ( g_strstr_len( uri->uri->str, strlen( uri->uri->str ), "livetv" ) != NULL ); - - if ( ret ) + if (ret) gmyth_debug( "This URI is a LiveTV recording..." ); else gmyth_debug( "This URI is a stored remote recording." ); + + + g_debug ("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"); return ret; diff -r 8105bca5313f -r 653976fae5dd gmyth/src/gmyth_uri.h --- a/gmyth/src/gmyth_uri.h Thu May 10 22:08:17 2007 +0100 +++ b/gmyth/src/gmyth_uri.h Thu May 10 22:09:33 2007 +0100 @@ -109,10 +109,7 @@ gboolean gmyth_uri_is_livetv ( GMythURI* uri ); gint gmyth_uri_get_channel_num( GMythURI* uri ); gchar* gmyth_uri_get_channel_name( GMythURI* uri ); - -char* gmyth_uri_to_string (const GMythURI* uri); - - +char* gmyth_uri_to_string (const GMythURI* uri); gboolean gmyth_uri_is_local_file( const GMythURI* uri ); #define gmyth_uri_get_host(urip) ( urip->host != NULL ? urip->host->str : "" )