Ticket #9258: music-dechndlr.diff

File music-dechndlr.diff, 2.1 KB (added by Lawrence Rust <lvr@…>, 15 years ago)
  • mythplugins/mythmusic/mythmusic/decoderhandler.cpp

     
    267267    m_redirects = 0;
    268268
    269269    QUrl url;
    270     if (mdata->Filename().startsWith('/'))
     270    // NB Win32 absolute paths start d:/...
     271    if (QFileInfo(mdata->Filename()).isAbsolute())
    271272        url = QUrl::fromLocalFile(mdata->Filename());
    272273    else
    273274        url.setUrl(mdata->Filename());
     
    328329    PlayListFileEntry *entry = m_playlist.get(m_playlist_pos);
    329330
    330331    QUrl url;
    331     if (entry->File().startsWith('/'))
     332    // NB Win32 absolute paths start d:/...
     333    if (QFileInfo(entry->File()).isAbsolute())
    332334        url = QUrl::fromLocalFile(entry->File());
    333335    else
    334336        url.setUrl(entry->File());
     
    398400
    399401    if (extension == ".pls" || extension == ".m3u")
    400402    {
    401         if (url.scheme() == "file" || url.toString().startsWith('/'))
     403        // NB Win32 absolute paths start d:/...
     404        if (url.scheme() == "file" || QFileInfo(url.toString()).isAbsolute())
    402405            return createPlaylistFromFile(url);
    403406        else
    404407            return createPlaylistFromRemoteUrl(url);
     
    411414{
    412415    PlayListFileEntry *entry = new PlayListFileEntry;
    413416
    414     if (url.scheme() == "file" || url.toString().startsWith('/'))
     417    // NB Win32 absolute paths start d:/...
     418    if (url.scheme() == "file" || QFileInfo(url.toString()).isAbsolute())
    415419        entry->setFile(url.toLocalFile());
    416420    else
    417421        entry->setFile(url.toString());
     
    513517    if (haveIOFactory())
    514518        deleteIOFactory();
    515519
    516     if (url.scheme() == "file" || url.toString().startsWith('/') || url.toString().endsWith(".cda"))
     520    // NB Win32 absolute paths start d:/...
     521    if (url.scheme() == "file" || QFileInfo(url.toString()).isAbsolute() || url.toString().endsWith(".cda"))
    517522        m_io_factory = new DecoderIOFactoryFile(this);
    518523    else if (m_meta && m_meta->Format() == "cast")
    519524        m_io_factory = new DecoderIOFactoryShoutCast(this);