├── README.md ├── eboot.bin ├── git ├── shared.lua ├── thread_net.lua ├── updater.lua └── updater │ ├── param.sfo │ └── script.lua ├── resources ├── back.png └── tubevita.png ├── sce_sys ├── icon0.png ├── livearea │ └── contents │ │ ├── bg.png │ │ ├── startup.png │ │ └── template.xml ├── package │ ├── head.bin │ └── work.bin └── param.sfo ├── script.lua └── version /README.md: -------------------------------------------------------------------------------- 1 | # TubeVita 2 | Simple application to use youtube on PSVITA 3 | Download the vpk file, install with vitashell. You do not need to register on Youtube to watch the videos 4 | # Changelog: 5 | v1.01 6 | -Added splash screen 7 | -Added some initial code for the next releases 8 | -ordered code 9 | v1.00 10 | -First Release 11 | # Credits 12 | - Team OneLua 13 | - TheFloW Pkg installer & USB Modules. 14 | - Yifan-lu, XYZ and Davee and every coder and dev contributing to Vitasdk. 15 | - Team Molecule for Henkaku. 16 | -------------------------------------------------------------------------------- /eboot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theheroGAC/TubeVita/286b7df4d9889b4718d4eb5a053c38e8fd662693/eboot.bin -------------------------------------------------------------------------------- /git/shared.lua: -------------------------------------------------------------------------------- 1 | -- Constants 2 | 3 | APP_REPO = "theheroGAC" 4 | APP_PROJECT = "TubeVita" --here name of repo in github...your vpk is QuickLaunch_installer_for_PSVita.vpk 5 | 6 | APP_VERSION_MAJOR = 0x01 -- major.minor 7 | APP_VERSION_MINOR = 0x03 8 | 9 | APP_VERSION = ((APP_VERSION_MAJOR << 0x18) | (APP_VERSION_MINOR << 0x10)) -- Union Binary 10 | -------------------------------------------------------------------------------- /git/thread_net.lua: -------------------------------------------------------------------------------- 1 | dofile("git/shared.lua") 2 | 3 | UPDATE_PORT = channel.new("UPDATE_PORT") 4 | 5 | local version = http.get(string.format("https://raw.githubusercontent.com/%s/%s/master/version", APP_REPO, APP_PROJECT)) 6 | if version and tonumber(version) then 7 | version = tonumber(version) 8 | local major = (version >> 0x18) & 0xFF; 9 | local minor = (version >> 0x10) & 0xFF; 10 | if version > APP_VERSION then 11 | UPDATE_PORT:push(version) 12 | end 13 | end -------------------------------------------------------------------------------- /git/updater.lua: -------------------------------------------------------------------------------- 1 | dofile("git/shared.lua") 2 | 3 | if files.exists("ux0:/app/ONEUPDATE") then 4 | game.delete("ONEUPDATE") -- Exists delete update app 5 | end 6 | 7 | UPDATE_PORT = channel.new("UPDATE_PORT") 8 | 9 | local scr_flip = screen.flip 10 | function screen.flip() 11 | scr_flip() 12 | if UPDATE_PORT:available() > 0 then 13 | local version = UPDATE_PORT:pop() 14 | local major = (version >> 0x18) & 0xFF; 15 | local minor = (version >> 0x10) & 0xFF; 16 | if os.message(string.format("%s%s", APP_PROJECT, string.format("%X.%02X",major, minor).." is now available.\n".."Do you want to update the application?"), 1) == 1 then 17 | buttons.homepopup(0) 18 | 19 | local url = string.format("https://github.com/%s/%s/releases/download/%s/%s", APP_REPO, APP_PROJECT, string.format("%X.%02X",major, minor), APP_PROJECT..".vpk") 20 | local path = "ux0:data/"..APP_PROJECT..".vpk" 21 | local onAppInstallOld = onAppInstall 22 | function onAppInstall(step, size_argv, written, file, totalsize, totalwritten) 23 | return 10 -- Ok code 24 | end 25 | local onNetGetFileOld = onNetGetFile 26 | function onNetGetFile(size,written,speed) 27 | if back then back:blit(0,0) end 28 | screen.print(10,10,"Downloading Update...") 29 | screen.print(10,30,"Size: "..tostring(size).." Written: "..tostring(written).." Speed: "..tostring(speed).."Kb/s") 30 | screen.print(10,50,"Porcent: "..math.floor((written*100)/size).."%") 31 | draw.fillrect(0,520,((written*960)/size),24,color.new(0,255,0)) 32 | screen.flip() 33 | buttons.read() 34 | if buttons.circle then return 0 end --Cancel or Abort 35 | return 1; 36 | end 37 | local res = http.getfile(url, path) 38 | if res then -- Success! 39 | files.mkdir("ux0:/data/1luapkg") 40 | files.copy("eboot.bin","ux0:/data/1luapkg") 41 | files.copy("git/updater/script.lua","ux0:/data/1luapkg/") 42 | files.copy("git/updater/param.sfo","ux0:/data/1luapkg/sce_sys/") 43 | game.installdir("ux0:/data/1luapkg") 44 | files.delete("ux0:/data/1luapkg") 45 | game.launch(string.format("ONEUPDATE&%s&%s",os.titleid(),path)) -- Goto installer extern! 46 | end 47 | onAppInstall = onAppInstallOld 48 | onNetGetFile = onNetGetFileOld 49 | buttons.homepopup(1) 50 | end 51 | end 52 | end 53 | 54 | THID = thread.new("git/thread_net.lua") 55 | -------------------------------------------------------------------------------- /git/updater/param.sfo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theheroGAC/TubeVita/286b7df4d9889b4718d4eb5a053c38e8fd662693/git/updater/param.sfo -------------------------------------------------------------------------------- /git/updater/script.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Updater Of App. 3 | Designed by DevDavisNunez to ONElua projects.. :D 4 | TODO: 5 | Maybe, extract in APP, and only installdir in this.. 6 | ]] 7 | 8 | buttons.homepopup(0) 9 | 10 | color.loadpalette() 11 | 12 | args = os.arg() 13 | if args:len() == 0 then 14 | os.message("Error args lost!") 15 | os.exit() 16 | end 17 | 18 | args /= "&" 19 | if #args != 3 then 20 | os.message("Error args lost!") 21 | os.exit() 22 | end 23 | 24 | function onAppInstall(step, size_argv, written, file, totalsize, totalwritten) 25 | 26 | if step == 1 then -- Only msg of state 27 | draw.fillrect(0,0,960,30, color.green:a(100)) 28 | screen.print(10,10,"Search in vpk, Unsafe or Dangerous files!") 29 | screen.flip() 30 | elseif step == 2 then -- Warning Vpk confirmation! 31 | return 10 -- Ok 32 | elseif step == 3 then -- Unpack 33 | draw.fillrect(0,0,960,30, color.green:a(100)) 34 | screen.print(10,10,"Unpack vpk...") 35 | screen.print(925,10,"Percent Total: "..math.floor((totalwritten*100)/totalsize).." %",1.0,color.white, color.black, __ARIGHT) 36 | screen.print(10,35,"File: "..tostring(file)) 37 | screen.print(10,55,"Percent: "..math.floor((written*100)/size_argv).." %") 38 | draw.fillrect(0,544-30,(totalwritten*960)/totalsize,30, color.new(0,255,0)) 39 | screen.flip() 40 | elseif step == 4 then -- Promote or install 41 | draw.fillrect(0,0,960,30, color.green:a(100)) 42 | screen.print(10,10,"Installing...") 43 | screen.flip() 44 | end 45 | end 46 | 47 | game.install(args[3]) 48 | files.delete(args[3]) 49 | 50 | buttons.homepopup(1) 51 | 52 | game.launch(args[2]) -------------------------------------------------------------------------------- /resources/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theheroGAC/TubeVita/286b7df4d9889b4718d4eb5a053c38e8fd662693/resources/back.png -------------------------------------------------------------------------------- /resources/tubevita.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theheroGAC/TubeVita/286b7df4d9889b4718d4eb5a053c38e8fd662693/resources/tubevita.png -------------------------------------------------------------------------------- /sce_sys/icon0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theheroGAC/TubeVita/286b7df4d9889b4718d4eb5a053c38e8fd662693/sce_sys/icon0.png -------------------------------------------------------------------------------- /sce_sys/livearea/contents/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theheroGAC/TubeVita/286b7df4d9889b4718d4eb5a053c38e8fd662693/sce_sys/livearea/contents/bg.png -------------------------------------------------------------------------------- /sce_sys/livearea/contents/startup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theheroGAC/TubeVita/286b7df4d9889b4718d4eb5a053c38e8fd662693/sce_sys/livearea/contents/startup.png -------------------------------------------------------------------------------- /sce_sys/livearea/contents/template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bg.png 6 | 7 | 8 | 9 | startup.png 10 | 11 | 12 | 13 | 14 | 15 | 16 | TubeVita 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | by theheroGAC 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | v1.03 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /sce_sys/package/head.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theheroGAC/TubeVita/286b7df4d9889b4718d4eb5a053c38e8fd662693/sce_sys/package/head.bin -------------------------------------------------------------------------------- /sce_sys/package/work.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sce_sys/param.sfo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theheroGAC/TubeVita/286b7df4d9889b4718d4eb5a053c38e8fd662693/sce_sys/param.sfo -------------------------------------------------------------------------------- /script.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | TubeVita 1.01 3 | Creato da TheheroGAC (GAMESANDCONSOLES.ORG) sab 2 dec 2017 15:23:47 CET 4 | Licensed by Creative Commons Attribution-ShareAlike 4.0 5 | http://creativecommons.org/licenses/by-sa/4.0/ 6 | 7 | # script.lua 8 | # 9 | # TubeVita è un'applicazione creata con ONELua (grazie al Team OneLua) per vedere i video di Youtube su PSVITA 10 | # Sentitevi liberi di modificare il codice sorgente 11 | ]] 12 | 13 | -- ## Auto Update ## 14 | dofile("git/updater.lua") 15 | 16 | -- ## MESSAGGIO DI CARICAMENTO ## 17 | game.close() 18 | screen.print(5, 5, 'Loading Tubevita...'); screen.flip() 19 | splash.show("resources/tubevita.png") 20 | 21 | -- ## IMMAGINE DI SFONDO ## 22 | back = image.load("resources/back.png") 23 | 24 | 25 | -- ## MENU' PRINCIPALE ## 26 | while true do 27 | buttons.read() 28 | if back then back:blit(0,0) end 29 | color.loadpalette() 30 | screen.print(910,30,"TubeVita",1,color.white,color.blue,__ARIGHT) 31 | screen.print(910,60,"v1.02",1,color.white,color.blue,__ARIGHT) 32 | 33 | -- ## Controlli ## 34 | 35 | screen.print(25, 40, "YouTube",1, color.red, color.black) 36 | screen.print(25, 65, "Playstation Channel",1, color.red, color.black) 37 | screen.print(25, 446, "Press X for Youtube",1, color.red, color.black) 38 | screen.print(25, 468, "Press Square for Playstation Channel",1, color.red, color.black) 39 | screen.print(25, 490, "Press Triangle for Exit ",1, color.red, color.black) 40 | 41 | if buttons.cross then os.uri ("webmodal: https://www.youtube.com/?gl=IT&hl=it&app=desktop&persist_app=1&client=mv-google") end 42 | if buttons.square then os.uri ("webmodal: https://www.youtube.com/user/PlayStation/videos") end 43 | if buttons.triangle then os.exit() end 44 | screen.flip() 45 | end -------------------------------------------------------------------------------- /version: -------------------------------------------------------------------------------- 1 | 16908288 2 | --------------------------------------------------------------------------------