View Issue Details

IDProjectCategoryView StatusLast Update
0012448MMANavigationpublic2015-09-30 14:15
Reportermarek Assigned To 
PriorityurgentSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.1.0 
Target Version1.1.3Fixed in Version1.1.3 
Summary0012448: Deletion of files on readonly storages
DescriptionFiles that are stored on readonly storages cannot be deleted by MMA. But now, MMA doesn't take into consideration result of deletion of files and deletes them from DB.

These files are resynced from MediaStore immediately but they doesn't contain all metadata.

So files that were not deleted from sdcard should not be deleted from DB.
TagsNo tags attached.
Fixed in build479

Relationships

related to 0012382 closedmartin Artists & Album Artists tracks view is incorrect for some albums 
related to 0012864 newmartin Tracks associated with Album Artists not represented consistently with MMW 

Activities

marek

2015-01-05 13:11

developer   ~0041581

Last edited: 2015-07-01 14:03

Partly fixed in build 363

Tracks view is ok, but other views like Albums fails. Albums can be deleted on readonly storages!!

marek

2015-07-01 15:57

developer   ~0042687

Albums and artists fixed in build 460

Composers and genres use different code in delete - it has to be unified.

Delete in rating fails completely:
java.lang.RuntimeException: Usupported operation for uri code(RATING) uri:content://com.ventismedia.android.mediamonkey.provider.MediaMonkeyStoreProvider/rating
            at com.ventismedia.android.mediamonkey.player.tracklist.addable.DatabaseAddableHelper.getItemUri(DatabaseAddableHelper.java:1618)
            at com.ventismedia.android.mediamonkey.utils.DatabaseViewCrate.getItemUri(DatabaseViewCrate.java:285)
            at com.ventismedia.android.mediamonkey.ui.dialogs.DatabaseDeleteProgressDialogFragment$7.delete(DatabaseDeleteProgressDialogFragment.java:285)
            at com.ventismedia.android.mediamonkey.ui.dialogs.DatabaseDeleteProgressDialogFragment$7.delete(DatabaseDeleteProgressDialogFragment.java:280)
            at com.ventismedia.android.mediamonkey.ui.dialogs.DeleteProgressDialogFragment$DeleteInTransaction.delete(DeleteProgressDialogFragment.java:143)
            at com.ventismedia.android.mediamonkey.ui.dialogs.DatabaseDeleteProgressDialogFragment.delete(DatabaseDeleteProgressDialogFragment.java:279)
            at com.ventismedia.android.mediamonkey.ui.dialogs.DeleteProgressDialogFragment$1.run(DeleteProgressDialogFragment.java:84) 

marek

2015-07-09 12:47

developer   ~0042698

After discussion with Martin over IM, we would like to ask how deletion should work in different views. Currently it works this way:

1. Tracks - tracks are deleted from DB and theirs files are deleted too
2. Albums - tracks of selected albums are deleted from DB and theirs files are deleted too
3. Artists - only tracks that contain selected artists as MEDIA artist are deleted. Theirs files are deleted too. Albums that have these artists as ALBUM artists are neither changed nor deleted.
4. Composers - selected composers are deleted from DB and no files are deleted!
5. Genres - selected genres are deleted from DB and no files are deleted!
6. Rating - currently it crashes but it should probably delete all tracks and theirs files with selected rating

Rusty, could you please review this behaviour?

martin

2015-07-11 09:26

developer   ~0042703

re 6. Rating - fixed (tracks are deleted from DB and theirs files are deleted too)

rusty

2015-09-22 18:13

administrator   ~0042963

The designed behaviors seem fine except for 3. What is deleted should depend on the view. e.g.
a) Artists view: represents (and displays) track artists and the number of tracks by that Artist. So all the tracks by that Artist should be deleted.
b) Album Artists view: represents (and displays) Album artists and the number of tracks in Albums with that Album Artist. So all the tracks associated with that Album Artist should be deleted.
c) Artists and Album Artists view: represents both of the above, so all of the tracks associated with either Artist X or Album Artist X should be deleted.
d) Genre > Artists view: for any artist, it actually represents Artist & Album Artist so the behaviour should be like c)

