After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 584992 - Music attribute set for videos, resulting in them being listed under Music Videos when syncing
Music attribute set for videos, resulting in them being listed under Music Vi...
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Device - iPod
git master
Other Linux
: Normal normal
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
: 586793 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-06-06 12:50 UTC by Jensen Somers
Modified: 2010-06-02 18:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jensen Somers 2009-06-06 12:50:53 UTC
I believe there is an error in the iPod synchronization method for videos. (In my case I use a Fifth Generation iPod Video (Black 30GB) but I am under the impression that it would occur on any device.)

StreamTagger.FindTrackMediaAttributes() contains the following code:

if ((file.Properties.MediaTypes & TagLib.MediaTypes.Audio) != 0) {
    track.MediaAttributes |= TrackMediaAttributes.AudioStream;
}
           
if ((file.Properties.MediaTypes & TagLib.MediaTypes.Video) != 0) {
    track.MediaAttributes |= TrackMediaAttributes.VideoStream;
}

The problem is that TagLib seems to set both the audio and video for this file. I assume this is because my video contains an audio track so I am not sure whether that's wrong per se. Hence when I import the video into my library both the AudioStream and VideoStream attributes are set and when I sync this to my iPod the video shows up under Music Videos in stead of Videos where I expect it to be. (And as done by any other iPod synchronization application.)

I did a quick test by removing the | when assigning the MediaAttributes so it would only have the VideoStream attribute and this seemed to fix it. However this is not a correct solution because this would then list all Music Videos under Videos.

I also noticed there's still a TODO in that part of the code but I am not sure what's the proper fix. If anyone can give me any pointers I can attempt to create a proper patch.
Comment 1 Gabriel Burt 2009-06-08 14:55:11 UTC
The AudioStream should be set for videos that have an audio stream in them - that is not a bug.  Sounds like the bug is in the DAP/iPod sync code (or possibly a deficiency in ipod-sharp).  See src/Dap/ 
Comment 2 Jensen Somers 2009-06-08 15:24:12 UTC
I think the problem is that when importing not enough data is available. By default, now, it treats every video with bot a video and audio stream as a Music Video, which is not correct. Detection on that part could be better, but I don't see how one can determine that. The TODO below the piece of code I pasted in the report speaks of detecting the correct type from the tag, but that's not a waterproof solution either.

I would say that by default it should treat any video as video only, and music as music only unless imported into a separate play list or section (divide the Video section in Movies, TV Shows, ...) and adjust the media type field of a track depending on where they are imported or have them set by the user.

In the mean time I created bug #585026 and added a patch to allow users to set this type via the track editor.
Comment 3 Alexander Kojevnikov 2009-06-23 21:43:33 UTC
*** Bug 586793 has been marked as a duplicate of this bug. ***
Comment 4 Gabriel Burt 2010-06-02 18:41:16 UTC
OK, I think the issue is that the TrackInfo's MediaAttributes property is initialized to Default, which is AudioStream | Music.  I've fixed this in master:

commit 5f157c4f53576cd89455508c34efd400e9e75694
Author: Gabriel Burt <gabriel.burt@gmail.com>
Date:   Wed Jun 2 11:39:17 2010

    Make sure Music attribute unset for videos/podcasts
    
    Fixes bgo#584992

This includes a database migration to correct it for all videos (and podcasts) in your library.  It won't take effect on your device until you remove and then re-add the videos in question.