[mythtv] mythmusic: playlist.o: default to localhost

John Hurliman jhurliman at myrealbox.com
Sun Apr 20 20:37:09 EDT 2003


I wrote a few minor patches today to kludge some things in Myth and get 
it working for me. Probably not of use to the main CVS tree but I'll 
post them here in case anyone else is interested.

I was having some problems getting mythmusic to read the host from the 
database, and short of digging in to the database table I just wrote 
this patch to cause it to default to 127.0.0.1.

John Hurliman
-------------- next part --------------
Index: mythmusic/playlist.cpp
===================================================================
RCS file: /var/lib/cvs/mythmusic/mythmusic/playlist.cpp,v
retrieving revision 1.8
diff -u -r1.8 playlist.cpp
--- mythmusic/playlist.cpp	16 Apr 2003 21:02:39 -0000	1.8
+++ mythmusic/playlist.cpp	21 Apr 2003 02:31:06 -0000
@@ -422,8 +422,8 @@
     QString thequery;
     if(a_host.length() < 1)
     {
-        cerr << "playlist.o: Hey! I can't load playlists if you don't give me a hostname!" << endl; 
-        return;
+        cout << "playlist.o: Defaulting to 127.0.0.1" << endl;
+        a_host = "127.0.0.1";
     }
     
     thequery = QString("SELECT playlistid, name, songlist FROM musicplaylist WHERE name = \"%1\" AND hostname = \"%2\"  ;")


More information about the mythtv-dev mailing list