Skip to content

Commit

Permalink
Add back missing songs download
Browse files Browse the repository at this point in the history
  • Loading branch information
Metalit committed Jun 11, 2024
1 parent 7325da2 commit 10957a2
Show file tree
Hide file tree
Showing 4 changed files with 216 additions and 69 deletions.
19 changes: 16 additions & 3 deletions qpm.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
"tomb": [
"pwsh ./scripts/pull-tombstone.ps1 -analyze"
]
}
},
"qmodIncludeDirs": [],
"qmodIncludeFiles": [],
"qmodOutput": null
},
"dependencies": [
{
Expand Down Expand Up @@ -71,8 +74,8 @@
"id": "scotland2",
"versionRange": "^0.1.4",
"additionalData": {
"private": true,
"includeQmod": false
"includeQmod": false,
"private": true
}
},
{
Expand All @@ -94,6 +97,16 @@
"id": "paper",
"versionRange": "^3.6.1",
"additionalData": {}
},
{
"id": "web-utils",
"versionRange": "^0.6.5",
"additionalData": {}
},
{
"id": "beatsaverplusplus",
"versionRange": "^0.1.1",
"additionalData": {}
}
]
}
159 changes: 100 additions & 59 deletions qpm.shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,29 +98,34 @@
"id": "paper",
"versionRange": "^3.6.1",
"additionalData": {}
},
{
"id": "web-utils",
"versionRange": "^0.6.5",
"additionalData": {}
},
{
"id": "beatsaverplusplus",
"versionRange": "^0.1.1",
"additionalData": {}
}
]
},
"restoredDependencies": [
{
"dependency": {
"id": "paper",
"versionRange": "=3.6.3",
"id": "web-utils",
"versionRange": "=0.6.5",
"additionalData": {
"soLink": "https://github.com/Fernthedev/paperlog/releases/download/v3.6.3/libpaperlog.so",
"debugSoLink": "https://github.com/Fernthedev/paperlog/releases/download/v3.6.3/debug_libpaperlog.so",
"overrideSoName": "libpaperlog.so",
"modLink": "https://github.com/Fernthedev/paperlog/releases/download/v3.6.3/paperlog.qmod",
"branchName": "version/v3_6_3",
"compileOptions": {
"systemIncludes": [
"shared/utfcpp/source"
]
},
"soLink": "https://github.com/RedBrumbler/WebUtils/releases/download/v0.6.5/libweb-utils.so",
"debugSoLink": "https://github.com/RedBrumbler/WebUtils/releases/download/v0.6.5/debug_libweb-utils.so",
"overrideSoName": "libweb-utils.so",
"modLink": "https://github.com/RedBrumbler/WebUtils/releases/download/v0.6.5/WebUtils.qmod",
"branchName": "version/v0_6_5",
"cmake": false
}
},
"version": "3.6.3"
"version": "0.6.5"
},
{
"dependency": {
Expand All @@ -137,17 +142,78 @@
{
"dependency": {
"id": "bsml",
"versionRange": "=0.4.34",
"versionRange": "=0.4.40",
"additionalData": {
"soLink": "https://github.com/RedBrumbler/Quest-BSML/releases/download/v0.4.34/libbsml.so",
"debugSoLink": "https://github.com/RedBrumbler/Quest-BSML/releases/download/v0.4.34/debug_libbsml.so",
"soLink": "https://github.com/RedBrumbler/Quest-BSML/releases/download/v0.4.40/libbsml.so",
"debugSoLink": "https://github.com/RedBrumbler/Quest-BSML/releases/download/v0.4.40/debug_libbsml.so",
"overrideSoName": "libbsml.so",
"modLink": "https://github.com/RedBrumbler/Quest-BSML/releases/download/v0.4.34/BSML.qmod",
"branchName": "version/v0_4_34",
"modLink": "https://github.com/RedBrumbler/Quest-BSML/releases/download/v0.4.40/BSML.qmod",
"branchName": "version/v0_4_40",
"cmake": true
}
},
"version": "0.4.40"
},
{
"dependency": {
"id": "libil2cpp",
"versionRange": "=0.3.2",
"additionalData": {
"headersOnly": true,
"cmake": false
}
},
"version": "0.3.2"
},
{
"dependency": {
"id": "songcore",
"versionRange": "=1.1.13",
"additionalData": {
"soLink": "https://github.com/raineio/Quest-SongCore/releases/download/v1.1.13/libsongcore.so",
"debugSoLink": "https://github.com/raineio/Quest-SongCore/releases/download/v1.1.13/debug_libsongcore.so",
"overrideSoName": "libsongcore.so",
"modLink": "https://github.com/raineio/Quest-SongCore/releases/download/v1.1.13/SongCore.qmod",
"branchName": "version/v1_1_13",
"cmake": true
}
},
"version": "0.4.34"
"version": "1.1.13"
},
{
"dependency": {
"id": "tinyxml2",
"versionRange": "=10.0.0",
"additionalData": {
"soLink": "https://github.com/MillzyDev/NDK-tinyxml2/releases/download/v10.0.0/libtinyxml2.so",
"debugSoLink": "https://github.com/MillzyDev/NDK-tinyxml2/releases/download/v10.0.0/debug_libtinyxml2.so",
"overrideSoName": "libtinyxml2.so",
"modLink": "https://github.com/MillzyDev/NDK-tinyxml2/releases/download/v10.0.0/tinyxml2.qmod",
"branchName": "version/v10_0_0",
"cmake": true
}
},
"version": "10.0.0"
},
{
"dependency": {
"id": "paper",
"versionRange": "=3.6.3",
"additionalData": {
"soLink": "https://github.com/Fernthedev/paperlog/releases/download/v3.6.3/libpaperlog.so",
"debugSoLink": "https://github.com/Fernthedev/paperlog/releases/download/v3.6.3/debug_libpaperlog.so",
"overrideSoName": "libpaperlog.so",
"modLink": "https://github.com/Fernthedev/paperlog/releases/download/v3.6.3/paperlog.qmod",
"branchName": "version/v3_6_3",
"compileOptions": {
"systemIncludes": [
"shared/utfcpp/source"
]
},
"cmake": false
}
},
"version": "3.6.3"
},
{
"dependency": {
Expand Down Expand Up @@ -183,17 +249,6 @@
},
"version": "0.17.8"
},
{
"dependency": {
"id": "libil2cpp",
"versionRange": "=0.3.2",
"additionalData": {
"headersOnly": true,
"cmake": false
}
},
"version": "0.3.2"
},
{
"dependency": {
"id": "bs-cordl",
Expand All @@ -217,20 +272,6 @@
},
"version": "3700.0.0"
},
{
"dependency": {
"id": "songcore",
"versionRange": "=1.1.12",
"additionalData": {
"soLink": "https://github.com/raineio/Quest-SongCore/releases/download/v1.1.12/libsongcore.so",
"debugSoLink": "https://github.com/raineio/Quest-SongCore/releases/download/v1.1.12/debug_libsongcore.so",
"overrideSoName": "libsongcore.so",
"modLink": "https://github.com/raineio/Quest-SongCore/releases/download/v1.1.12/SongCore.qmod",
"branchName": "version/v1_1_12"
}
},
"version": "1.1.12"
},
{
"dependency": {
"id": "beatsaber-hook",
Expand All @@ -257,6 +298,21 @@
},
"version": "0.1.4"
},
{
"dependency": {
"id": "beatsaverplusplus",
"versionRange": "=0.1.1",
"additionalData": {
"soLink": "https://github.com/RedBrumbler/BeatSaverPlusPlus/releases/download/v0.1.1/libbeatsaverplusplus.so",
"debugSoLink": "https://github.com/RedBrumbler/BeatSaverPlusPlus/releases/download/v0.1.1/debug_libbeatsaverplusplus.so",
"overrideSoName": "libbeatsaverplusplus.so",
"modLink": "https://github.com/RedBrumbler/BeatSaverPlusPlus/releases/download/v0.1.1/BeatSaverPlusPlus.qmod",
"branchName": "version/v0_1_1",
"cmake": false
}
},
"version": "0.1.1"
},
{
"dependency": {
"id": "fmt",
Expand All @@ -275,21 +331,6 @@
}
},
"version": "10.0.0"
},
{
"dependency": {
"id": "tinyxml2",
"versionRange": "=10.0.0",
"additionalData": {
"soLink": "https://github.com/MillzyDev/NDK-tinyxml2/releases/download/v10.0.0/libtinyxml2.so",
"debugSoLink": "https://github.com/MillzyDev/NDK-tinyxml2/releases/download/v10.0.0/debug_libtinyxml2.so",
"overrideSoName": "libtinyxml2.so",
"modLink": "https://github.com/MillzyDev/NDK-tinyxml2/releases/download/v10.0.0/tinyxml2.qmod",
"branchName": "version/v10_0_0",
"cmake": true
}
},
"version": "10.0.0"
}
]
}
6 changes: 6 additions & 0 deletions shared/PlaylistCore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ namespace PlaylistCore {
/// @return The number of songs missing from the playlist
int PlaylistHasMissingSongs(Playlist* playlist);

/// @brief Attempts to download all missing songs from a playlist
/// @param playlist The playlist to download missing songs for
/// @param onFinished A main thread callback whenever all songs have downloaded
/// @param onProgress A main thread callback called immediately and whenever a song has downloaded - params (total, numFinished)
void DownloadMissingSongsFromPlaylist(Playlist* playlist, std::function<void()> onFinished, std::function<void(int, int)> onProgress);

/// @brief Removes songs that are supposed to be in a playlist but not owned from the playlist - only updates playlist JSON
/// @param playlist The playlist to remove missing songs from
void RemoveMissingSongsFromPlaylist(Playlist* playlist);
Expand Down
Loading

0 comments on commit 10957a2

Please sign in to comment.