GNOME Bugzilla – Bug 608381
Failed to import files to the audiobooks library
Last modified: 2020-03-17 08:48:43 UTC
I can't add files to the audiobooks library, they simply added to the main music category. Steps to reproduce: 1. Enable audiobooks plugin; 2. Try to import media (right click on the "Audiobooks") 3. Files added to the main music library, not to the audiobooks. This issue is also happen in git. P.S. added this to "general" cause there is no relevant component in the list.
This is known - it's not "broken functionality" so much as just plain missing. The right click on Audiobooks -> Import Media is misleading though; it actually does the same thing as Media -> Import Media or if you right click on Music. Currently the only way to add files to Audiobooks is to drag them there from MUsic.
Oh, I see. Dragging files from Music is not so obvious. It would be good if you implement simple importing functionality. BTW, source of my audiobooks is placed not in my Music folder. There is no logic in adding files from this folder to the Music. Nevertheless, thanks for reply.
I tried to fix this by making a similar change to StreamTagger.cs that prevents podcasts from being marked as music... --- a/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs +++ b/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs @@ -111,12 +111,24 @@ namespace Banshee.Streaming track.MediaAttributes |= TrackMediaAttributes.Podcast; } + if (file.Tag.FirstGenre == "AudioBook" || + file.Tag.FirstGenre == "AudioBooks" || + file.Tag.FirstGenre == "Audiobook" || + file.Tag.FirstGenre == "Audiobooks" || + file.Tag.FirstGenre == "audiobook" || + file.Tag.FirstGenre == "audiobooks") { + Hyena.Log.DebugFormat ("FOUND AUDIOBOOK!"); + track.MediaAttributes = TrackMediaAttributes.AudioStream; + track.MediaAttributes |= TrackMediaAttributes.AudioBook; + } + // TODO: Actually figure out, if possible at the tag/file level, if // the file is actual music, podcast, audiobook, movie, tv show, etc. // For now just assume that if it's only audio and not podcast, it's // music, since that's what we've just historically assumed on any media type if (!track.HasAttribute (TrackMediaAttributes.VideoStream) && - !track.HasAttribute (TrackMediaAttributes.Podcast)) { + !track.HasAttribute (TrackMediaAttributes.Podcast) && + !track.HasAttribute (TrackMediaAttributes.AudioBook)) { track.MediaAttributes |= TrackMediaAttributes.Music; } } But it didn't change anything, audiobooks (files with genre audiobook) are still added to music collection on import... Apparently, setting TrackMediaAttributes.AudioBook (and getting rid of Music and Podcast) doesn't cause a file to added to the audiobook library instead of Music. Gabriel, is there something simple to add to the above change that would make this work?
Yes, you'd have to change the DefaultTrackPrimarySourceChooser in src/Core/Banshee.Services/Banshee.Library/LibraryImportManager.cs But - the existence of the Audiobook library is not a given. For that matter, the Music and Video libraries probably shouldn't be taken for granted; but they are currently in src/Core/ and not disable-able. I'm not really sure of the best approach given this. I've thought about maybe chaning the Import dialog to be destination-aware: eg when Music library selected, Media -> Import Music will be the action, when under audiobooks it'd be Media -> Import Audiobooks. And right clicking on the various libraries would trigger that same destination-aware importing. But, that's a fairly big behavioral change, and one I'm not sure Aaron is keen on. Aaron?
I think what you suggested would be quite nice. It is definitely better than right clicking on audiobooks, selecting import media and having it all go into Music! That just seems broken...
*** Bug 609785 has been marked as a duplicate of this bug. ***
But why aren't the files moved when I add them to the Audiobook Library? Although I set a Folder for the Audiobooks?
Issue is valid in banshee 1.7.1
(In reply to comment #2) > Oh, I see. Dragging files from Music is not so obvious. It would be good if you > implement simple importing functionality. > BTW, source of my audiobooks is placed not in my Music folder. There is no > logic in adding files from this folder to the Music. > > Nevertheless, thanks for reply. The bug persists. I am affected too. Banshee version is 1.8.0.
*** Bug 651275 has been marked as a duplicate of this bug. ***
1) Action taken: Right click the Audiobooks icon, and select "Import Media...", then "Import from:" either "Folders" or "Files" (both were tested). Select the media files. Expected result: The media files are imported into the Audiobooks library. Actual result: The media files were imported into the Music library and appeared on the "Recently Added" list. 2) Action taken: Drag-and-drop the files from the Recently Added list onto the Audiobooks icon. Expected result: The media files are removed from the Music library and added to the Audiobooks library. Actual result: Nothing happened. 3) Action taken: Search for the files within the Banshee main music dialog. Drag-and-drop them to the Audiobooks icon. Expected result: The media files are removed from the Music library and added to the Audiobooks library. Actual result: Banshee crashes (log attached). 4) Action taken: Soft-link the media files into the ~/Audiobooks/ directory, and choose "Rescan Library" from within Banshee. Expected result: The media files appear in the Audiobooks library. Actual result: Nothing happened. 5) Action taken: Search Banshee help for "audiobook" and then "audiobooks" Expected result: Help on importing audiobooks for both queries. Actual result: No results for the first query, one irrelevant article about syncing for the second. I know it's possible to get files into the Audiobooks library because I already have 2 "Books" in the library, but Jesus Christ. Banshee version: 2.0.1 Mono version: 2.10.2 Desktop environment: KDE 4.6.3 Qt version: 4.7.3 Distribution: Arch Linux
Created attachment 189278 [details] Log of banshee crash when dragging media files from Music to Audiobooks 95 files were moved. They are soft links on the hard disk. After restarting Banshee, the files had been properly moved to the Audiobooks.
Geeze, this is still an issue in Banshee 2.0.0 as included with the default Ubuntu Natty install. I don't even remember specifically enabling an audiobooks plugin. "Audiobooks" has just been there as a library option since I first loaded the app. All the expected UI pieces are there, it lets you tell it where to expect Audiobook files, what the folder hierarchy should look like - everything just like Music. Except as everyone else has pointed out, none of this actually does anything. It's extremely stupid to leave all these UI pieces visible (for decoration?) when they're not connected to anything. I can't be the only person who wasted time Googling this "bug". In fact, since I see this bug reported in various places well over a year ago I'm quite certain I'm not. If the feature isn't actually coded yet, do the world a favor and just take this crap out until it is. I don't relish using apps that flat-out lie to me.
Please bump the affected version to Banshee 2.2.1. I have a similar problem. I use file monitoring for library changes, as well as having the option to copy imported files in Music. So, I put my audiobooks in ~/Audiobooks, and they were not added automatically to the Audiobooks library. Very confusing, as that is the folder set for the Audiobooks source in the Banshee preferences! Then I tried importing them by hand. They were added both to Music and remain the in Audiobooks folder. I had then to move them to the Audiobooks source in the Banshee left pane. Okay, I thought. Let's leave at that. Unfortunately, sometimes I need to rescan my library as I use resync between different computers (or unison) to keep playing statistics and other metadata up-to-date. This would mean those files in Music that are audiobooks now gets added again to the Music source. Grrrrr! Now I have to remove them *again* from the collection by hand, handpicking from several hundreds! This is sooooo frustrating! Could you please either: * change the audiobooks source so that it just uses Music as a folder, and delete the Audiobooks folder * fix Audiobooks support (preferred) so that it: - correctly adds to the Audiobooks source files discovered in ~/Audiobooks - file monitoring works - when right-clicking on Audiobooks and selecting "Import in Audiobooks..." files get copied to the right folder - drag & dropping files between Music and Audiobooks move them between directories. By the way, Audiobooks then remains just empty, but if you delete it, it gets recreated each time. So, why have I to have an empty, useless directory polluting my home??? Otherwise I really love Banshee, but this is driving me nuts.
It's 2012, Banshee 2.2.0, and there is still not even a comment by the devs on this issue - after 2.5 years?! Banshee is a great program, looks polished, has everything I want in my music manager, but the missing audio book feature just keeps it from being a true iTunes killer. The next version has voice control? well, that's dandy, but how about addressing real problems first, or at least leaving a comment about why it's not fixable?!
Kalle, (In reply to comment #15) > It's 2012, Banshee 2.2.0, and there is still not even a comment by the devs on > this issue - after 2.5 years?! There's two comments by a developer. > Banshee is a great program, looks polished, has > everything I want in my music manager, Thanks, we appreciate the feedback. > but the missing audio book feature just > keeps it from being a true iTunes killer. It's great that you want to consider Banshee an "iTunes killer", we want it to be better than iTunes too, of course, although that "goal" is not written in the roadmap :-) However, I would love if you could be more specific when you say "missing audio book feature". I don't think it is missing at all, a lot of people use it perfectly. If you go back to the original comment#0 on this bug report and look at the first reply (in comment#1) you can easily find out that there's no missing functionality, there's just a bug on how the import should be handled when using a context menu on the child source. In all other use cases (using File->Import or just using the context menu on the root source, not the Audiobooks source), it works just fine. > The next version has voice control? > well, that's dandy, but how about addressing real problems first, or at least > leaving a comment about why it's not fixable?! Everything is fixable in software. What varies is the complexity of the problem and the time needed to find a solution. I guess in this case you really need to understand a bit better how open source works: a bug is not fixed until someone fixes it. That "someone" may be a Banshee developer, or you, or a friend that you ask to fix it, or a consultant you ask to fix it. Open source projects cannot guarantee a level of responsiveness that is fine for everyone. Especially considering that most of the developers of open source projects work on them on their spare time (unfortunately the exception to this is not very common, but it can happen that a company sponsors the work of some developers on open source), so you should really be respectful to them when directing your feedback. Now, bugzilla is not a place to talk about these things so I apologize in advance. If you have any feedback about technical details of the bug (how to fix it, help testing a fix, etc.) then please go ahead and comment. If not, then you're really not following the usage guidelines of a bug tracker (not saying you cannot voice your opinion about this; but this is not the place, try the mailing list instead). Thanks
Hi, I also like Banshee a lot, and I think it's the best player available so far. But like many others I also have a problem with handling of audiobooks. I like to keep my audiobooks in a separate folder but managed by Banshee. From the GUI this seems possible right now, but it doesn't work as expected in most (maybe all) cases. As I'm a developer I'll try to somehow fix this. Are there any documents describing how the media import is handled in Banshee? That would be nice as I otherwise have to go through the code and find relevant parts by hand... Are there any thoughts on how to fix this? Ben
Created attachment 229572 [details] [review] Enables correct import of audiobook files Hi, some time went since my first post. But I'm back with a first patch. This patch is far away from being complete, but it seems it's able to import audiobooks to the correct location. So what is done? 1. Audiobook files are marked with the media attribute "AudioBook" when they have "Audiobook" or "AudioBook" set as first genre in ID3 Tag. (Maybe we could add other possible genres like "Audiobooks" and so on) 2. AudioBook extensions was enabled to copy files to the destination folder. 3. SourceManager was extended to be able to retrieve a responsible source for a given media attribute. (this is not complete for compatibility reasons) 4. LibraryImportManager was changed to use the new method available in SourceManager. (again this is not complete for compatibility reasons) What's missing so far? 1. There should be an option to rescan the audiobook library as it is for music library. 2. It should be possible to move files from music library to audiobook library. (which should also move the files into the correct folder) 3. Maybe it should be possible (ask the user?) to automatically move files from music to audiobook library if the main genre of a file is changed to something that is related to audiobooks. 4. A lot of testing is required as this is my first patch ;). Hope to get some feedback soon... Greetings Ben
Review of attachment 229572 [details] [review]: Also compiled the code, tried with files. It worked for me. ::: src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs @@ +113,3 @@ } + // Treat as audiobook if first genre set correctly No comment necessary. @@ +114,3 @@ + // Treat as audiobook if first genre set correctly + if (file.Tag.FirstGenre == "Audiobook" || file.Tag.FirstGenre == "AudioBook") { If you have different Spelling, I would suggest to use .ToLowerInvariant() and compare with "audiobook". As some pages suggest also to set "audiobook" as genre. ::: src/Core/Banshee.Services/Banshee.Library/LibraryImportManager.cs @@ +85,3 @@ } else { + // Fallback (we could safeley remove this as long as 'GetResponsibleSource' returns a + // LibrarySource in any case) It does return the Music Source all the time or? ::: src/Core/Banshee.Services/Banshee.Library/LibrarySource.cs @@ +106,2 @@ get { return media_types; } + protected set { media_types = value; } Why changing the visibility? ::: src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs @@ +273,3 @@ + if (responsibleSource != null) { + // For compatibility reasons we just return separate sources for + // VideoStream and AudioBook, all others returning Music like before Perhaps each LibrarySource could have a Property defining if it allows imports.
Created attachment 229829 [details] [review] Tried to implement the suggestions from Samuel Thanks for the suggestions!
(In reply to comment #20) > Created an attachment (id=229829) [details] [review] > Tried to implement the suggestions from Samuel > > Thanks for the suggestions! A question: + // Treat as audiobook if first genre set correctly + string firstGenre = (file.Tag.FirstGenre ?? "").ToUpperInvariant(); + if (firstGenre == "AUDIOBOOK" || firstGenre == "AUDIOBOOKS") { + track.MediaAttributes |= TrackMediaAttributes.AudioBook; + } + Why do this? Take a look at a comment in the source code that is written just below this: // TODO: Actually figure out, if possible at the tag/file level, if // the file is actual music, podcast, audiobook, movie, tv show, etc. // For now just assume that if it's only audio and not podcast, it's // music, since that's what we've just historically assumed on any media type Cannot we actually try to do what this comment says instead? The audiobook folder-organization settings have some special tags like Author and Book Title. Cannot we set the MediaAttributes to Audiobook if these tags are found in the file?
(In reply to comment #7) > But why aren't the files moved when I add them to the Audiobook Library? > Although I set a Folder for the Audiobooks? That is a different issue, filed as bug 623155.
> Why do this? > > Take a look at a comment in the source code that is written just below this: > > // TODO: Actually figure out, if possible at the tag/file level, if > // the file is actual music, podcast, audiobook, movie, tv show, etc. > // For now just assume that if it's only audio and not podcast, it's > // music, since that's what we've just historically assumed on any media type > > Cannot we actually try to do what this comment says instead? The audiobook > folder-organization settings have some special tags like Author and Book Title. > Cannot we set the MediaAttributes to Audiobook if these tags are found in the > file? In an Audiobook file if it is mp3 there are not necessarily (I don't know if they even exist) special tags set. In ITunes you have to specially set the Audiobook Type if you import it. Several MP3 Player just interpret the Genre Tag (http://anythingbutipod.com/2009/05/guide-to-audiobooks-on-mp3-players/), Check also Solution 2 at (http://kb.sandisk.com/app/answers/detail/a_id/7320/~/transferring-and-listening-to-audiobooks-on-a-sansa-player).
(In reply to comment #23) > > Why do this? > > > > Take a look at a comment in the source code that is written just below this: > > > > // TODO: Actually figure out, if possible at the tag/file level, if > > // the file is actual music, podcast, audiobook, movie, tv show, etc. > > // For now just assume that if it's only audio and not podcast, it's > > // music, since that's what we've just historically assumed on any media type > > > > Cannot we actually try to do what this comment says instead? The audiobook > > folder-organization settings have some special tags like Author and Book Title. > > Cannot we set the MediaAttributes to Audiobook if these tags are found in the > > file? > In an Audiobook file if it is mp3 there are not necessarily (I don't know if > they even exist) special tags set. We should find out :) > In ITunes you have to specially set the > Audiobook Type if you import it. Ok, so this is an option at import time (not related to the file itself), right? If yes, I would say that the equivalent here is to import from the Audiobooks context menu in Banshee. > Several MP3 Player just interpret the Genre > Tag (http://anythingbutipod.com/2009/05/guide-to-audiobooks-on-mp3-players/), I have read that article and the only mention to Genres is in a comment, not the article itself (plus in the comment it refers to a specific device: the Sansa player). The only related sentence is: "To get the files marked as audiobooks, either set the ID3 tag as “audiobook” or put the files in the AUDIOBOOKS-folder." which doesn't specify which "ID3Tag", and still refers to the Sansa players. > Check also Solution 2 at > (http://kb.sandisk.com/app/answers/detail/a_id/7320/~/transferring-and-listening-to-audiobooks-on-a-sansa-player). Again, something specific to the Sansa players. I don't have any problem adopting that "standard" as long as we consider it a de-facto standard that is already in place in other scenarios (not just one device), so we need more sources. Also, if we finally do it: (In reply to comment #19) > If you have different Spelling, I would suggest to use .ToLowerInvariant() and > compare with "audiobook". As some pages suggest also to set "audiobook" as > genre. Instead of converting to lowercase to compare, just compare in an insensitive-case way: str1.Equals(str2, StringComparison.InvariantCultureIgnoreCase)
(In reply to comment #24) > (In reply to comment #23) > > > Why do this? > > > > > > Take a look at a comment in the source code that is written just below this: > > > > > > // TODO: Actually figure out, if possible at the tag/file level, if > > > // the file is actual music, podcast, audiobook, movie, tv show, etc. > > > // For now just assume that if it's only audio and not podcast, it's > > > // music, since that's what we've just historically assumed on any media type > > > > > > Cannot we actually try to do what this comment says instead? The audiobook > > > folder-organization settings have some special tags like Author and Book Title. > > > Cannot we set the MediaAttributes to Audiobook if these tags are found in the > > > file? > > In an Audiobook file if it is mp3 there are not necessarily (I don't know if > > they even exist) special tags set. > > We should find out :) There is no problem to extend the method to also match some other attributes. The problem here is (imho) that it's very hard to identify a given mp3 file as audiobook. So using the genre is just a "easy fix" that even won't work in most cases except you explicitly set the genre before the import. > > > In ITunes you have to specially set the > > Audiobook Type if you import it. > > Ok, so this is an option at import time (not related to the file itself), > right? > > If yes, I would say that the equivalent here is to import from the Audiobooks > context menu in Banshee. > Problem with this is that there is NO extra import for audiobooks in the context menu. There is already an "Import Media" in both libraries (music and audiobook), but both end up in the same code being called (general import). I don't now if it's easy to setup an extra import menu option. I also think most people would love to an automatic import that sorts out audiobooks if possible. > > > Several MP3 Player just interpret the Genre > > Tag (http://anythingbutipod.com/2009/05/guide-to-audiobooks-on-mp3-players/), > > I have read that article and the only mention to Genres is in a comment, not > the article itself (plus in the comment it refers to a specific device: the > Sansa player). > > The only related sentence is: "To get the files marked as audiobooks, either > set the ID3 tag as “audiobook” or put the files in the AUDIOBOOKS-folder." > which doesn't specify which "ID3Tag", and still refers to the Sansa players. > > > Check also Solution 2 at > > (http://kb.sandisk.com/app/answers/detail/a_id/7320/~/transferring-and-listening-to-audiobooks-on-a-sansa-player). > > Again, something specific to the Sansa players. > > I don't have any problem adopting that "standard" as long as we consider it a > de-facto standard that is already in place in other scenarios (not just one > device), so we need more sources. > > Also, if we finally do it: > > (In reply to comment #19) > > If you have different Spelling, I would suggest to use .ToLowerInvariant() and > > compare with "audiobook". As some pages suggest also to set "audiobook" as > > genre. > > Instead of converting to lowercase to compare, just compare in an > insensitive-case way: str1.Equals(str2, > StringComparison.InvariantCultureIgnoreCase) I will add that to the patch... Thanks!
As you said, there is no official Standard regarding "Audiobook" as Genre. Here my case for the audiobook genre entry: - Mailing List request (2010): http://banshee-media-player.2283330.n4.nabble.com/feature-req-audiobook-genre-should-automatically-show-up-in-audiobook-section-td2988365.html - A Audiobook Blog suggests setting Audiobook as Genre on an import: http://www.audiogals.net/simple-tech/tag-multiple-audiobook-files-itunes/ - A board article, about somebody getting Crazy with Audiobooks in Itunes. It also suggest a Genre Tag somehow (http://forum.dbpoweramp.com/showthread.php?24187-Itunes-Ipod-Book-%28M4B%29-Tagging-Expert-Needed&s=0e39a4683270b7b27e3abe0f52f85e62&p=114225&viewfull=1#post114225) Against: - Some Article on ebay suggest the Genre Books & Spoken (Not sure if this is written in the tag) http://reviews.ebay.com/How-To-Convert-Your-Audiobooks-CDs-For-Your-iPod?ugid=10000000002765879 - Downloading some Audiobooks from http://www.booksshouldbefree.com/. Their genre Tag is not set. - Some use Podcast as Genre Tag. http://www.openculture.com/freeaudiobooks - How can we localize the Genre? There is not even a real unofficial Standard. Everything is found. A context sensitive approach (Where the import is triggered from) could work, but is different then Banshee worked up to now, and it raises some questions about how to import from the menuitem. I personally like the idea of the Genre Tag.
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.