PDA

View Full Version : Is it possible to play a file through CLI without adding it to the database?



Craig
2006-10-17, 15:34
In MC2Slim I'm playing files through the CLI, most of them will already be in the Slim database but some are not. Is it possible to play those that are not without them being added? or can I just delete them after they have been played?

Thanks
Craig

Fred
2006-10-18, 17:01
No and no, unfortunately.

Slimserver keeps track of all tracks it encounters. Deleting individual tracks is not possible except with a rescran.

Feel free to add an enhancement request @ bugs.slimdevices.com

Fred

Craig
2006-10-19, 08:31
Thanks Fred,
I'll post an enhanchment request. In the mean time is there a way to tell that a file has been added so that I can inform the user?

Thanks
Craig

TheEndless
2006-10-19, 14:30
In MC2Slim I'm playing files through the CLI, most of them will already be in the Slim database but some are not. Is it possible to play those that are not without them being added? or can I just delete them after they have been played?

Thanks
Craig
It may be a bit far fetched, but dependent on how much control you have over the application that's using the CLI, you could potentially write a very simple web server to serve the track, and tune into it via the CLI (maybe pass the path to the file to be served via the querystring):
00:00:00:00:00:00 playlist play http://adhocwebserver:port/adhocstream.mp3?path=c:\mysong.mp3

That way, you could play it back on the client without having to add it to the SlimServer database...

Just an idea...

TheEndless

bpa
2006-10-19, 15:06
Have you tried the following to play a file /home/music/test.mp3

playlist play file:///home/music/test.mp3

It seemed to work for me - I'm not sure if it got added to database.

Edit:
Just checked - it gets added to database.

Craig
2006-10-26, 15:42
Fred,
I've filed the enhancement request.
http://bugs.slimdevices.com/show_bug.cgi?id=4428

Craig

JJZolx
2006-10-26, 16:21
Fred,
I've filed the enhancement request.
http://bugs.slimdevices.com/show_bug.cgi?id=4428
The CLI part of this request is somewhat incidental. There really needs to be a way to do this in SlimServer in general, whether through the CLI, the web interface, or the remote interface. In the latter two instances, it might be a type of Browse Music Folder that doesn't catalog the files as you browse through directories, or it might be through temporary folders, where the files might be scanned in the traditional manner, but the data thrown away afterwards so that it doesn't end up in the database. See the following request:

http://bugs.slimdevices.com/show_bug.cgi?id=2333

Dan Sully
2006-10-26, 16:32
* JJZolx shaped the electrons to say...

>The CLI part of this request is somewhat incidental. There really
>needs to be a way to do this in SlimServer in general, whether through
>the CLI, the web interface, or the remote interface. In the latter two
>instances, it might be a type of Browse Music Folder that doesn't
>catalog the files as you browse through directories, or it might be
>through temporary folders, where the files might be scanned in the
>traditional manner, but the data thrown away afterwards so that it
>doesn't end up in the database. See the following request:

The database is the core of slimserver. We need to have that information
around and accessable. I don't see a large use-case for the request.

-D
--
Just because they're complaining doesn't mean they're right.

JJZolx
2006-10-26, 16:55
* JJZolx shaped the electrons to say...

>The CLI part of this request is somewhat incidental. There really
>needs to be a way to do this in SlimServer in general, whether through
>the CLI, the web interface, or the remote interface. In the latter two
>instances, it might be a type of Browse Music Folder that doesn't
>catalog the files as you browse through directories, or it might be
>through temporary folders, where the files might be scanned in the
>traditional manner, but the data thrown away afterwards so that it
>doesn't end up in the database. See the following request:

The database is the core of slimserver. We need to have that information
around and accessable. I don't see a large use-case for the request.
I can accept that, but the design seems incredibly inflexible if it's unable to vary from being able to play only tracks that have their data in the database. What would be so difficult about scanning tracks on the fly, keeping the data only in memory and streaming them using that data?

anonymous247
2006-10-27, 23:35
I'd like to also suggest that being able to play tracks not in the database is a desirable feature. I seem to have hit the same issue in this thread:

http://forums.slimdevices.com/showthread.php?p=150134

I can see in code there's already mechanisms for creating a track object without adding it to the DB (seems to be controlled by the 'create' argument to the _pre & _post CheckAttributes functions, and also by whether the URL is deemed local or remote (remote URLs not being added to the DB). Could this not be exposed as an external arg?

cosmo
2006-10-28, 08:42
* JJZolx shaped the electrons to say...

>The CLI part of this request is somewhat incidental. There really
>needs to be a way to do this in SlimServer in general, whether through
>the CLI, the web interface, or the remote interface. In the latter two
>instances, it might be a type of Browse Music Folder that doesn't
>catalog the files as you browse through directories, or it might be
>through temporary folders, where the files might be scanned in the
>traditional manner, but the data thrown away afterwards so that it
>doesn't end up in the database. See the following request:

The database is the core of slimserver. We need to have that information
around and accessable. I don't see a large use-case for the request.

-D
--
Just because they're complaining doesn't mean they're right.

I see a large use-case for this request! If you want to check some sound clips or listen to songs you have stored on an external hard drive or USB stick which isn't available all the time, you don't want them to be added to the database. Or you might have stored music somewhere that you just don't want to be in your library...
Another important use-case are new downloaded files that you just want to check and see if you like them. If you decide to keep them you might rename the files, change tags, move them to a specific folder which all requires a rescan of the whole library - of course also if you delete them - which isn't quite nice and takes a lot of time in huge file collections.

So I would really like to have an option in the server settings which lets you choose if you want to add songs to the library at playback or not.

Please vote for the enhancement request if you also would like this feature.
http://bugs.slimdevices.com/show_bug.cgi?id=4428




PS: To play files no matter where you have stored them on your computer, you can use Craig's MC2Slim software to do this right from Windows Explorer...

kdf
2006-10-28, 11:41
just to be open and frank, I make it a personal policy to deliberately
NOT write code based on campaigns in the developer forum. To me, this
is for discussing solutions, options, and for helping developers of
plugins and third party applications. It is not for a direct lobby
connection to developers who just might need a break from the constant
noise. go vote if you wish. please do not lobby.
-kdf

Fred
2006-10-30, 12:34
Truth of the matter is, no one cares if it is technically "added to the database".

What people want is for these songs to be excluded from all the GUI and searches, I think. Any easy way to do that? Setting audio to 0 could be an idea, but what are the side effects?

Fred

Craig
2006-10-30, 13:14
That's a good point Fred. I'm not sure what you mean by setting Audio to 0 but if you can enlighten me then I'll have a play.

Craig

Fred
2006-10-31, 08:56
audio is a field of the track table. Tracks that are not audio are not listed in the web interface, f.e., the player playlist remembered between slimserver restarts is stored as a non audio track.
This provides a way to hide the tracks from the GUI. What I do not know is what the code that plays stuff does with it, or even if it cares...

Using some MySQL manipulation, it could be simple to set the audio flag of a good known track to 0 and then try to play it through the CLI... and see what happens.

If that works, then the CLI commands could be updated with a parameter to say "don't remember that" and in such case the cli could set the flag to 0... Stuff is in the DB, but not shown, and everybody's happy.

These are just random ideas, I have not though this much over.

Fred