This repository was archived by the owner on Oct 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 3030
3131use RuntimeException ;
3232use OCP \Files \IAppData ;
33+ use OCP \App \IAppManager ;
3334use OCP \Files \NotPermittedException ;
3435use OCP \Files \NotFoundException ;
3536use OCP \IConfig ;
@@ -40,6 +41,9 @@ class AppDataService {
4041 /** @var IAppData */
4142 private $ appData ;
4243
44+ /** @var IAppManager */
45+ private $ appManager ;
46+
4347 /** @var IConfig */
4448 private $ config ;
4549
@@ -51,11 +55,13 @@ class AppDataService {
5155
5256 public function __construct (
5357 IAppData $ appData ,
58+ IAppManager $ appManager ,
5459 IConfig $ config ,
5560 UtilsService $ utils ,
5661 PythonService $ pythonService
5762 ) {
5863 $ this ->appData = $ appData ;
64+ $ this ->appManager = $ appManager ;
5965 $ this ->config = $ config ;
6066 $ this ->utils = $ utils ;
6167 $ this ->pythonService = $ pythonService ;
@@ -102,8 +108,9 @@ public function getAppDataFolder(string $folderName): array {
102108 }
103109
104110 public function downloadPythonBinary (bool $ update = false ) {
105- $ url = 'https://github.com/bigcat88/cpa_py_bundles/releases/download/0.3.0-beta.1/cpa_ ' .
106- $ this ->getBinaryName () . '.gz ' ;
111+ $ url = 'https://github.com/andrey18106/mediadc/releases/download/v ' .
112+ $ this ->appManager ->getAppVersion (Application::APP_ID )
113+ . ' /cpa_ ' . $ this ->getBinaryName () . '.gz ' ;
107114 $ binariesFolder = $ this ->getAppDataFolder ('binaries ' );
108115 if (isset ($ binariesFolder ['success ' ]) && $ binariesFolder ['success ' ]) {
109116 $ dir = $ this ->getAppDataFolder ('binaries ' )['path ' ] . '/ ' ;
Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ class AppDataServiceTest extends TestCase {
4040 /** @var \OCP\Files\IAppData|MockObject */
4141 private $ iAppData ;
4242
43+ /** @var \OCP\App\IAppManager|MockObject */
44+ private $ iAppManager ;
45+
4346 /** @var \OCP\IConfig|MockObject */
4447 private $ iConfig ;
4548
@@ -51,11 +54,13 @@ class AppDataServiceTest extends TestCase {
5154
5255 public function setUp (): void {
5356 $ this ->iAppData = $ this ->createMock (\OCP \Files \IAppData::class);
57+ $ this ->iAppManager = $ this ->createMock (\OCP \App \IAppManager::class);
5458 $ this ->iConfig = $ this ->createMock (\OCP \IConfig::class);
5559 $ this ->utils = $ this ->createMock (\OCA \MediaDC \Service \UtilsService::class);
5660 $ this ->pythonService = $ this ->createMock (\OCA \MediaDC \Service \PythonService::class);
5761 $ this ->appDataService = new AppDataService (
5862 $ this ->iAppData ,
63+ $ this ->iAppManager ,
5964 $ this ->iConfig ,
6065 $ this ->utils ,
6166 $ this ->pythonService
You can’t perform that action at this time.
0 commit comments