diff --git a/app/src/main/java/ru/vtosters/lite/hooks/JsonInjectors.java b/app/src/main/java/ru/vtosters/lite/hooks/JsonInjectors.java
index bd4a46d03..bf94c93f1 100644
--- a/app/src/main/java/ru/vtosters/lite/hooks/JsonInjectors.java
+++ b/app/src/main/java/ru/vtosters/lite/hooks/JsonInjectors.java
@@ -6,6 +6,7 @@ import static ru.vtosters.lite.f0x1d.VTVerifications.isVerified;
import static ru.vtosters.lite.hooks.DateHook.getLocale;
import static ru.vtosters.lite.utils.Base64Utils.decode;
import static ru.vtosters.lite.utils.Globals.getContext;
+import static ru.vtosters.lite.utils.Globals.getPrefsValue;
import static ru.vtosters.lite.utils.Globals.getUserToken;
import static ru.vtosters.lite.utils.Preferences.dev;
import static ru.vtosters.lite.utils.Preferences.friendsblock;
@@ -89,6 +90,8 @@ public class JsonInjectors{
}
}
+ if (!dev()) return orig.optJSONObject("conversation_bar");
+
// JSONObject("{\"name\":\"group_admin_welcome\",\"text\":\"" + textverif + "\",\"buttons\":[],\"icon\":\"" + pic + "\"}");
return new JSONObject(decode("eyJuYW1lIjoiZ3JvdXBfYWRtaW5fd2VsY29tZSIsInRleHQiOiI=")
+ text + decode("IiwiYnV0dG9ucyI6Ww==")
@@ -151,7 +154,9 @@ public class JsonInjectors{
}
public static JSONObject music(JSONObject json) throws JSONException{
- var oldItems = json.optJSONObject("catalog").optJSONArray("sections");
+ var catalog = json.optJSONObject("catalog");
+
+ var oldItems = catalog.optJSONArray("sections");
if (oldItems != null) {
var playlists = fetchCatalogId("https://vk.com/audio?section=my_playlists");
@@ -186,6 +191,20 @@ public class JsonInjectors{
oldItems.put(new JSONObject().put("id", id).put("title", title).put("url", url));
}
+
+ for (int i = 0; i < oldItems.length(); i++) {
+ var item = oldItems.optJSONObject(i);
+ var title = item.optString("title");
+ var id = item.optString("id");
+ var url = item.optString("url");
+ var value = getPrefsValue("musicdefcatalog");
+
+ Log.d("VKMusic", "title: " + title + " id: " + id + " url: " + url + " value: " + value);
+
+ if (url.contains(value)) {
+ catalog.put("default_section", id);
+ }
+ }
}
return json;
diff --git a/smali/res/values-ru/arrays.xml b/smali/res/values-ru/arrays.xml
index e2214267a..b6b9a3505 100644
--- a/smali/res/values-ru/arrays.xml
+++ b/smali/res/values-ru/arrays.xml
@@ -621,6 +621,14 @@
- Не обновлять
- Обновлять мгновенно
+
+ - По умолчанию
+ - Недавно прослушанные
+ - Моя музыка
+ - Плейлисты
+ - Альбомы
+ - Обзор
+
- [Удалено]
- 🗑
diff --git a/smali/res/values/arrays.xml b/smali/res/values/arrays.xml
index 5c5e7e268..7e64bac60 100644
--- a/smali/res/values/arrays.xml
+++ b/smali/res/values/arrays.xml
@@ -798,6 +798,22 @@
- no_update
- imd_update
+
+ - Default
+ - Recent
+ - My music
+ - Playlists
+ - Albums
+ - Explore
+
+
+ - general
+ - recent
+ - all
+ - my_playlists
+ - albums
+ - explore
+
- [Deleted]
- 🗑
diff --git a/smali/res/xml/preferences_media.xml b/smali/res/xml/preferences_media.xml
index 54a26b6f2..bedc1fb50 100644
--- a/smali/res/xml/preferences_media.xml
+++ b/smali/res/xml/preferences_media.xml
@@ -45,8 +45,15 @@
+ android:summary="Новый каталог музыкального раздела с динамическим контентом"
+ android:title="Новый раздел музыки" />
+