📄 0.lua
字号:
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;;;0,7;;0,0,0,12;0,7,11,21,39;0,7,11,21,39;0,0,7,11,15,19,23,27,63;;0,12,16,20,24;;;;;;0,14,26;;;;;4,22,27,32,37,42,47,52,57,62,67,72;;380,385,387;51,53;;0,24;; 7902ce83_manila_598.luac
require("theme")
if _config_os == "windowsmobile" then
require("audio_manager_svc")
end
if _config_os == "windowsmobile" then
gPlayer = MusicPlayer_Instance()
gCurTrackIndex = nil
gOrder = nil
gParam = nil
gIndicatorIndex = gPlayer.CurTrackIndex
gShowIndicator = true
gNotifyFromRename = false
gIsWMPPlaylist = false
gEnterFrom_TreeList = false
end
gListView_Height = 80
gScreenWidth = 480
gScreenHeight = 800
gMaxTitleStringLength = 375
easeInOut = function(l_1_0, l_1_1, l_1_2, l_1_3)
l_1_0 = l_1_0 / l_1_3
if 2 * (l_1_0) < 1 then
return l_1_2 / 2 * (l_1_0) * (l_1_0) + l_1_1
else
l_1_0 = l_1_0 - 1
return -l_1_2 / 2 * ((l_1_0) * (l_1_0 - 2)) + l_1_1
end
end
easeOut = function(l_2_0, l_2_1, l_2_2, l_2_3)
l_2_0 = l_2_0 / l_2_3
return -l_2_2 * (l_2_0) * (l_2_0 - 2) + l_2_1
end
easeIn = function(l_3_0, l_3_1, l_3_2, l_3_3)
l_3_0 = l_3_0 / l_3_3
return l_3_2 * (l_3_0) * (l_3_0) + l_3_1
end
SetPlayingList = function(l_4_0)
if l_4_0 < 0 then
return
end
local l_4_1 = ItemListGenerator:GetData(l_4_0)
if MusicHelper_FileExists(l_4_1.FilePath) == false then
return
end
if gOrder ~= "0" then
if gPlayer.Shuffle == true then
gPlayer:Database():ShuffleNowPlayingList(l_4_0)
end
gPlayer:Database():SetPlayingList()
MusicConfig_Instance():SetSetting(CONFIG_NOWPLAYING_ORDER, gOrder)
local l = MusicConfig_Instance():GetSetting(CONFIG_CURRENT_ARTIST)
MusicConfig_Instance():SetSetting(CONFIG_NOWPLAYING_ARTIST, l)
l = MusicConfig_Instance():GetSetting(CONFIG_CURRENT_ALBUM)
MusicConfig_Instance():SetSetting(CONFIG_NOWPLAYING_ALBUM, l)
l = MusicConfig_Instance():GetSetting(CONFIG_CURRENT_GENRE)
MusicConfig_Instance():SetSetting(CONFIG_NOWPLAYING_GENRE, l)
l = MusicConfig_Instance():GetSetting(CONFIG_CURRENT_COMPOSER)
MusicConfig_Instance():SetSetting(CONFIG_NOWPLAYING_COMPOSER, l)
l = MusicConfig_Instance():GetSetting(CONFIG_CURRENT_PLAYLIST)
MusicConfig_Instance():SetSetting(CONFIG_NOWPLAYING_PLAYLIST, l)
end
gPlayer:ReloadListPlay(l_4_0)
url = URL("Manila://music.page")
url.Parameters:AddParameter("donotreload", "1")
_application.Navigation:Navigate(url)
end
HandleItemSelection = function(l_5_0)
if gOrder == "7" then
local ilg = ItemListGenerator:GetData(l_5_0)
if MusicHelper_LogicAnd(ilg.State, SONG_STATUS_DRM_VALID) ~= 0 then
SetPlayingList(l_5_0)
else
local url = URL("Manila://music/purchased/action.page")
url.Parameters:AddParameter("PurchaseFilePath", ilg.FilePath)
_application.Navigation:Navigate(url)
end
else
SetPlayingList(l_5_0)
end
end
HandleKeyForItem = function(l_6_0, l_6_1, l_6_2)
if l_6_1.Code == KeyCode_Return or l_6_1.Code == KeyCode_Space then
local l_6_3 = ItemListGenerator:GetIndexForItem(l_6_0)
if gOrder == "7" then
local ig = ItemListGenerator:GetData(l_6_3)
if MusicHelper_LogicAnd(ig.State, SONG_STATUS_DRM_VALID) ~= 0 then
SetPlayingList(l_6_3)
else
local url = URL("Manila://music/purchased/action.page")
url.Parameters:AddParameter("PurchaseFilePath", ig.Filepath)
_application.Navigation:Navigate(url)
end
else
SetPlayingList(l_6_3)
end
l_6_2.value = true
end
end
HandleSelectionForItem = function(l_7_0)
trace("[MG] OnSelection\n")
local l_7_1 = l_7_0.Namespace:FindName("title")
local l_7_2 = l_7_0.Namespace:FindName("albumartist")
l_7_1.Color = GetMainTextSelectedColor()
l_7_2.Color = GetSubTextSelectedColor()
local l_7_3 = ItemListGenerator:GetIndexForItem(l_7_0)
if l_7_3 < 0 or ItemListGenerator:GetCount() <= l_7_3 then
return
end
if gShowIndicator == true and l_7_3 == gIndicatorIndex then
local l_7_4 = l_7_0.Namespace:FindName("indicator")
l_7_4:SetTextureRef("music-nowplaying-indicator-focus")
end
end
HandleDeselectionForItem = function(l_8_0)
trace("[MG] OnDeSelection\n")
local l_8_1 = l_8_0.Namespace:FindName("title")
local l_8_2 = l_8_0.Namespace:FindName("albumartist")
l_8_1.Color = GetMainTextUnselectedColor()
l_8_2.Color = GetSubTextUnselectedColor()
local l_8_3 = ItemListGenerator:GetIndexForItem(l_8_0)
if l_8_3 < 0 or ItemListGenerator:GetCount() <= l_8_3 then
return
end
if gShowIndicator == true and l_8_3 == gIndicatorIndex then
local l_8_4 = l_8_0.Namespace:FindName("indicator")
l_8_4:SetTextureRef("music-nowplaying-indicator")
end
end
HandleItemCreated = function(l_9_0, l_9_1)
if _config_os == "windowsmobile" then
local l_9_2 = l_9_1.Namespace:FindName("title")
local l_9_3 = l_9_1.Namespace:FindName("albumartist")
local l_9_4 = l_9_1.Namespace:FindName("image")
local l_9_5 = l_9_1.Namespace:FindName("frame")
local l_9_6 = l_9_1.Namespace:FindName("seperator")
local l_9_7 = l_9_1.Namespace:FindName("indicator")
l_9_6.TextureCoords:set(0, 0, gScreenWidth / 2, 1)
l_9_6.Size.width = gScreenWidth
l_9_2.Size.width = gScreenWidth - 160
l_9_3.Size.width = gScreenWidth - 160
l_9_7.Position.x = gScreenWidth - 54
l_9_0.IsRealized = true
l_9_1.Tag = l_9_0
l_9_2.Color = GetMainTextUnselectedColor()
l_9_3.Color = GetSubTextUnselectedColor()
l_9_2.String = l_9_0.Title
l_9_3.String = l_9_0.Artist
local l_9_8 = true
if gOrder == "7" then
if MusicHelper_LogicAnd(l_9_0.State, SONG_STATUS_DRM_VALID) ~= 0 then
l_9_4:SetTextureRef("music-drm-unlock")
else
l_9_4:SetTextureRef("music-drm-lock")
end
else
l_9_8 = MusicHelper_FileExists(l_9_0.FilePath)
trace("[MG] artpath = " .. l_9_0.ArtPath .. "\n")
if l_9_8 == false then
l_9_4:SetTextureRef("MusicRemove")
elseif l_9_0.ArtPath ~= "" and MusicHelper_FileExists(l_9_0.ArtPath) == true then
l_9_4:SetTextureRef("Music_tile")
if ListImageLoader == nil then
ListImageLoader = ListImageLoaderClass()
end
ListImageLoader:AddImage(l_9_4, l_9_0)
else
l_9_4:SetTextureRef("Music_tile")
end
end
if gOrder == "11" or gOrder == "500" then
l_9_3.String = l_9_0.Album
end
l_9_1.Focusable = true
l_9_1.onKeyDown:connect(HandleKeyForItem)
l_9_1.OnSelected:connect(HandleSelectionForItem)
l_9_1.OnDeselected:connect(HandleDeselectionForItem)
local ig = ItemListGenerator:GetIndexForItem(l_9_1)
if gShowIndicator == true and ig == gIndicatorIndex then
l_9_7._visible = true
else
l_9_7._visible = false
end
else
local l_9_2 = l_9_1.Namespace:FindName("image")
local l_9_3 = Image()
l_9_3:LoadFile("C:\\" .. l_9_0 .. ".jpg")
l_9_2:SetTexture(l_9_3)
l_9_2:Clear()
end
end
HandleItemDestroyed = function(l_10_0)
l_10_0.Tag.IsRealized = false
l_10_0.onKeyDown:disconnect(HandleKeyForItem)
l_10_0.OnSelected:disconnect(HandleSelectionForItem)
l_10_0.OnDeselected:disconnect(HandleDeselectionForItem)
end
OnPlayingIndexChange = function(l_11_0)
if l_11_0 == gIndicatorIndex then
return
end
if gShowIndicator == false then
return
end
local l_11_1 = ItemListGenerator:GetItem(l_11_0)
local l_11_2 = ItemListGenerator:GetItem(gIndicatorIndex)
local l_11_3 = l_11_1.Namespace:FindName("indicator")
local l_11_4 = l_11_2.Namespace:FindName("indicator")
l_11_3._visible = true
l_11_4._visible = false
trace("[MG] index change. from " .. ItemListGenerator.SelectedIndex .. " to " .. l_11_0 .. "\n")
if ItemListGenerator.SelectedIndex == l_11_0 then
l_11_3:SetTextureRef("music-nowplaying-indicator-focus")
else
l_11_3:SetTextureRef("music-nowplaying-indicator")
end
gIndicatorIndex = l_11_0
end
OnActivate = function()
if _application.Visibility == true then
gPlayer:Activated()
end
end
OnNavigateOutTo = function(l_13_0)
ListPhysics:DisconnectMouseEvents()
gPlayer.onPlayingIndexChange:disconnect(OnPlayingIndexChange)
gPlayer.onListChange:disconnect(OnListChange)
_application.OnVisibilityChanged:disconnect(OnActivate)
_request.NavigateOutTo:disconnect(OnNavigateOutTo)
_request.NavigateInFrom:disconnect(OnNavigateInFrom)
Transition(l_13_0, "Out")
end
OnNavigateInFrom = function(l_14_0)
_request.NavigateInFrom:disconnect(OnNavigateInFrom)
Transition(l_14_0, "In")
end
GotoAddSongsPage = function()
_application.Navigation:Navigate(URL("Manila://music/playlist/AddSongs/musicaddby_artist.page"))
end
ShowMenu = function()
if gOrder == "30" then
URLLink = "Manila://music-browser-playlist-songs.dialog"
else
return
end
DialogRequest = _application.DialogManager:GetDialog(URL(URLLink))
DialogRequest.OnExit:connect(DialogCallback)
DialogRequest:Show()
end
DialogCallback = function(l_17_0)
l_17_0.OnExit:disconnect(DialogCallback)
listview:Focus()
if l_17_0.Result.ExitType == DialogExitType_Cancel then
return
end
local l_17_1 = nil
if gOrder == "30" then
l_17_1 = MusicConfig_Instance():GetSetting(CONFIG_CURRENT_PLAYLIST)
end
local l_17_2 = ItemListGenerator:GetCount()
if l_17_0.Result.UserValue == "AddSong" then
if gIsWMPPlaylist == false and l_17_1 ~= nil then
GotoAddSongsPage()
end
elseif l_17_0.Result.UserValue == "Player" then
_application.Navigation:Navigate(URL("Manila://music.page"))
elseif l_17_0.Result.UserValue == "ChangeOrder" then
if gIsWMPPlaylist == false and l_17_1 ~= nil and l_17_2 > 0 then
_application.Navigation:Navigate(URL("Manila://music/playlist/Edit/rearrangeplaylist.page"))
end
elseif l_17_0.Result.UserValue == "Copy to Playlist" then
if gIsWMPPlaylist == false and l_17_1 ~= nil and l_17_2 > 0 then
_application.Navigation:Navigate(URL("Manila://music/playlist/AddCopyTo/Copyto/copytoplaylist.page"))
end
elseif l_17_0.Result.UserValue == "Rename" then
if gIsWMPPlaylist == false and l_17_1 ~= nil then
gNotifyFromRename = true
_application.Navigation:Navigate(URL("Manila://music/playlist/Input/Rename/rename_playlist.page"))
end
elseif l_17_0.Result.UserValue == "DeleteSong" then
if gIsWMPPlaylist == false and l_17_1 ~= nil and l_17_2 > 0 then
_application.Navigation:Navigate(URL("Manila://music/playlist/Delete/D_Songs/deletesongs.page"))
end
end
end
GotoUpLayer = function()
_application.Navigation:NavigateBack()
end
RSKFunction = function()
ShowMenu()
end
RSKFunctionPlayer = function()
_application.Navigation:Navigate(URL("Manila://music.page"))
end
LSKFunction = function()
GotoUpLayer()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -