[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: [plasma-mediacenter] plugins: Add a basic Filesystem media source which is supposed to be very s
From: Shantanu Tushar <shaan7in () gmail ! com>
Date: 2014-04-01 10:13:02
Message-ID: 20140401100102.5234818.99792.5256 () gmail ! com
[Download RAW message or body]
Original Message
From: Vishesh Handa
Sent: Tuesday 1 April 2014 2:49 PM
To: Shantanu Tushar Jha
Cc: kde-commits@kde.org
Subject: Re: [plasma-mediacenter] plugins: Add a basic Filesystem media source which \
is supposed to be very simple and only scan the home dir.
On Monday, March 31, 2014 11:56:31 PM Shantanu Tushar Jha wrote:
> > +
> > +bool FilesystemSearchMediaSource::checkAndAddFile(const QFileInfo&
> > fileInfo) +{
> > + const QString mimeType = KMimeType::findByUrl(
> > + KUrl::fromLocalFile(fileInfo.absoluteFilePath()))->name();
> > +
>
> Warning: This will cause very high io usage since it is looking into the
> file to determine the mimetype. And considering that you're doing this for
> every file in $HOME ...
>
> Yeah, I initially used KMimeType::findByPath exactly because of this but it
> always returned application/octet-stream for mp3 files. Ever happened to
> you?
Yup. Totally depends on the file name. If it ends with .mp3, then it will be
detected correctly, otherwise it ends up being an octet stream.
>
> Also, just to make things clear, this plugin is just for those few people
> who's want to try PMC on a non-KDE installation (as few such users asked
> for it). Might even write a plugin for Tracker et al (if that is still the
> stuff used on other DEs).
http://commits.kde.org/baloo/a7377e0cca4f63ca4ce56bef87ac1f82dd219970
> D
You may want to go the traditional route and add a list of folders where
content should be looked for. Searching the entire $HOME is expensive AND it
does not cover media mounted somewhere else. Eg - external media.
Also, this is in the plan once we get a way to let the user configure stuff. There \
are few things still need to be sorted out.
--
Vishesh Handa
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic