[Solved] Inconsistent resource URLs between restarts

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
freewheeler
Posts: 3
Joined: Sun Apr 07, 2024 2:57 am

[Solved] Inconsistent resource URLs between restarts

Post by freewheeler »

(I suspect this isn't a bug as such, so I haven't yet followed the instructions for collecting "debug information" as described in the "How to ask for support" page. Happy to do so if needed.)

My UMS (13.8.1, running on GNU/Linux Ubuntu 22.04.4 LTS build 6.5.0-26-generic 64-bit) seems to build inconsistent URLs for a given audio track. So when I build a playlist in (say) BubbleUPnP, start listening through the playlist, pause for a day or two (during which time my UMS will likely get restarted), then subsequently try to resume the playlist, I get a "resource not found" error. Diagnosed as follows:

1) Checked the metadata of a particular track from the playlist:
http://.../get/591/01+-+Bellowhead+-+Rambling+Sailor.mp3

2) Restarted UMS.

3) Confirmed got the usual "resource not found" error in BubbleUPnP. Cleared the playlist and rebuilt exactly the same.

4) Checked the metadata of the same track:
http://.../get/1070/01+-+Bellowhead+-+Rambling+Sailor.mp3

Note the magic number between "/get/" and the filename portion of the URL has changed. I'm assuming this is what leads to BubbleUPnP giving the "resource not found" error.

Is there some way to get consistent resource URLs?
User avatar
mik_s
Moderator
Posts: 1171
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Inconsistent resource URLs between restarts

Post by mik_s »

I don't know anything about how to do playlists but I know if you use the web player to access UMS, the ID's are dynamic and are generated on the fly when a folder is browsed so are not guaranteed to be the same across restarts.

I will need to see your logs to see how you are using this though as I think the proper way of creating playlists does not need the url like you shown but the actual location of the file.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
freewheeler
Posts: 3
Joined: Sun Apr 07, 2024 2:57 am

Re: Inconsistent resource URLs between restarts

Post by freewheeler »

mik_s wrote: Sun Apr 07, 2024 4:51 am I don't know anything about how to do playlists but I know if you use the web player to access UMS, the ID's are dynamic and are generated on the fly when a folder is browsed so are not guaranteed to be the same across restarts.
Right, it's the extent to which the IDs are dynamic that I'm interested in. If they only change on rescan then I can live with that. But currently my UMS installation seems to be rescanning on startup (judging by the disk activity I can hear). If I can work out how to stop that, that might be good enough. Since my first post I've read that UMS does have a "scan shared folders on startup" option (as depicted here) but I can't find it anywhere. I'm running on Linux and (I think) I only have a web interface for configuring UMS (unless someone can advise how I might hack some config file). The <http://localhost:9001/shared> settings page has a button to "scan all shared folders" button but no "scan shared folders on startup" checkbox. Any suggestions?
mik_s wrote: Sun Apr 07, 2024 4:51 am I will need to see your logs to see how you are using this though as I think the proper way of creating playlists does not need the url like you shown but the actual location of the file.
To be clear, my playlist exists on the controller (BubbleUPnP), so I don't see how it could depend on anything other than the UMS generated URL.
freewheeler
Posts: 3
Joined: Sun Apr 07, 2024 2:57 am

Re: Inconsistent resource URLs between restarts

Post by freewheeler »

OK, I found ~/.config/UMS/UMS.conf

It already has:

Code: Select all

scan_shared_folders_on_startup = false
... so I guess the disk activity I hear on startup (which only lasts 30 seconds or so) is not a full scan of the shared folders.

Can anyone recommend a simple media server (only needs to support audio) that generates consistent media stream URLs (or at least only changes the URLs on rescan)?
User avatar
mik_s
Moderator
Posts: 1171
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Inconsistent resource URLs between restarts

Post by mik_s »

It's not the scanning that changed the IDs but browsing the folders. I think this is because files can be added and deleted and would create a mess to keep track of all of this.

There is still a scan on startup option but this only check for new files and scans them which should take very little time compared to a full scan where it checks the format of each file. You can change this in the old settings or by editing UMS.conf but it won't keep the ID's static and will slow down browsing.

I don't know anything about BubbleUPnP so don't know how it works. The only thing I remember about playlists is something about a m3u file on your computer that has relative links to each file, then UMS can process this to give the right IDs each time even if they change. I think there is a way of creating them from the web player but not sure.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
User avatar
SubJunk
Lead Developer
Posts: 3721
Joined: Sun May 27, 2012 4:12 pm

Re: Inconsistent resource URLs between restarts

Post by SubJunk »

The IDs should be consistent in v14+
Post Reply