Split GameIndustry hosts into separate FilterList entries per template

Co-authored-by: collinbarrett <6483057+collinbarrett@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-07-29 21:31:41 +00:00 committed by Collin Barrett
parent a3724f7b3d
commit aec85de610
9 changed files with 88478 additions and 13 deletions

View file

@ -142,6 +142,19 @@ When assigned to GitHub Issues requesting data updates, follow this comprehensiv
Complex relationships: Fork (upstream/downstream), Merge (includes/included), Dependent (dependencies).
### FilterListViewUrl Usage Guidelines
**Multiple FilterListViewUrls for a single FilterList are intended ONLY for**:
- **Mirrors**: Multiple hosting locations of the identical list content
- **Multiple Parts**: When the same list is broken into separate files/parts
**Different "flavors" or variants of a list should get separate FilterList entries**:
- Each variant/template should be its own FilterList entity
- Each FilterList should have a single primary ViewUrl (primariness: 1)
- Examples: Main template vs Gaming template vs Mobile template
**Reference**: https://github.com/collinbarrett/FilterLists/wiki/FilterListViewUrl
## API Conventions
### Minimal API Endpoints

3
.gitignore vendored
View file

@ -1 +1,2 @@
.DS_Store
.DS_Store
dotnet-install.sh

View file

@ -0,0 +1,177 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
{
/// <inheritdoc />
public partial class SplitGameIndustryHostsIntoSeparateEntries : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "FilterListViewUrl",
keyColumns: new[] { "FilterListId", "Id" },
keyValues: new object[] { 1706, 3072 });
migrationBuilder.DeleteData(
table: "FilterListViewUrl",
keyColumns: new[] { "FilterListId", "Id" },
keyValues: new object[] { 1706, 3073 });
migrationBuilder.UpdateData(
table: "FilterList",
keyColumn: "Id",
keyValue: 1706,
columns: new[] { "Description", "Name" },
values: new object[] { "Main template hosts file for blocking spyware, ads, analytics and tracking on German websites and domains.", "GameIndustry.eu Hosts Main Template" });
migrationBuilder.InsertData(
table: "FilterList",
columns: new[] { "Id", "ChatUrl", "Description", "DonateUrl", "EmailAddress", "ForumUrl", "HomeUrl", "IssuesUrl", "LicenseId", "Name", "OnionUrl", "PolicyUrl", "SubmissionUrl" },
values: new object[,]
{
{ 2740, null, "Gaming-focused hosts file for blocking spyware, ads, analytics and tracking with comprehensive gaming industry coverage.", null, null, null, "https://hosts.gameindustry.eu/", "https://github.com/KodoPengin/GameIndustry-hosts-Template/issues", 9, "GameIndustry.eu Hosts Gaming Full Template", null, null, null },
{ 2741, null, "Minimalist hosts file optimized for Android and mobile devices, blocking essential spyware, ads, and tracking.", null, null, null, "https://hosts.gameindustry.eu/", "https://github.com/KodoPengin/GameIndustry-hosts-Template/issues", 9, "GameIndustry.eu Hosts Android Mini Template", null, null, null }
});
migrationBuilder.InsertData(
table: "FilterListMaintainer",
columns: new[] { "FilterListId", "MaintainerId" },
values: new object[,]
{
{ 2740, 201 },
{ 2741, 201 }
});
migrationBuilder.InsertData(
table: "FilterListTag",
columns: new[] { "FilterListId", "TagId" },
values: new object[,]
{
{ 2740, 2 },
{ 2740, 3 },
{ 2740, 6 },
{ 2740, 19 },
{ 2740, 20 },
{ 2741, 2 },
{ 2741, 3 },
{ 2741, 6 },
{ 2741, 19 },
{ 2741, 20 }
});
migrationBuilder.InsertData(
table: "FilterListViewUrl",
columns: new[] { "FilterListId", "Id", "Primariness", "Url" },
values: new object[,]
{
{ 2740, 3072, (short)1, "https://raw.githubusercontent.com/KodoPengin/GameIndustry-hosts-Template/master/Gaming-Full-Template/hosts" },
{ 2741, 3073, (short)1, "https://raw.githubusercontent.com/KodoPengin/GameIndustry-hosts-Template/master/Android-Mini-Template/hosts" }
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "FilterListMaintainer",
keyColumns: new[] { "FilterListId", "MaintainerId" },
keyValues: new object[] { 2740, 201 });
migrationBuilder.DeleteData(
table: "FilterListMaintainer",
keyColumns: new[] { "FilterListId", "MaintainerId" },
keyValues: new object[] { 2741, 201 });
migrationBuilder.DeleteData(
table: "FilterListTag",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2740, 2 });
migrationBuilder.DeleteData(
table: "FilterListTag",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2740, 3 });
migrationBuilder.DeleteData(
table: "FilterListTag",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2740, 6 });
migrationBuilder.DeleteData(
table: "FilterListTag",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2740, 19 });
migrationBuilder.DeleteData(
table: "FilterListTag",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2740, 20 });
migrationBuilder.DeleteData(
table: "FilterListTag",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2741, 2 });
migrationBuilder.DeleteData(
table: "FilterListTag",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2741, 3 });
migrationBuilder.DeleteData(
table: "FilterListTag",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2741, 6 });
migrationBuilder.DeleteData(
table: "FilterListTag",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2741, 19 });
migrationBuilder.DeleteData(
table: "FilterListTag",
keyColumns: new[] { "FilterListId", "TagId" },
keyValues: new object[] { 2741, 20 });
migrationBuilder.DeleteData(
table: "FilterListViewUrl",
keyColumns: new[] { "FilterListId", "Id" },
keyValues: new object[] { 2740, 3072 });
migrationBuilder.DeleteData(
table: "FilterListViewUrl",
keyColumns: new[] { "FilterListId", "Id" },
keyValues: new object[] { 2741, 3073 });
migrationBuilder.DeleteData(
table: "FilterList",
keyColumn: "Id",
keyValue: 2740);
migrationBuilder.DeleteData(
table: "FilterList",
keyColumn: "Id",
keyValue: 2741);
migrationBuilder.UpdateData(
table: "FilterList",
keyColumn: "Id",
keyValue: 1706,
columns: new[] { "Description", "Name" },
values: new object[] { "Hosts file for blocking spyware, ads, analytics and tracking on German websites and domains.", "GameIndustry.eu Hosts" });
migrationBuilder.InsertData(
table: "FilterListViewUrl",
columns: new[] { "FilterListId", "Id", "Primariness", "Url" },
values: new object[,]
{
{ 1706, 3072, (short)2, "https://raw.githubusercontent.com/KodoPengin/GameIndustry-hosts-Template/master/Gaming-Full-Template/hosts" },
{ 1706, 3073, (short)3, "https://raw.githubusercontent.com/KodoPengin/GameIndustry-hosts-Template/master/Android-Mini-Template/hosts" }
});
}
}
}

