YouTube account support enabled

This commit is contained in:
Brahim Hadriche committed 2025-05-15 22:44:41 -04:00
1 parent 0e226cfc42
commit 89ec969c40
8 files changed
+56 -47

No files matched your search

+14
View File
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Added
- YouTube account support. The following features are now available:
- The ability to login to one or multiple accounts
- Both YouTube accounts and Invidious accounts are supported side-by-side
- Subscritions
- User playlists
- Watch History
- Watched videos on Playlet are added to the watch history
- Subscribe/Unsubscribe
- Recommended videos for logged in YouTube user are available in the home screen
- This feed can be enabled/disabled from the settings
- When an Invidious user is logged in, this becomes "popular" since Invidious does not support recommendations
### Fixed ### Fixed
- A bug where Session data did not refresh after 24 hours - A bug where Session data did not refresh after 24 hours
+1
View File
@@ -49,6 +49,7 @@ Can't install from the store? See [How to install Playlet as a sideloaded/dev ap
- 🔥 No Ads (Not now, not ever) - 🔥 No Ads (Not now, not ever)
- 🕵️ No Tracking - 🕵️ No Tracking
- 🛡️ Privacy driven (uses [Invidious](https://invidious.io/) backend) - 🛡️ Privacy driven (uses [Invidious](https://invidious.io/) backend)
- 🙋 User accounts (YouTube and Invidious accounts)
- ⚔️ [SponsorBlock](https://sponsor.ajay.app/) integration (skips undesirable sections in videos) - ⚔️ [SponsorBlock](https://sponsor.ajay.app/) integration (skips undesirable sections in videos)
- 📱 Browse, search, and cast from phone using the YouTube app or the browser - 📱 Browse, search, and cast from phone using the YouTube app or the browser
- 🔮 Picture-in-picture mode - 🔮 Picture-in-picture mode
+8 -7
View File
@@ -40,6 +40,7 @@ function MainSceneContainerChanged()
InitEcpArgs() InitEcpArgs()
m.scene.signalBeacon("AppLaunchComplete") m.scene.signalBeacon("AppLaunchComplete")
CopyLoadingMessagesToCache() CopyLoadingMessagesToCache()
ShowAnnouncement()
end function end function
function StartWebServer() function StartWebServer()
@@ -55,14 +56,14 @@ end function
function ShowAnnouncement() as void function ShowAnnouncement() as void
dialog = DialogUtils.ShowDialogOnce({ dialog = DialogUtils.ShowDialogOnce({
messageId: "1736288537" messageId: "1747362859"
title: "Announcement - Playlet backend" title: "Announcement - YouTube account support"
message: [ message: [
"An experimental built-in backend has been added to Playlet." "YouTube account support is now available in Playlet!"
"This allows you to access YouTube content without the need for an Invidious instance." `Subscriptions, playlists, watch history and "Recommended" are now available in the app.`
"To use it, go to the Settings > Invidious > Instance and set the field to empty (Edit, and delete the url)." "If you encounter any issues, please report them on GitHub."
"Please note that it's missing some features and may not work as expected." "https://github.com/iBicha/playlet/issues"
"Thank you for using Playlet!" "Thank you."
] ]
alwaysOnTop: true alwaysOnTop: true
marginWidth: 180 marginWidth: 180
@@ -39,6 +39,7 @@ function MainSceneContainerChanged()
InitEcpArgs() InitEcpArgs()
m.scene.signalBeacon("AppLaunchComplete") m.scene.signalBeacon("AppLaunchComplete")
CopyLoadingMessagesToCache() CopyLoadingMessagesToCache()
ShowAnnouncement()
end function end function
function StartWebServer() function StartWebServer()
@@ -52,14 +53,14 @@ end function
function ShowAnnouncement() as void function ShowAnnouncement() as void
dialog = DialogUtils_ShowDialogOnce({ dialog = DialogUtils_ShowDialogOnce({
messageId: "1736288537" messageId: "1747362859"
title: "Announcement - Playlet backend" title: "Announcement - YouTube account support"
message: [ message: [
"An experimental built-in backend has been added to Playlet." "YouTube account support is now available in Playlet!"
"This allows you to access YouTube content without the need for an Invidious instance." "Subscriptions, playlists, watch history and " + chr(34) + "Recommended" + chr(34) + " are now available in the app."
"To use it, go to the Settings > Invidious > Instance and set the field to empty (Edit, and delete the url)." "If you encounter any issues, please report them on GitHub."
"Please note that it's missing some features and may not work as expected." "https://github.com/iBicha/playlet/issues"
"Thank you for using Playlet!" "Thank you."
] ]
alwaysOnTop: true alwaysOnTop: true
marginWidth: 180 marginWidth: 180
@@ -40,14 +40,9 @@ function OnRowItemSelected() as void
row = m.profileRowList.content.GetChild(0) row = m.profileRowList.content.GetChild(0)
selectedProfile = row.GetChild(index) selectedProfile = row.GetChild(index)
if selectedProfile.type = "login" if selectedProfile.type = "login"
#if YT_OAUTH_SUPPORT backendTypeSelectionView = BackendTypeSelectionViewUtils.Open(m.appController)
backendTypeSelectionView = BackendTypeSelectionViewUtils.Open(m.appController) backendTypeSelectionView.observeFieldScoped("selectedBackendType", FuncName(OnBackEndSelected))
backendTypeSelectionView.observeFieldScoped("selectedBackendType", FuncName(OnBackEndSelected)) return
return
#else
LoginWithInvidious()
return
#end if
end if end if
ProfileViewUtils.Open(selectedProfile, m.appController) ProfileViewUtils.Open(selectedProfile, m.appController)
@@ -122,28 +122,26 @@ function MigrateExistingPreferences(userPrefs as object) as boolean
isDirty = true isDirty = true
end if end if
#if YT_OAUTH_SUPPORT if userPrefs.__version = 2
if userPrefs.__version = 2 if IsArray(userPrefs["misc.home_screen_layout"])
if IsArray(userPrefs["misc.home_screen_layout"]) homeScreenLayout = userPrefs["misc.home_screen_layout"]
homeScreenLayout = userPrefs["misc.home_screen_layout"] hasRecommended = false
hasRecommended = false for each item in homeScreenLayout
for each item in homeScreenLayout if item.id = "recommended"
if item.id = "recommended" hasRecommended = true
hasRecommended = true exit for
exit for
end if
end for
if not hasRecommended
homeScreenLayout.Unshift({
id: "recommended"
enabled: true
})
end if end if
end for
if not hasRecommended
homeScreenLayout.Unshift({
id: "recommended"
enabled: true
})
end if end if
userPrefs.__version = 3
isDirty = true
end if end if
#end if userPrefs.__version = 3
isDirty = true
end if
' TODO:P2 handle case where saved preferences version is higher than current version (e.g. user downgraded) ' TODO:P2 handle case where saved preferences version is higher than current version (e.g. user downgraded)
return isDirty return isDirty
+4 -5
View File
@@ -152,11 +152,10 @@
id: "subscriptions", id: "subscriptions",
enabled: true, enabled: true,
}, },
// YT_OAUTH_SUPPORT {
// { id: "recommended",
// id: "recommended", enabled: true,
// enabled: true, },
// },
{ {
id: "trending", id: "trending",
enabled: true, enabled: true,
+1 -1
View File
@@ -13,4 +13,4 @@ hidden=1
git_commit_sha=unknown git_commit_sha=unknown
bs_const=DEBUG=false;YT_OAUTH_SUPPORT=false bs_const=DEBUG=false