python admin_panel.pyThen follow the menu:
- View all updates
- Add new update
- Add fallback link
- Save changes
- Open
admin_panel.py - Scroll to
quick_add_example()function - Modify the example with your update details
- Uncomment the last line:
# quick_add_example() - Run:
python admin_panel.py
{
"metadata": {
"game_name": "Cricket 26",
"schema_version": "2.0", // Don't change
"supports_sequential_updates": true, // Don't change
"latest_version": "1.0.3" // Auto-updated by admin panel
},
"game_info": {
"latest_version": "1.0.3", // Current latest version
"all_versions": ["1.0.0", "1.0.1", "1.0.2", "1.0.3"],
"base_version": "1.0.0"
},
"updates": [
{
"update_id": 1, // Sequential number (1, 2, 3...)
"from_version": "1.0.0", // Starting version
"to_version": "1.0.1", // Ending version
"release_date": "2025-01-15", // YYYY-MM-DD format
"size_mb": 250, // Size in megabytes
"mandatory": true, // true/false
"description": "Brief description",
"changelog": [
"Change 1",
"Change 2"
],
"downloads": {
"primary": {
"type": "gdrive", // "gdrive" or "direct"
"name": "Display Name",
"url": "Full URL",
"file_id": "Google Drive ID", // Required for gdrive
"checksum": "SHA256 hash"
},
"fallback": [
// Same structure as primary, array of backup sources
]
}
}
],
"verification_manifests": {
"1.0.0": "GitHub API URL", // One entry per version
"1.0.1": "GitHub API URL"
}
}Interactive Mode:
python admin_panel.py
# Choose option 2
# Fill in the promptsQuick Add Mode:
admin = Cricket26AdminPanel("version.json")
admin.add_new_update(
from_ver="1.0.3",
to_ver="1.0.4",
gdrive_url="https://drive.google.com/file/d/YOUR_FILE_ID/view",
gdrive_file_id="YOUR_FILE_ID",
checksum="sha256_hash_here",
size_mb=420,
description="Bug fixes and new content",
changelog_list=[
"Fixed crash in career mode",
"Added new stadiums",
"Performance improvements"
]
)
admin.save_version_json()admin.add_fallback_link(
update_id=4, # Which update to add fallback to
link_type="direct", # "gdrive" or "direct"
name="CDN Mirror (US)",
url="https://cdn.example.com/patch.zip",
checksum="sha256_hash_here"
)admin.add_verification_manifest(
version="1.0.4",
github_api_url="https://api.github.com/repos/USER/REPO/contents/manifests/1.0.4_manifest.json"
)Get-FileHash "C:\path\to\patch.zip" -Algorithm SHA256sha256sum /path/to/patch.zipimport hashlib
def get_checksum(file_path):
sha256 = hashlib.sha256()
with open(file_path, 'rb') as f:
for chunk in iter(lambda: f.read(4096), b''):
sha256.update(chunk)
return sha256.hexdigest()
print(get_checksum("patch.zip"))URL: https://drive.google.com/file/d/1ABC123XYZ456/view?usp=sharing
File ID: 1ABC123XYZ456
โ This part
- Right-click file in Google Drive
- Click "Share"
- Change to "Anyone with the link"
- Set to "Viewer" permission
- Copy link
{
"type": "gdrive",
"name": "Google Drive Official",
"url": "https://drive.google.com/file/d/FILE_ID/view",
"file_id": "FILE_ID",
"checksum": "sha256_hash"
}{
"type": "direct",
"name": "CDN Mirror",
"url": "https://cdn.example.com/patch.zip",
"checksum": "sha256_hash"
}- Always backup before editing (admin panel does this automatically)
- Use sequential version numbers (1.0.0 โ 1.0.1 โ 1.0.2)
- Test download links before adding
- Generate SHA256 checksums for all files
- Add at least one fallback source
- Use descriptive names for download sources
- Keep changelog clear and user-friendly
- Skip versions (1.0.0 โ 1.0.2) โ
- Use same checksum for different files
- Add broken/expired links
- Forget to update latest_version
- Edit version.json manually without backup
- Remove old updates (breaks sequential installation)
- Check file permissions
- Make sure version.json isn't read-only
- Restore from
.json.backupfile - Validate JSON at https://jsonlint.com/
- Check
metadata.schema_versionis "2.0" - Verify
supports_sequential_updatesis true - Ensure
game_info.latest_versionmatches newest update
from admin_panel import Cricket26AdminPanel
# Initialize
admin = Cricket26AdminPanel("version.json")
# Add main update
admin.add_new_update(
from_ver="1.0.3",
to_ver="1.0.4",
gdrive_url="https://drive.google.com/file/d/1ABC123/view",
gdrive_file_id="1ABC123",
checksum="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
size_mb=380,
description="Winter Update - New features and fixes",
changelog_list=[
"Added 5 new international stadiums",
"New weather system with dynamic conditions",
"Fixed multiplayer lobby issues",
"Improved ball physics",
"UI/UX enhancements",
"Performance optimizations"
]
)
# Add fallback 1
admin.add_fallback_link(
update_id=4,
link_type="direct",
name="CDN Mirror (US)",
url="https://cdn.example.com/cricket26/1.0.3_to_1.0.4.zip",
checksum="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
)
# Add fallback 2
admin.add_fallback_link(
update_id=4,
link_type="gdrive",
name="Google Drive Backup",
url="https://drive.google.com/file/d/1XYZ789/view",
checksum="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
file_id="1XYZ789"
)
# Add verification manifest
admin.add_verification_manifest(
version="1.0.4",
github_api_url="https://api.github.com/repos/aman71711/CRICKET26_Utility/contents/manifests/1.0.4_manifest.json"
)
# Save all changes
admin.save_version_json()
print("โ
Update 1.0.4 added successfully with 2 fallback sources!")Last updated: 2025-02-15