GNOME Bugzilla – Bug 585026
Add option to set the media type of a file.
Last modified: 2020-03-17 08:28:18 UTC
When I filed bug #584992 I found out that I did not have any way to set the media type of a file myself when this had been incorrectly detected. I noticed that other media player or special media device synchronization tools like GTKPOD did allow me to set the media type. An option should be added to let a user set the media type.
Created attachment 136069 [details] [review] Adds option to set the media type. The attached patch adds a combo box in the Extra pane of the Track Editor which allows a user to set the media type of the file might this have been incorrectly detected by the tag library. This is my first patch created using git, let me know if I did something wrong. I had to remove several path changes made by MonoDevelop in the project file to references.
Bulk changing the assignee to banshee-maint@gnome.bugs to make it easier for people to get updated on all banshee bugs by following that address. It's usually quite apparent who is working on a given bug by the comments and/or patches attached.
Comment on attachment 136069 [details] [review] Adds option to set the media type. Thanks for the patch, Jensen, it's well done/clean. + Add (Catalog.GetString ("Audio/Video"), TrackMediaAttributes.None); Why do you have an entry for this enum value? I think it can probably just be left out; no user should ever need to choose it. + Add (Catalog.GetString ("Audio"), TrackMediaAttributes.AudioStream | TrackMediaAttributes.Music); This should probably be labeled "Music". And maybe should have two more options - one for just Audio (AudioStream only), and one for just Video (AudioStream | VideoStream only).
(In reply to comment #3) > This should probably be labeled "Music". And maybe should have two more > options - one for just Audio (AudioStream only), and one for just Video > (AudioStream | VideoStream only). Any suggestions on the name of those two extra options? And are they really needed? I can't think of a situation where you'd want to select those. I think the other options pretty much cover every desired media type.
I think "Video" is useful, at least. Say you have some clips you took with your phone or camera - they're not really Movies. "Audio" I don't really have a good use-case for.
Created attachment 147702 [details] [review] Adds option to set the track media type. Renamed Audio to Music and Video to Movie and set the track default to Music. Added separate Audio and Video sections.
One issue with this patch is, if the user changes the media type, I think it's likely they'll expect doing that to move it to the appropriate library (if they change it from music -> music video, say).
Review of attachment 147702 [details] [review]: Marking as needs-work, see the previous comment.
I took another look at this to see if I could implement the things from comment #7 but I've hit a roadblock. In src/Core/Banshee.Services/Banshee.Metadata/SaveTrackMetadataJob.cs I can add another LibrarySource object, detect which one I should use and update the track details accordingly, but due to the setup of DatabaseTrackInfo.Save() it seems like the file is not properly updated in the database and the libraries are not notified. Am I simply looking too far and/or overlooking something or should I approach it differently?
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the responsibility for active development again. See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.