From 3b4c2cf54011181279aa922f64e5c858a1893d95 Mon Sep 17 00:00:00 2001 From: the1812 Date: Mon, 23 Mar 2020 23:34:22 +0800 Subject: [PATCH 1/2] Fix version checking --- bilibili-evolved.offline.user.js | 4 ++-- bilibili-evolved.preview-offline.user.js | 4 ++-- bilibili-evolved.preview.user.js | 2 +- bilibili-evolved.user.js | 2 +- src/client/resource-manager.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bilibili-evolved.offline.user.js b/bilibili-evolved.offline.user.js index 71d224410..372096623 100644 --- a/bilibili-evolved.offline.user.js +++ b/bilibili-evolved.offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Offline) -// @version 616.26 +// @version 616.32 // @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -2758,7 +2758,7 @@ class ResourceManager { url, responseType: 'blob', })) - const latestVersion = await Ajax.monkey({ url: Resource.root + 'version.txt' }) + const latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) isTimeout = false if (settings.currentVersion !== latestVersion) { console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`) diff --git a/bilibili-evolved.preview-offline.user.js b/bilibili-evolved.preview-offline.user.js index f5ba60509..8a75426e1 100644 --- a/bilibili-evolved.preview-offline.user.js +++ b/bilibili-evolved.preview-offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Preview Offline) -// @version 616.26 +// @version 616.32 // @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -2758,7 +2758,7 @@ class ResourceManager { url, responseType: 'blob', })) - const latestVersion = await Ajax.monkey({ url: Resource.root + 'version.txt' }) + const latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) isTimeout = false if (settings.currentVersion !== latestVersion) { console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`) diff --git a/bilibili-evolved.preview.user.js b/bilibili-evolved.preview.user.js index 5cfd271fa..3002a0152 100644 --- a/bilibili-evolved.preview.user.js +++ b/bilibili-evolved.preview.user.js @@ -2817,7 +2817,7 @@ class ResourceManager { url, responseType: 'blob', })) - const latestVersion = await Ajax.monkey({ url: Resource.root + 'version.txt' }) + const latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) isTimeout = false if (settings.currentVersion !== latestVersion) { console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`) diff --git a/bilibili-evolved.user.js b/bilibili-evolved.user.js index fa53a2c99..bca7676ce 100644 --- a/bilibili-evolved.user.js +++ b/bilibili-evolved.user.js @@ -2817,7 +2817,7 @@ class ResourceManager { url, responseType: 'blob', })) - const latestVersion = await Ajax.monkey({ url: Resource.root + 'version.txt' }) + const latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) isTimeout = false if (settings.currentVersion !== latestVersion) { console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`) diff --git a/src/client/resource-manager.js b/src/client/resource-manager.js index cc4f76ef3..1b02596cb 100644 --- a/src/client/resource-manager.js +++ b/src/client/resource-manager.js @@ -266,7 +266,7 @@ export class ResourceManager { url, responseType: 'blob', })) - const latestVersion = await Ajax.monkey({ url: Resource.root + 'version.txt' }) + const latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) isTimeout = false if (settings.currentVersion !== latestVersion) { console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`) From 5784366778f5eb08de89f43927e51f1812ce89a9 Mon Sep 17 00:00:00 2001 From: the1812 Date: Mon, 23 Mar 2020 23:55:56 +0800 Subject: [PATCH 2/2] Add version file to bundle --- bilibili-evolved.offline.user.js | 10 ++++++++-- bilibili-evolved.preview-offline.user.js | 10 ++++++++-- bilibili-evolved.preview.user.js | 8 +++++++- bilibili-evolved.user.js | 8 +++++++- builder/dotnet/BundleBuilder.cs | 1 + builder/dotnet/publish/build.dll | Bin 1453056 -> 1453056 bytes min/bundle.zip | Bin 1714820 -> 1714925 bytes src/client/resource-manager.js | 8 +++++++- 8 files changed, 38 insertions(+), 7 deletions(-) diff --git a/bilibili-evolved.offline.user.js b/bilibili-evolved.offline.user.js index 372096623..1efccea18 100644 --- a/bilibili-evolved.offline.user.js +++ b/bilibili-evolved.offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Offline) -// @version 616.32 +// @version 616.33 // @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -2758,7 +2758,13 @@ class ResourceManager { url, responseType: 'blob', })) - const latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) + let latestVersion + const zipVersion = zip.file('version.txt') + if (zipVersion) { + latestVersion = await zipVersion.async('text') + } else { + latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) + } isTimeout = false if (settings.currentVersion !== latestVersion) { console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`) diff --git a/bilibili-evolved.preview-offline.user.js b/bilibili-evolved.preview-offline.user.js index 8a75426e1..dba09e647 100644 --- a/bilibili-evolved.preview-offline.user.js +++ b/bilibili-evolved.preview-offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Preview Offline) -// @version 616.32 +// @version 616.33 // @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -2758,7 +2758,13 @@ class ResourceManager { url, responseType: 'blob', })) - const latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) + let latestVersion + const zipVersion = zip.file('version.txt') + if (zipVersion) { + latestVersion = await zipVersion.async('text') + } else { + latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) + } isTimeout = false if (settings.currentVersion !== latestVersion) { console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`) diff --git a/bilibili-evolved.preview.user.js b/bilibili-evolved.preview.user.js index 3002a0152..e298e8c17 100644 --- a/bilibili-evolved.preview.user.js +++ b/bilibili-evolved.preview.user.js @@ -2817,7 +2817,13 @@ class ResourceManager { url, responseType: 'blob', })) - const latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) + let latestVersion + const zipVersion = zip.file('version.txt') + if (zipVersion) { + latestVersion = await zipVersion.async('text') + } else { + latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) + } isTimeout = false if (settings.currentVersion !== latestVersion) { console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`) diff --git a/bilibili-evolved.user.js b/bilibili-evolved.user.js index bca7676ce..f4c19b6ca 100644 --- a/bilibili-evolved.user.js +++ b/bilibili-evolved.user.js @@ -2817,7 +2817,13 @@ class ResourceManager { url, responseType: 'blob', })) - const latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) + let latestVersion + const zipVersion = zip.file('version.txt') + if (zipVersion) { + latestVersion = await zipVersion.async('text') + } else { + latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) + } isTimeout = false if (settings.currentVersion !== latestVersion) { console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`) diff --git a/builder/dotnet/BundleBuilder.cs b/builder/dotnet/BundleBuilder.cs index d98945575..aae3687d6 100644 --- a/builder/dotnet/BundleBuilder.cs +++ b/builder/dotnet/BundleBuilder.cs @@ -53,6 +53,7 @@ namespace BilibiliEvolved.Build zip.CreateEntryFromFile(url, filename, CompressionLevel.NoCompression); hashDict.Add(filename, hash); } + zip.CreateEntryFromFile("version.txt", "version.txt", CompressionLevel.NoCompression); } File.WriteAllText("min/bundle.json", JsonConvert.SerializeObject(hashDict, Formatting.Indented)); WriteSuccess("Bundle build complete."); diff --git a/builder/dotnet/publish/build.dll b/builder/dotnet/publish/build.dll index 548155c98a2f3b6b397477aaf3bcedea29b65df2..7aa086d4704feb836600cba4189b960dd81bea55 100644 GIT binary patch delta 5656 zcmai&33L=y7KZ<-bh@i63)LiKCn1DDhXe>)Ht7(MRoTNLJ4i%ONJ6s?j5Ixo2+9&H zmN0AqBO!`TB&=@ZKqiWVD=-rg9CA>^BPgg4MPcT?1?bi}V;^3nzW4w4-uGU;s;*{P z!$Zp&9x7X5`F_Xc>+4p%N}4%V zX{QvJUd7|crC|0MKutv;Dry~Sq@~3~1+W1Qbx9~-anfmOcAn|7UL76mu%y`>mZI)} ze%9_@3l#H1l(QH0wEZmHo@TWRRZFvK;>=w|HfyA_4_TaPbWq)IQ;)L;U`-8D-Pg?` zTVltH@rusIq9PqXI>mWdx&;qVpM?hFPE;tS6@}|o_hj=;TW4j9dDRxJ95;1sNyJB_ z2HC74zl{yYs=B{7w`kd(6cxqllIE1AD4M$6U5TBPRxf&x4o^Hv!rV+cOLn_RaTn2{ zs5j>wj6b=@jsW8K=^%8~nZe39v*;)zR$9pMS2_q@N(Ie)dwZqPTxyS3n+2NN?K#7L zXFvuGNL81xKWb0p1^F-IW~ephJxNBhwk|?D(7RbKDo}u(`jc zGxxW2D55Q{?@ErNy|Og8d+5*9MZ1u7+TGda--6w(*_yjQ*6uER6isPq3?1Z!(d_26 zkg!zEes@|lX{&QErI3y&lHBazOr%bCuGuLx(#lNkU1m*4f~-KgytKSR>~AVW>31uH z{eFcwrM)>QG&=6r%l#N-k;`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x3oS%w@f`Q z`iR?cS!$oq%xp*cqwQC?1Kl`zz_cBh!AT6wi*g^Q7Yn45Rq$e^k8>wBJj$Pc;wpAx zi;s0DzW1^2!hbjk=Pm?H5i=8|Mp}2lDrqCp9}p(#TSJ2NRm5=;al4T!HKRenZcLlP zpMM?{(2v{QXq4jYz)Ed5a;J(C>81qhYbciVnJLw}2j!f^_3pzWPNKv7T{z8RQlJ%H<+T9ljg%kv1`bwfwn%riT`&VJ82 zVC$<_zq|R?tS$`)|2!?Y`;>bp9D$Nwpi%)hwSpVenprjRr_e_jwa(Pekak8N+?-;Y zxhQ|#;c4#s_ixRc@y7NagY^Z?uKQ$X${g8AsdGMB@nucqw3Ac6oBVuiVyj5Wj=AhS zX?=2}(nas_$)_6!#3p)shOymsadFL)U4Eks0C9Cq1J(# djhdZWD77$Z;YUI)MBEysKA3Za{;T(f@;|*mcuN2P diff --git a/min/bundle.zip b/min/bundle.zip index c36a6371c1fe01c660c2992d5e8594ccfdfe7e87..d05d27fe8d80e8bbd8b8ba912f767895816b36a1 100644 GIT binary patch delta 182 zcmZp`R!y^@L&Lp?(SJwv1I rrSBwvTTg$(BgN&6O$SgD6aW<>>ksf|Wdq4P1VSSl28N|TX$A%WCsj4| delta 86 zcmWN^w+(F61dj7-cdm)h-pTJ>oe#lrPCpB7@X%H0nm)ErU( diff --git a/src/client/resource-manager.js b/src/client/resource-manager.js index 1b02596cb..bc08ef65e 100644 --- a/src/client/resource-manager.js +++ b/src/client/resource-manager.js @@ -266,7 +266,13 @@ export class ResourceManager { url, responseType: 'blob', })) - const latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) + let latestVersion + const zipVersion = zip.file('version.txt') + if (zipVersion) { + latestVersion = await zipVersion.async('text') + } else { + latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' }) + } isTimeout = false if (settings.currentVersion !== latestVersion) { console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`)