Skip to content

Commit

Permalink
wrap not sounds like
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlan-00 committed Mar 18, 2024
1 parent 0818028 commit b682542
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 15 deletions.
18 changes: 15 additions & 3 deletions src/Module/Playlist/Search/AlbumDiskSearch.php
Expand Up @@ -339,7 +339,11 @@ public function getSql(
break;
}
}
$where[] = "`album`.`mbid` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`album`.`mbid` SOUNDS LIKE ?)";
} else {
$where[] = "`album`.`mbid` $operator_sql ?";
}
$parameters[] = $input;
break;
case 'mbid_song':
Expand All @@ -353,7 +357,11 @@ public function getSql(
break;
}
}
$where[] = "`song`.`mbid` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`song`.`mbid` SOUNDS LIKE ?)";
} else {
$where[] = "`song`.`mbid` $operator_sql ?";
}
$parameters[] = $input;
$join['song'] = true;
break;
Expand All @@ -368,7 +376,11 @@ public function getSql(
break;
}
}
$where[] = "`artist`.`mbid` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`artist`.`mbid` SOUNDS LIKE ?)";
} else {
$where[] = "`artist`.`mbid` $operator_sql ?";
}
$parameters[] = $input;
$join['album_map'] = true;
break;
Expand Down
18 changes: 15 additions & 3 deletions src/Module/Playlist/Search/AlbumSearch.php
Expand Up @@ -352,7 +352,11 @@ public function getSql(
break;
}
}
$where[] = "`album`.`mbid` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`album`.`mbid` SOUNDS LIKE ?)";
} else {
$where[] = "`album`.`mbid` $operator_sql ?";
}
$parameters[] = $input;
break;
case 'mbid_song':
Expand All @@ -366,7 +370,11 @@ public function getSql(
break;
}
}
$where[] = "`song`.`mbid` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`song`.`mbid` SOUNDS LIKE ?)";
} else {
$where[] = "`song`.`mbid` $operator_sql ?";
}
$parameters[] = $input;
$join['song'] = true;
break;
Expand All @@ -381,7 +389,11 @@ public function getSql(
break;
}
}
$where[] = "`artist`.`mbid` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`artist`.`mbid` SOUNDS LIKE ?)";
} else {
$where[] = "`artist`.`mbid` $operator_sql ?";
}
$parameters[] = $input;
$join['album_map'] = true;
break;
Expand Down
18 changes: 15 additions & 3 deletions src/Module/Playlist/Search/ArtistSearch.php
Expand Up @@ -343,7 +343,11 @@ public function getSql(
break;
}
}
$where[] = "`artist`.`mbid` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`artist`.`mbid` SOUNDS LIKE ?)";
} else {
$where[] = "`artist`.`mbid` $operator_sql ?";
}
$parameters[] = $input;
break;
case 'mbid_album':
Expand All @@ -357,7 +361,11 @@ public function getSql(
break;
}
}
$where[] = "`album`.`mbid` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`album`.`mbid` SOUNDS LIKE ?)";
} else {
$where[] = "`album`.`mbid` $operator_sql ?";
}
$parameters[] = $input;
$join['album'] = true;
break;
Expand All @@ -372,7 +380,11 @@ public function getSql(
break;
}
}
$where[] = "`song`.`mbid` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`song`.`mbid` SOUNDS LIKE ?)";
} else {
$where[] = "`song`.`mbid` $operator_sql ?";
}
$parameters[] = $input;
$join['song'] = true;
break;
Expand Down
36 changes: 30 additions & 6 deletions src/Module/Playlist/Search/SongSearch.php
Expand Up @@ -171,7 +171,11 @@ public function getSql(
break;
}
}
$where[] = "`song_data`.`comment` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`song_data`.`comment` SOUNDS LIKE ?)";
} else {
$where[] = "`song_data`.`comment` $operator_sql ?";
}
$parameters[] = $input;
break;
case 'label':
Expand All @@ -186,7 +190,11 @@ public function getSql(
break;
}
}
$where[] = "`song_data`.`label` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`song_data`.`label` SOUNDS LIKE ?)";
} else {
$where[] = "`song_data`.`label` $operator_sql ?";
}
$parameters[] = $input;
break;
case 'lyrics':
Expand All @@ -201,7 +209,11 @@ public function getSql(
break;
}
}
$where[] = "`song_data`.`lyrics` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`song_data`.`lyrics` SOUNDS LIKE ?)";
} else {
$where[] = "`song_data`.`lyrics` $operator_sql ?";
}
$parameters[] = $input;
break;
case 'played':
Expand Down Expand Up @@ -455,7 +467,11 @@ public function getSql(
break;
}
}
$where[] = "`song`.`mbid` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`song`.`mbid` SOUNDS LIKE ?)";
} else {
$where[] = "`song`.`mbid` $operator_sql ?";
}
$parameters[] = $input;
break;
case 'mbid_album':
Expand All @@ -470,7 +486,11 @@ public function getSql(
break;
}
}
$where[] = "`album`.`mbid` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`album`.`mbid` SOUNDS LIKE ?)";
} else {
$where[] = "`album`.`mbid` $operator_sql ?";
}
$parameters[] = $input;
break;
case 'mbid_artist':
Expand All @@ -484,7 +504,11 @@ public function getSql(
break;
}
}
$where[] = "`artist`.`mbid` $operator_sql ?";
if ($operator_sql === 'NOT SOUNDS LIKE') {
$where[] = "NOT (`artist`.`mbid` SOUNDS LIKE ?)";
} else {
$where[] = "`artist`.`mbid` $operator_sql ?";
}
$parameters[] = $input;
$join['artist'] = true;
break;
Expand Down

0 comments on commit b682542

Please sign in to comment.