Post Reply 
playlists changed after minim refresh
22-05-2025, 20:37 (This post was last modified: 22-05-2025 20:38 by AnthonyEd.)
Post: #21
RE: playlists changed after minim refresh
# conversion locations
$sourceDirectory = "M:\MyPlaylists\toconvert"
$targetDirectory = "M:\MyPlaylists\converted"

# MinimServer content directory
$contentDirectory = @('M:\'
)

# indexed playlist directory
$playlistFolder = 'M:\MyPlaylists2'

(what does the $playlistFolder do? In my set up this folder has nothing in it. I just created it so I could add it to your config)

My existing URL playlist from Bubbleupnp is in this folder 'M:\MyPlaylists\toconvert'
Find all posts by this user
Quote this message in a reply
22-05-2025, 22:15
Post: #22
RE: playlists changed after minim refresh
(22-05-2025 20:37)AnthonyEd Wrote:  # MinimServer content directory
$contentDirectory = @('M:\'
)
I've never had MinimServer scan the root of a drive before. Normally the last folder in the content directory is part of the URL (after /minimserver/*/) but when there isn't a folder it uses <DRIVE>root (Mroot in your case I believe).

I should be able to fix it tomorrow, but the following settings should work for you (as they're relative):
Code:
$contentDirectory = @('M:\Mroot')
$playlistFolder = 'M:\Mroot\MyPlaylists2'
It's important that $playlistFolder is correct (see below).


(22-05-2025 20:37)AnthonyEd Wrote:  (what does the $playlistFolder do? In my set up this folder has nothing in it. I just created it so I could add it to your config)
Whilst you could use "M:\The Beates\1983 - Abbey Road\01\01.flac" in the playlist it's not very flexible (imagine you wanted to move your collection from M: to Z: or to M:\Music) so we use relative paths, which is why I need to know where your playlists are stored relative to the tracks.
Find all posts by this user
Quote this message in a reply
23-05-2025, 11:38
Post: #23
RE: playlists changed after minim refresh
This version should work when content directories are mounted in the root (on Windows) - assuming they're all named DRIVEroot in MinimServer.


Attached File(s)
.txt  convertPlaylists.txt (Size: 4 KB / Downloads: 4)
Find all posts by this user
Quote this message in a reply
23-05-2025, 11:57
Post: #24
RE: playlists changed after minim refresh
The special treatment of the Windows root directory (Mroot, etc.) is used for URLs and .mcache files. This applies only to Windows and will not change.
Find all posts by this user
Quote this message in a reply
24-05-2025, 11:19
Post: #25
RE: playlists changed after minim refresh
The Minimserver content directory is /volume1/Music1/Music7

So I changed my script to read as follows:

# conversion locations
$sourceDirectory = "\volume1\Music1\Music7\MyPlaylists\toconvert"
$targetDirectory = "\volume1\Music1\Music7\MyPlaylists\converted"

# MinimServer content directory
$contentDirectory = @('\volume1\Music1\Music7'
)

# indexed playlist directory
$playlistFolder = '\volume1\Music1\Music7\MyPlaylists2'

There was no output at all. Last time I got output in the $targetDirectory folder, but nothing this time.

Still not sure what playlistfolder does. The playlists are not stored anywhere as such. They are created in Bubble and then I move them manually to Minimserver. In this case I've moved them to both the $playlistFolder location and also the $sourceDirectory location just in case.
Find all posts by this user
Quote this message in a reply
24-05-2025, 11:21
Post: #26
RE: playlists changed after minim refresh
Just tried it without the volume1 part of the path. Same results.

# conversion locations
$sourceDirectory = "\Music1\Music7\MyPlaylists\toconvert"
$targetDirectory = "\Music1\Music7\MyPlaylists\converted"

# MinimServer content directory
$contentDirectory = @('\Music1\Music7'
)

# indexed playlist directory
$playlistFolder = '\Music1\Music7\MyPlaylists2'
Find all posts by this user
Quote this message in a reply
24-05-2025, 12:02 (This post was last modified: 24-05-2025 13:39 by simbun.)
Post: #27
RE: playlists changed after minim refresh
(24-05-2025 11:19)AnthonyEd Wrote:  The Minimserver content directory is /volume1/Music1/Music7

So I changed my script to read as follows:

# conversion locations
$sourceDirectory = "\volume1\Music1\Music7\MyPlaylists\toconvert"
$targetDirectory = "\volume1\Music1\Music7\MyPlaylists\converted"

# MinimServer content directory
$contentDirectory = @('\volume1\Music1\Music7'
)

# indexed playlist directory
$playlistFolder = '\volume1\Music1\Music7\MyPlaylists2'

The sourceDirectory and targetDirectory need to be locally addressable (processed in powershell) so go back to using the M:\ drive (they don't need to reside on the remote share they could be on C:\).

I think you're also using the old script so could you try with the new one (even though the old one should work with this setup).

(24-05-2025 11:19)AnthonyEd Wrote:  Still not sure what playlistfolder does. The playlists are not stored anywhere as such. They are created in Bubble and then I move them manually to Minimserver. In this case I've moved them to both the $playlistFolder location and also the $sourceDirectory location just in case.
The playlistFolder is where you intend to store the converted playlists (to be indexed by MinimServer). The script needs to know where your tracks are (contentDirectory + source playlists) in relation to the playlist (playlistFolder) so it can use relative paths. A decent explainer of absolute vs relative paths and the benefits can be found here (substitute 'current working directory' with 'playlist').

Having run the code against the URLs you sent me yesterday the output should look like:
Code:
..\Music\1_Various\Various Library\Various - Esterno Giorno D'Estate\...
..\Music\1_Various\The Mood Mosaic\The Mood Mosaic 05. Supervixens\...
..\Music\1_Various\The Mood Mosaic\The Mood Mosaic 18. The Shape Of Things\...
..\Music\1_Various\Various Library\Various - Esterno Giorno D'Estate\...
..\Music\1_Various\Cometa Edizioni Musicali\CMT 2 - Pulsar Music Ltd. - Pulsar Music Ltd. (1976) (OST to Milano Violenta)\...

EDIT: Obviously you don't want the temporary playlists stored in a location that MinimServer will index.
Find all posts by this user
Quote this message in a reply
24-05-2025, 12:07
Post: #28
RE: playlists changed after minim refresh
(23-05-2025 11:57)simoncn Wrote:  The special treatment of the Windows root directory (Mroot, etc.) is used for URLs and .mcache files. This applies only to Windows and will not change.
Thanks for the info.

It turns out M:\ was only the local mount of a remote share from which MinimiServer was running, but good to get it fixed.
Find all posts by this user
Quote this message in a reply
26-05-2025, 20:27
Post: #29
RE: playlists changed after minim refresh
I have working server side playlists now. Still couldnt get the path to be completely correct but wrote a quick powershell script to remove the first parts of the path and leave the bits I need:

# Specify your input file here
$InputFile = "C:\xxxx\xxxx\xxxx\xxxx\xxxx.m3u8" # Change this to your actual file path
$OutputFile = C:\xxxx\xxxx\xxxx\xxxx\xxxx.m3u8 # Set to a filename if you want to save to a different file

# Read all lines from the file
$lines = Get-Content -Path $InputFile

# Process lines starting from the third line (index 2)
for ($i = 0; $i -lt $lines.Count; $i++) {
if ($i -lt 2) {
# Keep the first two lines unchanged
continue
}

$line = $lines[$i]

# Check if line has enough characters
if ($line.Length -ge 21) {
# Remove characters 4-21 (indices 3-20)
$lines[$i] = $line.Substring(0, 3) + $line.Substring(21)
}
elseif ($line.Length -gt 3) {
# If line is shorter than 21 chars but longer than 3, remove from char 4 to end
$lines[$i] = $line.Substring(0, 3)
}
# If line has 3 or fewer characters, leave it unchanged
}

# Output the result
if ($OutputFile) {
$lines | Out-File -FilePath $OutputFile -Encoding UTF8
Write-Host "Processed file saved to: $OutputFile"
} else {
# If no output file specified, overwrite the original
$lines | Out-File -FilePath $InputFile -Encoding UTF8
Write-Host "Original file has been updated: $InputFile"
}
Find all posts by this user
Quote this message in a reply
26-05-2025, 22:40
Post: #30
RE: playlists changed after minim refresh
(26-05-2025 20:27)AnthonyEd Wrote:  I have working server side playlists now. Still couldnt get the path to be completely correct but wrote a quick powershell script to remove the first parts of the path and leave the bits I need
I assume this script modifies the output of mine, but it doesn't make sense (checking line lengths after row 3?). If I run it on the procesed playlist it gives me:

Code:
..\rious Library\Various - Esterno Giorno D'Estate\(03) [Silvano D'Auria] Porto Cammelli.flac
..\e Mood Mosaic\The Mood Mosaic 05. Supervixens\02. Dance, Dance, Dance.flac
..\e Mood Mosaic\The Mood Mosaic 18. The Shape Of Things\01. Manu Dibango - Ceddo.flac
..\rious Library\Various - Esterno Giorno D'Estate\(05) [Gianni Oddi, Gianni Dell'Orso] Soul Meeting.flac
..\meta Edizioni Musicali\CMT 2 - Pulsar Music Ltd. - Pulsar Music Ltd. (1976) (OST to Milano Violenta)\01 Cat Theme Pulsar Music Ltd Milano Violenta.mp3
Which obviously won't work.

I'm happy to fix it if it needs fixing but I can't see that it does; I even modified it to simpliy the testing of more scenarios.

Were you getting any error messages in the MinimiServer log (MinimWatch > Show log) during a rescan?

If you send me a BubbleUPnP playlist (or part of it) I'll take a look, this assumes your paths are correct:
Content Directory '\volume1\Music1\Music7'
Remote Playlist Directory '\volume1\Music1\Music7\MyPlaylists2'

Are you sure you're storing them in MyPlaylists2?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)