Exemple #1
0
Ripper::Ripper(MythScreenStack *parent, QString device) :
    MythScreenType(parent, "ripcd"),
    m_tracks(new QVector<RipTrack*>),
    m_CDdevice(std::move(device))
{
#ifndef _WIN32
    // if the MediaMonitor is running stop it
    m_mediaMonitorActive = false;
    MediaMonitor *mon = MediaMonitor::GetMediaMonitor();
    if (mon && mon->IsActive())
    {
        m_mediaMonitorActive = true;
        mon->StopMonitoring();
    }
#endif // _WIN32

    // make sure the directory where we temporarily save the rips is present
    QDir dir;
    dir.mkpath(GetConfDir() + "/tmp/RipTemp/");

    // remove any ripped tracks from the temp rip directory
    QString command = "rm -f " + GetConfDir() + "/tmp/RipTemp/*";
    myth_system(command);

    // get last host and directory we ripped to
    QString lastHost = gCoreContext->GetSetting("MythMusicLastRipHost", gCoreContext->GetMasterHostName());
    QStringList dirs = StorageGroup::getGroupDirs("Music", lastHost);
    if (dirs.count() > 0)
        m_musicStorageDir = StorageGroup::getGroupDirs("Music", lastHost).at(0);
}
Exemple #2
0
Ripper::Ripper(MythScreenStack *parent, QString device) :
    MythScreenType(parent, "ripcd"),
    m_musicStorageDir(""),

    m_decoder(nullptr),

    m_artistEdit(nullptr),
    m_albumEdit(nullptr),
    m_genreEdit(nullptr),
    m_yearEdit(nullptr),

    m_compilationCheck(nullptr),

    m_trackList(nullptr),
    m_qualityList(nullptr),

    m_switchTitleArtist(nullptr),
    m_scanButton(nullptr),
    m_ripButton(nullptr),
    m_searchArtistButton(nullptr),
    m_searchAlbumButton(nullptr),
    m_searchGenreButton(nullptr),

    m_tracks(new QVector<RipTrack*>),

    m_somethingwasripped(false),
    m_mediaMonitorActive(false),

    m_CDdevice(device),

    m_ejectThread(nullptr), m_scanThread(nullptr)
{
#ifndef _WIN32
    // if the MediaMonitor is running stop it
    m_mediaMonitorActive = false;
    MediaMonitor *mon = MediaMonitor::GetMediaMonitor();
    if (mon && mon->IsActive())
    {
        m_mediaMonitorActive = true;
        mon->StopMonitoring();
    }
#endif // _WIN32

    // make sure the directory where we temporarily save the rips is present
    QDir dir;
    dir.mkpath(GetConfDir() + "/tmp/RipTemp/");

    // remove any ripped tracks from the temp rip directory
    QString command = "rm -f " + GetConfDir() + "/tmp/RipTemp/*";
    myth_system(command);

    // get last host and directory we ripped to
    QString lastHost = gCoreContext->GetSetting("MythMusicLastRipHost", gCoreContext->GetMasterHostName());
    QStringList dirs = StorageGroup::getGroupDirs("Music", lastHost);
    if (dirs.count() > 0)
        m_musicStorageDir = StorageGroup::getGroupDirs("Music", lastHost).at(0);
}
Exemple #3
0
Ripper::Ripper(MythScreenStack *parent, QString device) :
    MythScreenType(parent, "ripcd"),
    m_decoder(NULL),

    m_artistEdit(NULL),
    m_albumEdit(NULL),
    m_genreEdit(NULL),
    m_yearEdit(NULL),

    m_compilationCheck(NULL),

    m_trackList(NULL),
    m_qualityList(NULL),

    m_switchTitleArtist(NULL),
    m_scanButton(NULL),
    m_ripButton(NULL),
    m_searchArtistButton(NULL),
    m_searchAlbumButton(NULL),
    m_searchGenreButton(NULL),

    m_tracks(new QVector<RipTrack*>),

    m_somethingwasripped(false),
    m_mediaMonitorActive(false),

    m_CDdevice(device),

    m_ejectThread(NULL), m_scanThread(NULL)
{
#ifndef _WIN32
    // if the MediaMonitor is running stop it
    m_mediaMonitorActive = false;
    MediaMonitor *mon = MediaMonitor::GetMediaMonitor();
    if (mon && mon->IsActive())
    {
        m_mediaMonitorActive = true;
        mon->StopMonitoring();
    }
#endif
}
Exemple #4
0
Ripper::Ripper(MythScreenStack *parent, QString device)
       : MythScreenType(parent, "ripcd"),
         m_ejectThread(NULL), m_scanThread(NULL)
{
    m_CDdevice = device;

#ifndef _WIN32
    // if the MediaMonitor is running stop it
    m_mediaMonitorActive = false;
    MediaMonitor *mon = MediaMonitor::GetMediaMonitor();
    if (mon && mon->IsActive())
    {
        m_mediaMonitorActive = true;
        mon->StopMonitoring();
    }
#endif

    // Set this to false so we can tell if the ripper has done anything
    // (i.e. we can tell if the user quit prior to ripping)
    m_somethingwasripped = false;
    m_decoder = NULL;
    m_tracks = new QVector<RipTrack*>;
}