View file

@ -11909,11 +11909,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
new
{
Id = 1706,
Description = "Hosts file for blocking spyware, ads, analytics and tracking on German websites and domains.",
Description = "Main template hosts file for blocking spyware, ads, analytics and tracking on German websites and domains.",
HomeUrl = "https://hosts.gameindustry.eu/",
IssuesUrl = "https://github.com/KodoPengin/GameIndustry-hosts-Template/issues",
LicenseId = 9,
Name = "GameIndustry.eu Hosts"
Name = "GameIndustry.eu Hosts Main Template"
},
new
{
@ -20298,6 +20298,24 @@ protected override void BuildModel(ModelBuilder modelBuilder)
LicenseId = 12,
Name = "AdGuard Ukrainian Filter",
PolicyUrl = "https://kb.adguard.com/en/general/adguard-filter-policy"
},
new
{
Id = 2740,
Description = "Gaming-focused hosts file for blocking spyware, ads, analytics and tracking with comprehensive gaming industry coverage.",
HomeUrl = "https://hosts.gameindustry.eu/",
IssuesUrl = "https://github.com/KodoPengin/GameIndustry-hosts-Template/issues",
LicenseId = 9,
Name = "GameIndustry.eu Hosts Gaming Full Template"
},
new
{
Id = 2741,
Description = "Minimalist hosts file optimized for Android and mobile devices, blocking essential spyware, ads, and tracking.",
HomeUrl = "https://hosts.gameindustry.eu/",
IssuesUrl = "https://github.com/KodoPengin/GameIndustry-hosts-Template/issues",
LicenseId = 9,
Name = "GameIndustry.eu Hosts Android Mini Template"
});
});
@ -32447,6 +32465,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2739,
MaintainerId = 46
},
new
{
FilterListId = 2740,
MaintainerId = 201
},
new
{
FilterListId = 2741,
MaintainerId = 201
});
});
@ -60121,6 +60149,56 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
FilterListId = 2738,
TagId = 5
},
new
{
FilterListId = 2740,
TagId = 2
},
new
{
FilterListId = 2740,
TagId = 3
},
new
{
FilterListId = 2740,
TagId = 6
},
new
{
FilterListId = 2740,
TagId = 19
},
new
{
FilterListId = 2740,
TagId = 20
},
new
{
FilterListId = 2741,
TagId = 2
},
new
{
FilterListId = 2741,
TagId = 3
},
new
{
FilterListId = 2741,
TagId = 6
},
new
{
FilterListId = 2741,
TagId = 19
},
new
{
FilterListId = 2741,
TagId = 20
});
});
@ -87837,17 +87915,17 @@ protected override void BuildModel(ModelBuilder modelBuilder)
},
new
{
FilterListId = 1706,
FilterListId = 2740,
Id = 3072,
Primariness = (short)2,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/KodoPengin/GameIndustry-hosts-Template/master/Gaming-Full-Template/hosts"
},
new
{
FilterListId = 1706,
FilterListId = 2741,
Id = 3073,
Primariness = (short)3,
Primariness = (short)1,
SegmentNumber = (short)0,
Url = "https://raw.githubusercontent.com/KodoPengin/GameIndustry-hosts-Template/master/Android-Mini-Template/hosts"
});

