mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-20 16:22:04 +00:00
change
This commit is contained in:
parent
b1694be4a2
commit
abe1947ba2
1 changed files with 16 additions and 12 deletions
|
|
@ -95,8 +95,6 @@ class LocalScraperService {
|
||||||
if (this.initialized) return;
|
if (this.initialized) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Ensure tapframe repository is available
|
|
||||||
await this.ensureTapframeRepository();
|
|
||||||
// Load repositories
|
// Load repositories
|
||||||
const repositoriesData = await AsyncStorage.getItem(this.REPOSITORIES_KEY);
|
const repositoriesData = await AsyncStorage.getItem(this.REPOSITORIES_KEY);
|
||||||
if (repositoriesData) {
|
if (repositoriesData) {
|
||||||
|
|
@ -135,7 +133,7 @@ class LocalScraperService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure tapframe repository is available for existing users too
|
// Ensure tapframe repository is available for all users
|
||||||
await this.ensureTapframeRepository();
|
await this.ensureTapframeRepository();
|
||||||
|
|
||||||
// Load current repository
|
// Load current repository
|
||||||
|
|
@ -275,15 +273,21 @@ class LocalScraperService {
|
||||||
// Check if any repository with the same URL already exists
|
// Check if any repository with the same URL already exists
|
||||||
for (const [id, repo] of this.repositories) {
|
for (const [id, repo] of this.repositories) {
|
||||||
if (repo.url === tapframeRepoUrl) {
|
if (repo.url === tapframeRepoUrl) {
|
||||||
// Update existing repository to use the tapframe ID and info
|
// If this is already a tapframe repository (by name or description), just update its ID
|
||||||
repo.id = tapframeRepoId;
|
if (repo.name === 'Tapframe\'s Repo' || repo.description?.includes('Tapframe')) {
|
||||||
repo.name = 'Tapframe\'s Repo';
|
repo.id = tapframeRepoId;
|
||||||
repo.description = 'Official Nuvio streaming plugins repository by Tapframe';
|
repo.name = 'Tapframe\'s Repo';
|
||||||
repo.isDefault = true;
|
repo.description = 'Official Nuvio streaming plugins repository by Tapframe';
|
||||||
this.repositories.delete(id);
|
repo.isDefault = true;
|
||||||
this.repositories.set(tapframeRepoId, repo);
|
this.repositories.delete(id);
|
||||||
await this.saveRepositories();
|
this.repositories.set(tapframeRepoId, repo);
|
||||||
return;
|
await this.saveRepositories();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// If this is a user's repository with the same URL, don't overwrite it
|
||||||
|
// Just create a new tapframe repository with a different ID
|
||||||
|
logger.log('[LocalScraperService] User repository with tapframe URL found, creating separate tapframe repository');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue