comparison src/streambrowser/streamdir.c @ 2822:e883536cefe0

implemented xiph categories/genres, xiph is now usable
author Calin Crisan ccrisan@gmail.com
date Sun, 13 Jul 2008 20:18:00 +0300
parents cc6f02424609
children 113454baecf8
comparison
equal deleted inserted replaced
2819:2f7194224392 2822:e883536cefe0
111 } 111 }
112 112
113 113
114 streaminfo_t* streaminfo_new(gchar *name, gchar *playlist_url, gchar *url, gchar *current_track) 114 streaminfo_t* streaminfo_new(gchar *name, gchar *playlist_url, gchar *url, gchar *current_track)
115 { 115 {
116 /* replace ampersands with slashes, to avoit gtk/pango markup confusions */
117 int i, count = strlen(name);
118 for (i = 0; i < count; i++)
119 if (name[i] == '&')
120 name[i] = '/';
121
122 count = strlen(current_track);
123 for (i = 0; i < count; i++)
124 if (current_track[i] == '&')
125 current_track[i] = '/';
126
116 streaminfo_t *streaminfo = (streaminfo_t*) g_malloc(sizeof(streaminfo_t)); 127 streaminfo_t *streaminfo = (streaminfo_t*) g_malloc(sizeof(streaminfo_t));
117 strncpy(streaminfo->name, name, DEF_STRING_LEN); 128 strncpy(streaminfo->name, name, DEF_STRING_LEN);
118 strncpy(streaminfo->playlist_url, playlist_url, DEF_STRING_LEN); 129 strncpy(streaminfo->playlist_url, playlist_url, DEF_STRING_LEN);
119 strncpy(streaminfo->url, url, DEF_STRING_LEN); 130 strncpy(streaminfo->url, url, DEF_STRING_LEN);
120 strncpy(streaminfo->current_track, current_track, DEF_STRING_LEN); 131 strncpy(streaminfo->current_track, current_track, DEF_STRING_LEN);