View file

@ -10439,12 +10439,12 @@
"name": "Synology's own"
},
{
"description": "Hosts file for blocking spyware, ads, analytics and tracking on German websites and domains.",
"description": "Main template hosts file for blocking spyware, ads, analytics and tracking on German websites and domains.",
"homeUrl": "https://hosts.gameindustry.eu/",
"id": 1706,
"issuesUrl": "https://github.com/KodoPengin/GameIndustry-hosts-Template/issues",
"licenseId": 9,
"name": "GameIndustry.eu Hosts"
"name": "GameIndustry.eu Hosts Main Template"
},
{
"description": "Categorized hosts files for DNS based content blocking. This is meant to be used as a regional component of a more comprehensive hosts list, such as Steven Black's hosts.",
@ -17935,5 +17935,21 @@
"licenseId": 12,
"name": "AdGuard Ukrainian Filter",
"policyUrl": "https://kb.adguard.com/en/general/adguard-filter-policy"
},
{
"description": "Gaming-focused hosts file for blocking spyware, ads, analytics and tracking with comprehensive gaming industry coverage.",
"homeUrl": "https://hosts.gameindustry.eu/",
"id": 2740,
"issuesUrl": "https://github.com/KodoPengin/GameIndustry-hosts-Template/issues",
"licenseId": 9,
"name": "GameIndustry.eu Hosts Gaming Full Template"
},
{
"description": "Minimalist hosts file optimized for Android and mobile devices, blocking essential spyware, ads, and tracking.",
"homeUrl": "https://hosts.gameindustry.eu/",
"id": 2741,
"issuesUrl": "https://github.com/KodoPengin/GameIndustry-hosts-Template/issues",
"licenseId": 9,
"name": "GameIndustry.eu Hosts Android Mini Template"
}
]

View file

@ -6150,5 +6150,13 @@
{
"filterListId": 2739,
"maintainerId": 46
},
{
"filterListId": 2740,
"maintainerId": 201
},
{
"filterListId": 2741,
"maintainerId": 201
}
]

View file

@ -13026,5 +13026,45 @@
{
"filterListId": 2738,
"tagId": 5
},
{
"filterListId": 2740,
"tagId": 2
},
{
"filterListId": 2740,
"tagId": 3
},
{
"filterListId": 2740,
"tagId": 6
},
{
"filterListId": 2740,
"tagId": 19
},
{
"filterListId": 2740,
"tagId": 20
},
{
"filterListId": 2741,
"tagId": 2
},
{
"filterListId": 2741,
"tagId": 3
},
{
"filterListId": 2741,
"tagId": 6
},
{
"filterListId": 2741,
"tagId": 19
},
{
"filterListId": 2741,
"tagId": 20
}
]

View file

@ -16835,15 +16835,15 @@
"url": "https://filters.adtidy.org/extension/ublock/filters/23.txt"
},
{
"filterListId": 1706,
"filterListId": 2740,
"id": 3072,
"primariness": 2,
"primariness": 1,
"url": "https://raw.githubusercontent.com/KodoPengin/GameIndustry-hosts-Template/master/Gaming-Full-Template/hosts"
},
{
"filterListId": 1706,
"filterListId": 2741,
"id": 3073,
"primariness": 3,
"primariness": 1,
"url": "https://raw.githubusercontent.com/KodoPengin/GameIndustry-hosts-Template/master/Android-Mini-Template/hosts"
}
]