Commit 77360d65 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: disc open: support different values for disclabel/discpath

parent 73a2214b
...@@ -355,7 +355,9 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -355,7 +355,9 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
while( *drive ) while( *drive )
{ {
if( GetDriveTypeA(drive) == DRIVE_CDROM ) if( GetDriveTypeA(drive) == DRIVE_CDROM )
{
ui.deviceCombo->addItem( drive ); ui.deviceCombo->addItem( drive );
}
/* go to next drive */ /* go to next drive */
while( *(drive++) ); while( *(drive++) );
...@@ -475,17 +477,23 @@ void DiscOpenPanel::updateButtons() ...@@ -475,17 +477,23 @@ void DiscOpenPanel::updateButtons()
/* Update the current MRL */ /* Update the current MRL */
void DiscOpenPanel::updateMRL() void DiscOpenPanel::updateMRL()
{ {
QString mrl = ""; QString mrl;
QString discPath;
QStringList fileList; QStringList fileList;
if( ui.deviceCombo->itemData( ui.deviceCombo->currentIndex() ) != QVariant::Invalid )
discPath = ui.deviceCombo->itemData( ui.deviceCombo->currentIndex() ).toString();
else
discPath = ui.deviceCombo->currentText();
/* CDDAX and VCDX not implemented. TODO ? No. */ /* CDDAX and VCDX not implemented. TODO ? No. */
/* DVD */ /* DVD */
if( ui.dvdRadioButton->isChecked() ) { if( ui.dvdRadioButton->isChecked() ) {
if( !ui.dvdsimple->isChecked() ) if( !ui.dvdsimple->isChecked() )
mrl = "dvd://" LOCALHOST; mrl = "dvd://" LOCALHOST + discPath;
else else
mrl = "dvdsimple://" LOCALHOST; mrl = "dvdsimple://" LOCALHOST + discPath;
mrl += ui.deviceCombo->currentText();
if( !ui.dvdsimple->isChecked() ) if( !ui.dvdsimple->isChecked() )
emit methodChanged( "dvdnav-caching" ); emit methodChanged( "dvdnav-caching" );
else else
...@@ -500,7 +508,7 @@ void DiscOpenPanel::updateMRL() ...@@ -500,7 +508,7 @@ void DiscOpenPanel::updateMRL()
/* VCD */ /* VCD */
} else if ( ui.vcdRadioButton->isChecked() ) { } else if ( ui.vcdRadioButton->isChecked() ) {
mrl = "vcd://" LOCALHOST + ui.deviceCombo->currentText(); mrl = "vcd://" LOCALHOST + discPath;
emit methodChanged( "vcd-caching" ); emit methodChanged( "vcd-caching" );
if( ui.titleSpin->value() > 0 ) { if( ui.titleSpin->value() > 0 ) {
...@@ -509,7 +517,7 @@ void DiscOpenPanel::updateMRL() ...@@ -509,7 +517,7 @@ void DiscOpenPanel::updateMRL()
/* CDDA */ /* CDDA */
} else { } else {
mrl = "cdda://" LOCALHOST + ui.deviceCombo->currentText(); mrl = "cdda://" LOCALHOST + discPath;
emit methodChanged( "cdda-caching" ); emit methodChanged( "cdda-caching" );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment