Skip to content

Commit

Permalink
fix: no recommended attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
reis committed Dec 15, 2022
1 parent 07c1ec4 commit c9882cf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
9 changes: 6 additions & 3 deletions public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,13 @@ ws.onmessage = (msg) => {
for (let i = 0; i < len; i++) {
const version = message.versionList[i];
const noRec = version.recommended == 'NOREC';

const recommended = version.recommended ? 1 : 0;
versionsElement.innerHTML += `
<li>
<input type="radio" name="version" id="app-${i}" value="${
version.version
}" data-beta="${version.beta ? '1' : '0'}" ${
!noRec ? ('data-recommended=' + version.recommended ? 1 : 0) : ''
!noRec ? 'data-recommended="' + recommended + '"' : ''
}/>
<label for="app-${i}">${version.version} ${
version.beta ? ' (beta)' : ''
Expand All @@ -359,7 +359,10 @@ ws.onmessage = (msg) => {
}</label></li>`;
}

if (message.selectedApp === 'youtube.music' && !message.foundDevice)
if (
message.selectedApp === 'com.google.android.apps.youtube.music' &&
!message.foundDevice
)
document.getElementById('continue').onclick = () => {
const version = document.querySelector(
'input[name="version"]:checked'
Expand Down
6 changes: 3 additions & 3 deletions utils/PatchesParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ module.exports = async function parsePatch(packageName, hasRoot) {
global.versions.push(compatibleVersion);
}
}

if (!isCompatible) {
if (patch.compatiblePackages.length !== 0) continue;
if (patch.compatiblePackages.length !== 0) continue;
}

if (isRooted && !hasRoot) continue;

for (const dependencyName of patch.dependencies) {
Expand Down
10 changes: 1 addition & 9 deletions utils/mountReVancedInstaller.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,7 @@ async function runCommand(command, deviceId) {
* @param {string} deviceId
*/
module.exports = async function mountReVancedInstaller(deviceId) {
let pkg;

switch (global.jarNames.selectedApp) {
case 'youtube':
pkg = 'com.google.android.youtube';
break;
case 'youtube.music':
pkg = 'com.google.android.apps.youtube.music';
}
let pkg = global.jarNames.selectedApp.packageName;

// Copy ReVanced APK to temp.
await exec(
Expand Down

0 comments on commit c9882cf

Please sign in to comment.