Autoscanning removable drives

The forum for designers and developers.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
SilverEagle
Posts: 713
Joined: 30. Sep 08, 14:00
Location: Netherlands
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Autoscanning removable drives

Postby SilverEagle » 3. Jun 09, 09:30

Hi Team,

I am developing a small utility to have Silverjuke automatically detect insertion/removal of USB sticks, SD cards, drives, etc. and add/remove ttracks on them to/from the library.

Some questions about that:

1) Is there anything like that in development on your side?

2) Is there a cleaner interface to library management besides editing the silverjuke/folderscanner/* settings?

3) If I am playing a track from a drive while the drive is physicaly removed, Silverjuke 'hangs' as in 'audio pauses while the GUI looks like the song is still playing' but the program never hangs in the programmers sense of the word. Is this stable behaviour or was Murphy asleep during my tests?

Regards,
SilverEagle

User avatar
Service-Team
Posts: 2448
Joined: 7. Dec 04, 04:48
Location: Germany
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Autoscanning removable drives

Postby Service-Team » 3. Jun 09, 10:12

Hi SilverEagle,

to your questions:

1) No.

2) No.

3) At a first glance, this sounds for us as a "normal" behaviour if the played file is removed. Hitting "Stop" (not: "Pause") and then "Play" again, should reset the program to the normal state.

Best regards,
Your Silverjuke-Team

PS: Interesting project, BTW.

SilverEagle
Posts: 713
Joined: 30. Sep 08, 14:00
Location: Netherlands
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Autoscanning removable drives

Postby SilverEagle » 3. Jun 09, 12:53

Hi Team,

Turns out changing the folderscanner settings from script does not work without a restart, as you already warned in viewtopic.php?t=2853 :-(. And leaving them in when the drive is removed yields an ugly "cannot enumerate files in directory" error to the user.

Could I persuade you that "...die Einstellung unbedingt auf diesem Wege änderbar sein sollte..." and before a Database.update() (or F5) all /folderscanner settings should be read again?

SilverEagle

User avatar
Service-Team
Posts: 2448
Joined: 7. Dec 04, 04:48
Location: Germany
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Autoscanning removable drives

Postby Service-Team » 4. Jun 09, 14:24

Hi SilverEagle,

as you already found our yourself, if you change the settings manually, Silverjuke only reloads the settings from the INI or the registry after a restart.

We agree, that there could be a smarter way for this, however, this won't have a 100% priority (never thought that scripting Silverjuke could get so popular - and that the offered APIs could get too small ;-)).

Best regards,
Your Silverjuke-Team

SilverEagle
Posts: 713
Joined: 30. Sep 08, 14:00
Location: Netherlands
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Autoscanning removable drives

Postby SilverEagle » 5. Jun 09, 09:40

Hi All,

You can find the plugin at http://forum.silverjuke.net/viewtopic.php?p=11585#p11585

SilverEagle


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Developer Network”