forked from j62/ctbrec
1
0
Fork 0

Fix MV Live models not showing up as recording

MV Live models with spaces in the name would not show up as recording.
This commit is contained in:
0xb00bface 2020-08-23 12:46:24 +02:00
parent 337b096568
commit c7e39fdd98
2 changed files with 3 additions and 4 deletions

View File

@ -1,5 +1,6 @@
package ctbrec.ui.tabs;
import static ctbrec.Recording.State.*;
import static ctbrec.SubsequentAction.*;
import java.io.IOException;
@ -561,9 +562,7 @@ public class RecordedModelsTab extends Tab implements TabSelectionListener {
.map(JavaFxModel::new)
.peek(fxm -> {
for (Recording recording : recordings) {
if(recording.getStatus() == Recording.State.RECORDING &&
recording.getModel().getName().equals(fxm.getSanitizedNamed()))
{
if(recording.getStatus() == RECORDING && Objects.equals(recording.getModel(), fxm)){
fxm.getRecordingProperty().set(true);
break;
}

View File

@ -171,7 +171,7 @@ public abstract class AbstractModel implements Model {
if (getName() == null) {
if (other.getName() != null)
return false;
} else if (!getName().equals(other.getName()))
} else if (!getSanitizedNamed().equals(other.getSanitizedNamed()))
return false;
if (getUrl() == null) {
if (other.getUrl() != null)