From 6dd0c141bff20d48f6e0ea21df2a06a554267f53 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Mon, 11 Jul 2022 18:21:26 +0700 Subject: [PATCH 1/7] profile page (for search for now) --- package.json | 4 +- src/main/base/browserwindow.ts | 5 +++ src/main/base/vrouting.json | 5 +++ src/renderer/main/vueapp.js | 24 +++++++++-- src/renderer/views/pages/cider-profile.ejs | 48 +++++----------------- 5 files changed, 44 insertions(+), 42 deletions(-) diff --git a/package.json b/package.json index 69ed419c..8dcdf190 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "airtunes2": "git+https://github.com/ciderapp/node_airtunes2", "castv2-client": "^1.2.0", "chokidar": "^3.5.3", + "cider_utils": "git+https://github.com/ciderapp/cider_utils", "discord-auto-rpc": "^1.0.16", "dns-js": "git+https://github.com/ciderapp/node-dns-js.git", "ejs": "^3.1.6", @@ -80,8 +81,7 @@ "wallpaper": "5.0.1", "ws": "^8.5.0", "xml2js": "^0.4.23", - "youtube-search-without-api-key": "^1.0.7", - "cider_utils": "git+https://github.com/ciderapp/cider_utils" + "youtube-search-without-api-key": "^1.0.7" }, "devDependencies": { "@types/adm-zip": "^0.5.0", diff --git a/src/main/base/browserwindow.ts b/src/main/base/browserwindow.ts index 702f80dd..10b472da 100644 --- a/src/main/base/browserwindow.ts +++ b/src/main/base/browserwindow.ts @@ -86,6 +86,7 @@ export class BrowserWindow { "pages/zoo", "pages/plugin-renderer", "pages/oobe", + "pages/cider-profile", "components/app-content", "components/sidebar", "components/mediaitem-artwork", @@ -193,6 +194,10 @@ export class BrowserWindow { page: "recordLabel_", component: ``, condition: `$root.page.includes('recordLabel_')` + }, { + page: "social-profiles_", + component: ``, + condition: `$root.page.includes('social-profiles_')` }, { page: "multiroom", component: ``, diff --git a/src/main/base/vrouting.json b/src/main/base/vrouting.json index 6d69582c..613103d1 100644 --- a/src/main/base/vrouting.json +++ b/src/main/base/vrouting.json @@ -69,6 +69,11 @@ "component": "", "condition": "page.includes('album_')" }, + { + "page": "social-profiles_", + "component": "", + "condition": "$root.page.includes('social-profiles_')" + }, { "page": "recordLabel_", "component": "", diff --git a/src/renderer/main/vueapp.js b/src/renderer/main/vueapp.js index 1c74fa77..0101fad1 100644 --- a/src/renderer/main/vueapp.js +++ b/src/renderer/main/vueapp.js @@ -1966,7 +1966,7 @@ const app = new Vue({ }) return; - } else if(item.attributes.link.url.includes("viewFeature")) { + } else if (item.attributes.link.url.includes("viewFeature")) { const params = new Proxy(new URLSearchParams(new URL(item.attributes.link.url).search), { get: (searchParams, prop) => searchParams.get(prop), }); @@ -1977,7 +1977,6 @@ const app = new Vue({ app.routeView(item) } ) - } else { window.open(item.attributes.link.url) } @@ -2018,7 +2017,26 @@ const app = new Vue({ }); window.location.hash = `${kind}/${id}` document.querySelector("#app-content").scrollTop = 0 - } else if (!kind.toString().includes("radioStation") && !kind.toString().includes("song") && !kind.toString().includes("musicVideo") && !kind.toString().includes("uploadedVideo") && !kind.toString().includes("music-movie")) { + } else if (kind = "social-profiles") { + app.page = (kind) + "_" + (id); + app.mk.api.v3.music( + `/v1/social/${app.mk.storefrontId}/social-profiles/${id}`, + {include:"shared-playlists"}).then( + (data) => { + console.log(data) + app.showingPlaylist = data.data?.data[0] + window.location.hash = `${kind}/${id}` + document.querySelector("#app-content").scrollTop = 0 + } + ) + // app.getTypeFromID((kind), (id), (isLibrary), { + // extend: "editorialVideo", + // include: 'grouping,playlists', + // views: 'top-releases,latest-releases,top-artists' + // }); + + } + else if (!kind.toString().includes("radioStation") && !kind.toString().includes("song") && !kind.toString().includes("musicVideo") && !kind.toString().includes("uploadedVideo") && !kind.toString().includes("music-movie")) { let params = { extend: "offers,editorialVideo", "views": "appears-on,more-by-artist,related-videos,other-versions,you-might-also-like,video-extras,audio-extras", diff --git a/src/renderer/views/pages/cider-profile.ejs b/src/renderer/views/pages/cider-profile.ejs index 917344b0..f0abd54a 100644 --- a/src/renderer/views/pages/cider-profile.ejs +++ b/src/renderer/views/pages/cider-profile.ejs @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/src/smth.json b/src/smth.json deleted file mode 100644 index b84b517a..00000000 --- a/src/smth.json +++ /dev/null @@ -1,557 +0,0 @@ -{ - "CookieSPAEnabled": false, - "MultiVariantTestingEnabled": false, - "UseV2": true, - "MobileSDK": false, - "SkipGeolocation": false, - "ScriptType": "PRODUCTION", - "Version": "6.26.0", - "OptanonDataJSON": "50da44be-0564-43df-b139-329aedcf267b", - "GeolocationUrl": "https://geolocation.onetrust.com/cookieconsentpub/v1/geo/location", - "BulkDomainCheckUrl": "https://cookies-data.onetrust.io/bannersdk/v1/domaingroupcheck", - "RuleSet": [ - { - "Id": "fb7c8fa7-d912-4e6b-a0ef-181d7466bd99", - "Name": "Standard Notice Banner", - "Countries": [ - "ps", - "hk", - "pw", - "ht", - "qa", - "id", - "il", - "ae", - "in", - "ag", - "za", - "al", - "am", - "ao", - "zm", - "au", - "az", - "zw", - "ba", - "bb", - "rs", - "bd", - "ru", - "jm", - "bf", - "jo", - "rw", - "bi", - "bj", - "bn", - "sa", - "sb", - "sc", - "bs", - "bt", - "sg", - "bw", - "by", - "bz", - "sl", - "sm", - "ke", - "sn", - "kg", - "kh", - "ki", - "ca", - "sr", - "st", - "kn", - "ch", - "ci", - "sz", - "kr", - "cm", - "cn", - "kw", - "kz", - "td", - "cv", - "tg", - "cw", - "th", - "la", - "lb", - "lc", - "tl", - "to", - "tr", - "lk", - "tt", - "tv", - "dj", - "tz", - "lr", - "ls", - "dm", - "ug", - "ma", - "md", - "me", - "mg", - "mh", - "us", - "mk", - "ml", - "mn", - "eg", - "mr", - "uz", - "mu", - "mv", - "mw", - "my", - "mz", - "vc", - "na", - "ne", - "vn", - "ng", - "vu", - "np", - "nr", - "fj", - "fm", - "nz", - "ga", - "ws", - "gd", - "om", - "ge", - "gh", - "gm", - "gn", - "gq", - "gw", - "gy", - "pg", - "ph", - "pk" - ], - "States": {}, - "LanguageSwitcherPlaceholder": { - "hi": "hi", - "de": "de", - "es-BO": "es-BO", - "zh-Hans": "zh-Hans", - "zh-Hant": "zh-Hant", - "es-BZ": "es-BZ", - "uk": "uk", - "es-CC": "es-CC", - "id": "id", - "ur": "ur", - "af": "af", - "es-SV": "es-SV", - "ms": "ms", - "es-GT": "es-GT", - "es-CR": "es-CR", - "it": "it", - "es-CL": "es-CL", - "es": "es", - "es-CO": "es-CO", - "es-PE": "es-PE", - "ar": "ar", - "vi": "vi", - "es-PA": "es-PA", - "ne": "ne", - "ja": "ja", - "az": "az", - "zu": "zu", - "nl": "nl", - "es-HN": "es-HN", - "ru": "ru", - "es-PR": "es-PR", - "es-PY": "es-PY", - "fr": "fr", - "bn": "bn", - "es-DO": "es-DO", - "default": "en", - "es-EC": "es-EC", - "en-PH": "en-PH", - "sr": "sr", - "sw": "sw", - "ko": "ko", - "pt-BR": "pt-BR", - "es-UY": "es-UY", - "es-VE": "es-VE", - "ta": "ta", - "es-MX": "es-MX", - "th": "th", - "es-AR": "es-AR", - "he": "he", - "tr": "tr", - "es-NI": "es-NI" - }, - "BannerPushesDown": false, - "Default": false, - "Global": false, - "Type": "GENERIC", - "UseGoogleVendors": false, - "VariantEnabled": false, - "TestEndTime": null, - "Variants": [], - "TemplateName": "Spotify - Standard Notice Banner", - "Conditions": [], - "GCEnable": false - }, - { - "Id": "87b34903-3ed8-41e8-873f-df7208bf4ac7", - "Name": "IAB 2.0 - Germany", - "Countries": [ - "de" - ], - "States": {}, - "LanguageSwitcherPlaceholder": { - "default": "de" - }, - "BannerPushesDown": false, - "Default": false, - "Global": false, - "Type": "IAB2", - "UseGoogleVendors": false, - "VariantEnabled": false, - "TestEndTime": null, - "Variants": [], - "TemplateName": "Spotify - GDPR IAB Banner (Germany)", - "Conditions": [], - "GCEnable": false - }, - { - "Id": "047479d5-e10c-4c37-bb58-b85a33337d90", - "Name": "IAB 2.0 - Reject All Button", - "Countries": [ - "fr" - ], - "States": {}, - "LanguageSwitcherPlaceholder": { - "no": "no", - "de": "de", - "sv": "sv", - "fi": "fi", - "pt": "pt", - "bg": "bg", - "el": "el", - "lt": "lt", - "en": "en", - "lv": "lv", - "is": "is", - "hr": "hr", - "it": "it", - "hu": "hu", - "es": "es", - "et": "et", - "cs": "cs", - "default": "fr", - "sk": "sk", - "sl": "sl", - "pl": "pl", - "ro": "ro", - "da": "da", - "nl": "nl" - }, - "BannerPushesDown": false, - "Default": false, - "Global": false, - "Type": "IAB2", - "UseGoogleVendors": false, - "VariantEnabled": false, - "TestEndTime": null, - "Variants": [], - "TemplateName": "Spotify - GDPR IAB Banner (Reject all button)", - "Conditions": [], - "GCEnable": false - }, - { - "Id": "9ffca9ee-89d4-4e64-9807-8f72fd75528a", - "Name": "IAB 2.0", - "Countries": [ - "no", - "fi", - "be", - "pt", - "bg", - "dk", - "lt", - "lu", - "lv", - "hr", - "hu", - "se", - "si", - "sk", - "gb", - "ie", - "ee", - "mt", - "is", - "it", - "gr", - "es", - "at", - "cy", - "cz", - "pl", - "li", - "ro", - "nl" - ], - "States": {}, - "LanguageSwitcherPlaceholder": { - "no": "no", - "de": "de", - "sv": "sv", - "fi": "fi", - "pt": "pt", - "bg": "bg", - "el": "el", - "lt": "lt", - "lv": "lv", - "is": "is", - "hr": "hr", - "it": "it", - "fr": "fr", - "hu": "hu", - "es": "es", - "et": "et", - "cs": "cs", - "default": "en", - "sk": "sk", - "sl": "sl", - "pl": "pl", - "ro": "ro", - "da": "da", - "nl": "nl" - }, - "BannerPushesDown": false, - "Default": true, - "Global": false, - "Type": "IAB2", - "UseGoogleVendors": false, - "VariantEnabled": false, - "TestEndTime": null, - "Variants": [], - "TemplateName": "Spotify - GDPR IAB Banner", - "Conditions": [], - "GCEnable": false - }, - { - "Id": "74eec303-d5c3-4488-a6df-cb21b90c2b8c", - "Name": "Global", - "Countries": [ - "pr", - "tw", - "hm", - "hn", - "py", - "do", - "ye", - "ua", - "ly", - "dz", - "um", - "ec", - "mm", - "mo", - "mp", - "eh", - "ad", - "im", - "uy", - "af", - "ms", - "io", - "iq", - "ai", - "ir", - "va", - "mx", - "er", - "ve", - "et", - "aq", - "vg", - "ar", - "as", - "vi", - "nc", - "aw", - "nf", - "ni", - "je", - "fk", - "bh", - "jp", - "nu", - "fo", - "bl", - "bm", - "bo", - "wf", - "bq", - "br", - "sd", - "bv", - "sh", - "sj", - "so", - "gg", - "cc", - "ss", - "cd", - "km", - "gi", - "cf", - "sv", - "cg", - "gl", - "sx", - "kp", - "sy", - "ck", - "cl", - "co", - "gs", - "gt", - "gu", - "ky", - "cr", - "tc", - "pa", - "tf", - "cu", - "pe", - "cx", - "pf", - "tj", - "tk", - "tm", - "tn", - "pm", - "pn" - ], - "States": {}, - "LanguageSwitcherPlaceholder": { - "hi": "hi", - "de": "de", - "es-BO": "es-BO", - "zh-Hans": "zh-Hans", - "zh-Hant": "zh-Hant", - "es-BZ": "es-BZ", - "uk": "uk", - "es-CC": "es-CC", - "id": "id", - "ur": "ur", - "af": "af", - "es-SV": "es-SV", - "ms": "ms", - "es-GT": "es-GT", - "es-CR": "es-CR", - "it": "it", - "es-CL": "es-CL", - "es": "es", - "es-CO": "es-CO", - "es-PE": "es-PE", - "ar": "ar", - "vi": "vi", - "es-PA": "es-PA", - "ne": "ne", - "ja": "ja", - "az": "az", - "zu": "zu", - "nl": "nl", - "es-HN": "es-HN", - "ru": "ru", - "es-PR": "es-PR", - "es-PY": "es-PY", - "fr": "fr", - "bn": "bn", - "es-DO": "es-DO", - "default": "en", - "es-EC": "es-EC", - "en-PH": "en-PH", - "sr": "sr", - "sw": "sw", - "ko": "ko", - "pt-BR": "pt-BR", - "es-UY": "es-UY", - "es-VE": "es-VE", - "ta": "ta", - "es-MX": "es-MX", - "th": "th", - "es-AR": "es-AR", - "he": "he", - "tr": "tr", - "es-NI": "es-NI" - }, - "BannerPushesDown": false, - "Default": false, - "Global": true, - "Type": "GENERIC", - "UseGoogleVendors": false, - "VariantEnabled": false, - "TestEndTime": null, - "Variants": [], - "TemplateName": "Spotify - Standard Notice Banner", - "Conditions": [], - "GCEnable": false - } - ], - "IabData": { - "cookieVersion": "1", - "createdTime": "2022-05-23T15:50:11.758903", - "updatedTime": "2022-05-23T15:50:11.758919", - "cmpId": "28", - "cmpVersion": "1", - "consentScreen": "1", - "consentLanguage": null, - "vendorListVersion": 0, - "maxVendorId": 0, - "encodingType": "0", - "globalVendorListUrl": "https://cdn.cookielaw.org/vendorlist/iabData.json" - }, - "IabV2Data": { - "cookieVersion": "1", - "createdTime": "2022-05-23T15:50:11.809823", - "updatedTime": "2022-05-23T15:50:11.809837", - "cmpId": "28", - "cmpVersion": "1", - "consentScreen": "1", - "consentLanguage": null, - "vendorListVersion": 144, - "maxVendorId": 0, - "encodingType": "0", - "globalVendorListUrl": "https://cdn.cookielaw.org/vendorlist/iab2Data.json" - }, - "GoogleData": { - "vendorListVersion": 1, - "googleVendorListUrl": "https://cdn.cookielaw.org/vendorlist/googleData.json" - }, - "ScriptDynamicLoadEnabled": false, - "TenantFeatures": { - "CookieV2BannerFocus": true, - "CookieV2TargetedTemplates": true, - "CookieV2GPC": true, - "CookieV2AssignTemplateRule": true, - "CookieV2GeolocationJsonApi": true, - "CookieV2TCF21": true, - "CookieV2RemoveSettingsIcon": true, - "CookieV2GeneralVendors": true - }, - "IsSuppressBanner": false, - "IsSuppressPC": false, - "PublisherCC": "DE", - "Domain": "spotify.com", - "TenantGuid": "f1b38160-cf19-4625-89df-35263d2d97c0", - "EnvId": "app-de-prod", - "RemoteActionsEnabled": false, - "GeoRuleGroupName": "Spotify Domains", - "GATrackToggle": true, - "GATrackAssignedCategory": "AS" -} \ No newline at end of file From 123c6bc4d6603f0a895f629a98cd7f168e2d1fa2 Mon Sep 17 00:00:00 2001 From: yazninja Date: Mon, 11 Jul 2022 22:47:07 +0800 Subject: [PATCH 4/7] no coding at 4am --- src/renderer/views/app/chrome-bottom.ejs | 4 ++-- src/renderer/views/app/chrome-top.ejs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/views/app/chrome-bottom.ejs b/src/renderer/views/app/chrome-bottom.ejs index 3be360be..f6843d68 100644 --- a/src/renderer/views/app/chrome-bottom.ejs +++ b/src/renderer/views/app/chrome-bottom.ejs @@ -45,10 +45,10 @@
-
-
diff --git a/src/renderer/views/app/chrome-top.ejs b/src/renderer/views/app/chrome-top.ejs index 34310e98..c204b119 100644 --- a/src/renderer/views/app/chrome-top.ejs +++ b/src/renderer/views/app/chrome-top.ejs @@ -121,10 +121,10 @@
-
-
From dea13c0cc6a3214231caab189e053d42031798b9 Mon Sep 17 00:00:00 2001 From: yazninja Date: Tue, 12 Jul 2022 10:16:22 +0800 Subject: [PATCH 5/7] fix units for local lossless badge --- src/renderer/views/app/chrome-bottom.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/views/app/chrome-bottom.ejs b/src/renderer/views/app/chrome-bottom.ejs index f6843d68..e1545810 100644 --- a/src/renderer/views/app/chrome-bottom.ejs +++ b/src/renderer/views/app/chrome-bottom.ejs @@ -46,7 +46,7 @@
Date: Tue, 12 Jul 2022 10:23:41 +0800 Subject: [PATCH 6/7] fix units for local lossless badge --- src/renderer/views/app/chrome-top.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/views/app/chrome-top.ejs b/src/renderer/views/app/chrome-top.ejs index c204b119..6f4c6958 100644 --- a/src/renderer/views/app/chrome-top.ejs +++ b/src/renderer/views/app/chrome-top.ejs @@ -122,7 +122,7 @@
Date: Tue, 12 Jul 2022 10:51:24 +0800 Subject: [PATCH 7/7] remove CAP icon for local files, cuz unsupported --- src/renderer/views/app/chrome-bottom.ejs | 2 +- src/renderer/views/app/chrome-top.ejs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/views/app/chrome-bottom.ejs b/src/renderer/views/app/chrome-bottom.ejs index e1545810..44fda15e 100644 --- a/src/renderer/views/app/chrome-bottom.ejs +++ b/src/renderer/views/app/chrome-bottom.ejs @@ -48,7 +48,7 @@
-
diff --git a/src/renderer/views/app/chrome-top.ejs b/src/renderer/views/app/chrome-top.ejs index 6f4c6958..948bb41a 100644 --- a/src/renderer/views/app/chrome-top.ejs +++ b/src/renderer/views/app/chrome-top.ejs @@ -124,7 +124,7 @@
-