PDA

View Full Version : CustomBrowse & Multilibrary: Some Libraries are not working



dolodobendan
2017-12-27, 08:18
I played around with CustomBrowse and Multilibrary these last days and encountered a problem. I created three libraries:


Classical, that includes the genre "Classical" only.
Rock, that excludes the genres "Audiobooks" and "Classical".
Audiobooks, that includes the genre "Audiobooks" only.


With CustomBrowse I created some basic menus. It worked fine. I did a rescan. Now, only the Classical menu works. The other two menus have their submenus, but these are empty (Rock / Artists or Rock / Albums for example) now.

So I create another CustomBrowse entry for Rock and this one works now. I compared the two respective xml files:

Old:
<parameter type="text" id="library"><value>2</value></parameter>

New:
<parameter type="text" id="library"><value>4</value></parameter>

Why did two of the three libraries get a new internal ID? How do I restore the old one?

DJanGo
2017-12-27, 10:46
Why did two of the three libraries get a new internal ID? How do I restore the old one?

Hi,

these library ids do change after a rescan.

Try this:

http://forums.slimdevices.com/showthread.php?103805-How-i-get-the-LibraryDemo-plugin-to-work

dolodobendan
2017-12-27, 11:21
Hi,

these library ids do change after a rescan.

Try this:

http://forums.slimdevices.com/showthread.php?103805-How-i-get-the-LibraryDemo-plugin-to-work

Hi DJanGo,

I don't have the LibraryDemo-Plugin. Is this the same thing as MultiLibrary?

DJanGo
2017-12-28, 02:20
Hi DJanGo,

I don't have the LibraryDemo-Plugin. Is this the same thing as MultiLibrary?


Hi,

its called sub-library demo from Michael Herger /Logitech. That Plugin is in the 7.9 Branch from LMS.

MultiLibrary is from Erland.

dolodobendan
2017-12-28, 05:44
Hi,

its called sub-library demo from Michael Herger /Logitech. That Plugin is in the 7.9 Branch from LMS.

MultiLibrary is from Erland.

The problem here is that CustomBrowse relies on these internal IDs. That's why I'm a bit confused to hear that it should be normal that they (or two out of three, which seems random btw.) change it after a rescan. But I will have a look at this demo, thank you.

erland
2017-12-31, 01:53
The problem here is that CustomBrowse relies on these internal IDs. That's why I'm a bit confused to hear that it should be normal that they (or two out of three, which seems random btw.) change it after a rescan. But I will have a look at this demo, thank you.


They arenít supposed to change after a rescan, is there any errors in the server.log after rescan ?
Has it worked properly in your setup with earlier LMS versions ?
If you delete the whole cache directory the ids will change, but it doesnít sound like this is what you have done ?
There is no easy way to restore the original ids besides manually modifying the database

dolodobendan
2017-12-31, 06:20
They aren¬’t supposed to change after a rescan, is there any errors in the server.log after rescan ?
Has it worked properly in your setup with earlier LMS versions ?

Because of DJanGo's comment I thought of this being the common behavior. It does look that not only I experienced this. I only have tried it recently with digimaster's new installer and have reset more or less everything since then.


If you delete the whole cache directory the ids will change, but it doesn¬’t sound like this is what you have done ?
There is no easy way to restore the original ids besides manually modifying the database

No, I did not delete the cache. I wonder why one ID remained unaffected. (Quick follow-up: Isn't the database in the cache, too, thus deleting the whole cache would restore the IDs to 1, 2, 3 after a rescan?)

But if you say this is not what should happen at all, I'll give it another shot. From what I saw when it worked, I'm surprised that these functions are not supported natively.

erland
2018-01-01, 00:24
Because of DJanGo's comment I thought of this being the common behavior. It does look that not only I experienced this. I only have tried it recently with digimaster's new installer and have reset more or less everything since then.


I took a quick look at the plugin code again and I think you might have found a bug no one has reported to me previously. If the code works as I suspect there is a risk library ids will change if you do a full rescan after you have added one or more new libraries. Iíll try to get some time to experiment a bit more with it later this week and see if I can do something quick to solve it.

dolodobendan
2018-01-01, 06:33
I took a quick look at the plugin code again and I think you might have found a bug no one has reported to me previously.

I never quite got why some folks "live with the bug" instead of reporting it.


If the code works as I suspect there is a risk library ids will change if you do a full rescan after you have added one or more new libraries. I’ll try to get some time to experiment a bit more with it later this week and see if I can do something quick to solve it.

That would be awesome, thank you!

*** A happy new year to you all! ***

dolodobendan
2018-01-29, 04:58
If you delete the whole cache directory the ids will change, but it doesn’t sound like this is what you have done ?
There is no easy way to restore the original ids besides manually modifying the database

Do you happen to know the order in which libraries are created after the cache is deleted (library_1.ml.values.xml, library_2.ml.values.xml etc. are in the Playlist folder)? It does not seem to be depending on the filename or the library name. If I knew the creation order, I could set the IDs in CustomBrowse accordingly, thus deleting the cache would not break any libraries.

Edit:

After updating QLMS (digimaster's LMS installer and updater) and LMS, two out of three libraries have stopped working again (the same as before). I did not add or change any libraries, I just updated QLMS (and that updated LMS to the latest nightly).

(QLMS: LogitechMediaServer for Qnap x86_64 with qts 4.2 or higher (http://forums.slimdevices.com/showthread.php?108292-LogitechMediaServer-for-Qnap-x86_64-with-qts-4-2-or-higher))

dolodobendan
2018-04-13, 10:09
After rescanning the playlists, the classic library is gone.