Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b804d2ce13 | |||
| b772223dc2 |
+20
-2
@@ -2345,12 +2345,30 @@ foreach ($file in $files) {
|
||||
$name = Escape-LuaString($file.BaseName)
|
||||
$duration = Get-TrackDurationSeconds -File $file
|
||||
|
||||
# Derive the subfolder (path under Media\ minus the file leaf). Empty
|
||||
# string means the track lives directly under Media\. This is what the
|
||||
# addon uses to build folder auto-playlists in the header dropdown.
|
||||
$folderRaw = ''
|
||||
$lastSlash = $relative.LastIndexOf('\')
|
||||
if ($lastSlash -ge 0) {
|
||||
$folderRaw = $relative.Substring(0, $lastSlash)
|
||||
}
|
||||
$folder = Escape-LuaString($folderRaw)
|
||||
|
||||
# dateAdded: seconds since Unix epoch based on file creation time (UTC).
|
||||
# Falls back to LastWriteTime if CreationTime is zero for some reason.
|
||||
$ctime = $file.CreationTimeUtc
|
||||
if ($ctime.Year -lt 1971) { $ctime = $file.LastWriteTimeUtc }
|
||||
$epoch = [int][Math]::Floor(($ctime - (New-Object DateTime 1970, 1, 1, 0, 0, 0, ([DateTimeKind]::Utc))).TotalSeconds)
|
||||
|
||||
$size = [int64]$file.Length
|
||||
|
||||
if ($duration -eq $DEFAULT_DURATION) {
|
||||
$defaultCount++
|
||||
}
|
||||
|
||||
$fmtLuaEntry = ' {{ path = "{0}", name = "{1}", duration = {2} }},'
|
||||
$lines.Add(($fmtLuaEntry -f $luaPath, $name, $duration)) | Out-Null
|
||||
$fmtLuaEntry = ' {{ path = "{0}", name = "{1}", duration = {2}, folder = "{3}", dateAdded = {4}, size = {5} }},'
|
||||
$lines.Add(($fmtLuaEntry -f $luaPath, $name, $duration, $folder, $epoch, $size)) | Out-Null
|
||||
}
|
||||
|
||||
$lines.Add('}') | Out-Null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<img src="https://cdn.discordapp.com/attachments/1510333697277300856/1523253951594627112/I.png?ex=6a4b704a&is=6a4a1eca&hm=4b4a2c04ae8702c5ff92cc50296ceb65d4c5c13f1174fc767fd7f3c4351337fc&"/>
|
||||
<img src="https://cdn.discordapp.com/attachments/1158418666883395656/1525865531914326178/I.png?ex=6a54f084&is=6a539f04&hm=bb45f6e1f19bd36e725d0b59ec45d9ba6c44a9d61317bbe337c11199dea2c5fd&"/>
|
||||
|
||||
<img src="https://cdn.discordapp.com/attachments/1510333697277300856/1523253988269756616/ezgif-1f660e370df27e35.gif?ex=6a4b7053&is=6a4a1ed3&hm=0835c0247c885d0fb6d25b86064a792989ab1d6a8f1c91570b30e7936fc7bd16&"/>
|
||||
<img src="https://cdn.discordapp.com/attachments/1158418666883395656/1525865506266026014/ezgif-1f660e370df27e35.gif?ex=6a54f07d&is=6a539efd&hm=855171ddda7550fcb92ee2130f9cf007b9e84562c06f350e81ee7097a7c25b96&"/>
|
||||
|
||||
|
||||
# Relationships Jukebox
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
## Title: Relationships Jukebox
|
||||
## Notes: Simple in-game MP3/WAV/OGG player with GUI.
|
||||
## Author: Relationship
|
||||
## Version: 1.4
|
||||
## Version: 1.5
|
||||
## SavedVariables: RelationshipsJukeboxDB
|
||||
## X-Website: https://github.com/Relationship-OctoWoW/RelationshipsJukeBox
|
||||
## X-GitHub: https://github.com/Relationship-OctoWoW/RelationshipsJukeBox
|
||||
|
||||
Reference in New Issue
Block a user