martin

2015-09-25 16:12

developer   ~0042992

a)b)c) fixed
d) Genre > Artists view: for any artist, it actually represents just Artist, so the behaviour should be like a)

Fixed in build 1.1.3.479

rusty

2015-09-25 21:17

administrator   ~0042998

Tested 479.
a) Fixed. BUT, the Artists view displays incorrect Artwork, showing all images associated with the Album Artist, rather than with the Artist.

b) Although deletion seems to work correctly, it is inconsistent with the view. The view displays:
<Album Artist> x Albums, y Tracks
Where x is correct, but y is the total number of tracks by <Artist> (rather than <Album Artist>.

Furthermore, when looking into the view, the albums display correctly, but the Tracks tab only shows tracks for which the <Album> is not "" (let's call this z tracks).

Finally, when selecting the <Album Artist> and deleting it, MMA prompts to delete z rather than the number of tracks associated with the Album Artist.

d) Not yet tested.

martin

2015-09-26 00:07

developer   ~0042999

Re b)
We have precalculated only <Artist> tracks in db and count of <Album Artist> tracks is not available.
We can get it
a) by async loading for each item - unwanted -> slows down
b) by triggers and precalculated it in same way as count of <Artist> tracks -> requires database change(possible regressions) -> postpone this solution to 1.2

To next build I suggest to hide irrelevant info, so the views should be:
<Artist & Album Artist> x Albums, y Tracks
<Album Artist> x Albums
<Artist> y Tracks

and in future 1.2 version it should be:
<Artist & Album Artist> x+v Albums, y+w Tracks
<Album Artist> x Albums, y Tracks
<Artist> v Albums, w Tracks

rusty

2015-09-27 03:21

administrator   ~0043001

Last edited: 2015-09-27 03:24

Re. b) your suggestion to not indicate the number of tracks would seem to be the best approach for now to resolve the inaccurate data/performance limitation. Note, though, that there are still two other open items:

"Furthermore, when looking into the view, the albums display correctly, but the Tracks tab only shows tracks for which the <Album> is not "" (let's call this z tracks)." It should include tracks for all Albums by the selected Album Artist.

"Finally, when selecting the <Album Artist> and deleting it, MMA prompts to delete z rather than the number of tracks associated with the Album Artist."

p.s. Re. "...and in future 1.2 version it should be:
<Artist & Album Artist> x+v Albums, y+w Tracks", this isn't strictly accurate, since there can be overlap between x&v and y&w.

martin

2015-09-29 15:14

developer   ~0043006

To clarify:
Tracks tab only shows tracks for which the <Album> is not ""- but this is correct behaviour, because track without album has no album artist. These tracks should be displayed on <Artitst>/<Tracks> tab and also on <Artitst & Album Artist>/<Tracks> tab, but on <Album Artist>/<Tracks> not.
On other hand bug is that I can see "Unknown album" in <Album Artist>/<Albums> and it doesn't make a sence, right?

So the number of tracks in <Album Artist>/<Tracks> is same as number which prompts in deleting dialog and it is correct, right?

rusty

2015-09-30 04:01

administrator   ~0043008

From my perspective, if the Album Artist field is populated, then an Album Artist exists--whether or not the name of the album is known, and thus the tracks _should_ display for <Album Artist>/<Tracks> . Moreover, this is consistent with how tracks display in MMW>Album Artist.

And thus the number of tracks that MMA prompts the user to delete should be the number of tracks associated with the Album Artist.

martin

2015-09-30 13:23

developer   ~0043012

Till now we had always <Album Artist> bounded on album and MMA doesn't support albums without name.
<Album Artist> without album sound to me weird, but if we will require to do this in same way as is in MMW,
then I would like postpone this issue to next version, because many changes must be done (included sync and database).

rusty

2015-09-30 14:15

administrator   ~0043015

Closed and removed remaining open items to 0012864.