Bug 313649 - No warning if there are no permissions to read file
Summary: No warning if there are no permissions to read file
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.7.0
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: 2.8
Assignee: Amarok Developers
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2013-01-21 21:06 UTC by Ovidiu-Florin BOGDAN
Modified: 2013-04-19 15:29 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.8
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ovidiu-Florin BOGDAN 2013-01-21 21:06:55 UTC
If a file/directory is opened and that file does not have read permission for this user, amarok  add's it to the playlist and grays out the title, without warning the user why the file does not open.

Reproducible: Always

Steps to Reproduce:
1. Open with amarok a file/song that doesn't have read permissions for the current user.
Actual Results:  
The Song is added to the playlist and the title is grayed out. The user does not know why it won't play.

Expected Results:  
An warning/error dialog should appear informing the user that the file permissions do not allow for it to be opened.

In the same scenario if the files are in the Local Collection folder they do not appear int he Local Collections view.
Comment 1 Benjamin M 2013-02-18 11:39:54 UTC
Hi, 

I have a similar issue that would amount to the same fix, so I'm just adding it here. Apparently, my music directory was erroneously set to user root, but with read support for my user, so Amarok had no issue playing the files. 
However, it did not remember any of the changes I made to my song tags/metadata. 

I would like Amarok to inform the user that the changes cannot be written because there is no write permission. 

Devs, should I open a new report for this, or is this issue close enough to where the same fix will apply to both? 

I just think that both issues are about Amarok's permission handling, namely that you do not get a warning with missing permissions at all.
Comment 2 Benjamin M 2013-02-18 11:40:58 UTC
Sorry, I should add that I have this problem with Amarok 2.7 on Kubuntu 12.10 with KDE 4.10. All of which are the current stable editions. Thanks!
Comment 3 vedant agarwala 2013-02-21 10:19:19 UTC
I think a dialog shouldn't appear since it would hinder the user. Consider this: If many files are being added and a few are unable to be read and/or write-to they should be greyed out as they are right now, rather than poping back-to-back dialogs.
But as for informing the user, A tooltip should be shown if a user drags the cursor to the greyed out song stating the exact reason why the file is unreadble (insufficient permissions, file deleted or moved, etc. ).
So, I think the "Expected Results" should be changed to "show a tooltip stating the reason".
Comment 4 Dishant Patel 2013-03-01 06:54:06 UTC
i think it has been fixed. While attempting to open a file/folder with no read permissions, a status bar does appear stating "could not enter folder/abc.
Comment 5 Anmol Ahuja 2013-04-01 21:20:15 UTC
https://git.reviewboard.kde.org/r/109817/
Added a tooltip + disabled context-menu action to indicate there are no-permissions to read the particular track
Comment 6 Matěj Laitl 2013-04-19 15:29:53 UTC
Git commit 0b1391318ae98c5f077b301ccb76a23b7efd1c3f by Matěj Laitl, on behalf of Anmol Ahuja.
Committed on 19/04/2013 at 16:09.
Pushed by laitl into branch 'master'.

Meta::Track, playlist: show reason why a track is not playable

1. Add notPlayableReason() to Meta::Track (and provide convenience
   implementation of isPlayable() using it)
2. Display track tooltip with the notPlayableReason() if track is not
   playable

BUGFIXES:
 * Reason why a particular track is not playable is now shown in
   playlist tooltip; patch by Anmol Ahuja.
FIXED-IN: 2.8
REVIEW: 109817

M  +2    -0    ChangeLog
M  +3    -3    src/core-impl/collections/audiocd/AudioCdMeta.cpp
M  +1    -1    src/core-impl/collections/audiocd/AudioCdMeta.h
M  +3    -9    src/core-impl/collections/daap/DaapMeta.cpp
M  +1    -1    src/core-impl/collections/daap/DaapMeta.h
M  +3    -6    src/core-impl/collections/db/sql/SqlMeta.cpp
M  +1    -2    src/core-impl/collections/db/sql/SqlMeta.h
M  +3    -8    src/core-impl/collections/ipodcollection/IpodMeta.cpp
M  +1    -1    src/core-impl/collections/ipodcollection/IpodMeta.h
M  +3    -8    src/core-impl/collections/mediadevicecollection/MediaDeviceMeta.cpp
M  +1    -1    src/core-impl/collections/mediadevicecollection/MediaDeviceMeta.h
M  +6    -3    src/core-impl/collections/nepomukcollection/meta/NepomukTrack.cpp
M  +1    -1    src/core-impl/collections/nepomukcollection/meta/NepomukTrack.h
M  +5    -3    src/core-impl/collections/playdarcollection/PlaydarMeta.cpp
M  +2    -2    src/core-impl/collections/playdarcollection/PlaydarMeta.h
M  +14   -0    src/core-impl/collections/proxycollection/ProxyCollectionMeta.cpp
M  +6    -0    src/core-impl/collections/proxycollection/ProxyCollectionMeta.h
M  +1    -0    src/core-impl/collections/support/MemoryMeta.h
M  +3    -8    src/core-impl/collections/upnpcollection/UpnpMeta.cpp
M  +1    -1    src/core-impl/collections/upnpcollection/UpnpMeta.h
M  +3    -4    src/core-impl/meta/file/File.cpp
M  +1    -1    src/core-impl/meta/file/File.h
M  +1    -0    src/core-impl/meta/multi/MultiTrack.h
M  +12   -1    src/core-impl/meta/proxy/MetaProxy.cpp
M  +2    -0    src/core-impl/meta/proxy/MetaProxy.h
M  +3    -8    src/core-impl/meta/stream/Stream.cpp
M  +1    -1    src/core-impl/meta/stream/Stream.h
M  +0    -6    src/core-impl/meta/timecode/TimecodeMeta.cpp
M  +0    -1    src/core-impl/meta/timecode/TimecodeMeta.h
M  +42   -0    src/core/meta/Meta.cpp
M  +29   -3    src/core/meta/Meta.h
M  +0    -1    src/core/podcasts/PodcastMeta.h
M  +11   -2    src/playlist/PlaylistModel.cpp
M  +0    -6    src/services/ServiceMetaBase.cpp
M  +0    -1    src/services/ServiceMetaBase.h
M  +3    -15   src/services/ampache/AmpacheMeta.cpp
M  +1    -1    src/services/ampache/AmpacheMeta.h
M  +3    -14   src/services/lastfm/meta/LastFmMeta.cpp
M  +1    -2    src/services/lastfm/meta/LastFmMeta.h
M  +1    -1    tests/CMakeLists.txt
M  +3    -0    tests/synchronization/CMakeLists.txt

http://commits.kde.org/amarok/0b1391318ae98c5f077b301ccb76a23b7efd1c3f