[banshee] [Audiobook] New, simple Audiobooks library
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] [Audiobook] New, simple Audiobooks library
- Date: Tue, 15 Dec 2009 04:10:32 +0000 (UTC)
commit 4c2c3866402654e51a5bf6a3a773443506fc17d0
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu Nov 12 22:06:44 2009 -0800
[Audiobook] New, simple Audiobooks library
Should replace the main track view with a grid view of books/series.
Note this extension is disabled by default; see Preferences.
build/build.environment.mk | 1 +
configure.ac | 1 +
po/POTFILES.in | 1 +
.../Banshee.Audiobook.addin.xml.in | 22 +++++
.../Banshee.Audiobook/Banshee.Audiobook.csproj | 84 ++++++++++++++++++++
.../Banshee.Audiobook/AudiobookLibrarySource.cs | 84 ++++++++++++++++++++
src/Extensions/Banshee.Audiobook/Makefile.am | 12 +++
src/Extensions/Makefile.am | 1 +
8 files changed, 206 insertions(+), 0 deletions(-)
---
diff --git a/build/build.environment.mk b/build/build.environment.mk
index b4d71ae..1c28fc7 100644
--- a/build/build.environment.mk
+++ b/build/build.environment.mk
@@ -142,6 +142,7 @@ LINK_EXTENSION_NOWPLAYING_DEPS = $(REF_EXTENSION_NOWPLAYING) \
$(LINK_EXTENSION_NOWPLAYING)
REF_EXTENSION_NOWPLAYING_CLUTTER = $(LINK_BANSHEE_THICKCLIENT_DEPS)
REF_EXTENSION_PODCASTING = $(LINK_MIGO_DEPS) $(LINK_BANSHEE_THICKCLIENT_DEPS)
+REF_EXTENSION_AUDIOBOOK = $(LINK_BANSHEE_THICKCLIENT_DEPS)
REF_EXTENSION_SAMPLE = $(LINK_BANSHEE_THICKCLIENT_DEPS)
REF_EXTENSION_REMOTE_AUDIO = $(LINK_BANSHEE_THICKCLIENT_DEPS) $(LINK_MONO_ZEROCONF)
diff --git a/configure.ac b/configure.ac
index 9b6b853..52d3494 100644
--- a/configure.ac
+++ b/configure.ac
@@ -272,6 +272,7 @@ src/Dap/Banshee.Dap.Mtp/Makefile
src/Dap/Banshee.Dap.Karma/Makefile
src/Extensions/Makefile
+src/Extensions/Banshee.Audiobook/Makefile
src/Extensions/Banshee.AudioCd/Makefile
src/Extensions/Banshee.Bookmarks/Makefile
src/Extensions/Banshee.BooScript/Makefile
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c671115..46f3a0b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -157,6 +157,7 @@ src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/WebOSDevice.cs
src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp.addin.xml.in
src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs
+src/Extensions/Banshee.Audiobook/Banshee.Audiobook.addin.xml.in
src/Extensions/Banshee.AudioCd/Banshee.AudioCd.addin.xml.in
src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs
src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdRipper.cs
diff --git a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook.addin.xml.in b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook.addin.xml.in
new file mode 100644
index 0000000..f9ce1b9
--- /dev/null
+++ b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook.addin.xml.in
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Addin
+ id="Banshee.Audiobook"
+ version="1.0"
+ compatVersion="1.0"
+ copyright="© 2009 Novell, Inc. Licensed under the MIT X11 license."
+ _name="Audiobooks Library"
+ category="User Interface"
+ _description="Useful for organizing audiobooks, lectures, etc."
+ author="Gabriel Burt"
+ url="http://banshee-project.org/"
+ defaultEnabled="false">
+
+ <Dependencies>
+ <Addin id="Banshee.Services" version="1.0"/>
+ <Addin id="Banshee.ThickClient" version="1.0"/>
+ </Dependencies>
+
+ <Extension path="/Banshee/SourceManager/Source">
+ <Source class="Banshee.Audiobook.AudiobookLibrarySource"/>
+ </Extension>
+</Addin>
diff --git a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook.csproj b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook.csproj
new file mode 100644
index 0000000..ed2d0c4
--- /dev/null
+++ b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook.csproj
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <ProjectGuid>{46AD1892-C5D3-4696-BA40-FBF7F4CE2B39}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <UseParentDirectoryAsNamespace>true</UseParentDirectoryAsNamespace>
+ <AssemblyName>Banshee.Audiobook</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\..\bin</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
+ <CustomCommands>
+ <CustomCommands>
+ <Command type="Build" command="make" workingdir="${SolutionDir}" />
+ <Command type="Execute" command="make run" workingdir="${SolutionDir}" />
+ </CustomCommands>
+ </CustomCommands>
+ <AssemblyKeyFile>.</AssemblyKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Core\Banshee.Core\Banshee.Core.csproj">
+ <Project>{2ADB831A-A050-47D0-B6B9-9C19D60233BB}</Project>
+ <Name>Banshee.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Core\Banshee.Services\Banshee.Services.csproj">
+ <Project>{B28354F0-BA87-44E8-989F-B864A3C7C09F}</Project>
+ <Name>Banshee.Services</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Core\Banshee.ThickClient\Banshee.ThickClient.csproj">
+ <Project>{AC839523-7BDF-4AB6-8115-E17921B96EC6}</Project>
+ <Name>Banshee.ThickClient</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Libraries\Migo\Migo.csproj">
+ <Project>{9C7B8E9C-A4E6-4459-A2C4-3D2D199EA919}</Project>
+ <Name>Migo</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Libraries\Hyena\Hyena.csproj">
+ <Project>{95374549-9553-4C1E-9D89-667755F90E12}</Project>
+ <Name>Hyena</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Libraries\Hyena.Gui\Hyena.Gui.csproj">
+ <Project>{C856EFD8-E812-4E61-8B76-E3583D94C233}</Project>
+ <Name>Hyena.Gui</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="taglib-sharp, Version=2.0.3.0, Culture=neutral, PublicKeyToken=db62eba44689b5b0" />
+ <Reference Include="System.Xml" />
+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Banshee.Audiobook.addin.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Banshee.Audiobook\AudiobookLibrarySource.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ProjectExtensions>
+ <MonoDevelop>
+ <Properties>
+ <GtkDesignInfo />
+ <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="true" RelativeMakefileName="./Makefile.am">
+ <BuildFilesVar Sync="true" Name="SOURCES" />
+ <DeployFilesVar />
+ <ResourcesVar Sync="true" Name="RESOURCES" />
+ <OthersVar />
+ <GacRefVar />
+ <AsmRefVar />
+ <ProjectRefVar />
+ </MonoDevelop.Autotools.MakefileInfo>
+ </Properties>
+ </MonoDevelop>
+ </ProjectExtensions>
+</Project>
diff --git a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs
new file mode 100644
index 0000000..6719514
--- /dev/null
+++ b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs
@@ -0,0 +1,84 @@
+//
+// AudiobookLibrarySource.cs
+//
+// Author:
+// Gabriel Burt <gburt novell com>
+//
+// Copyright (C) 2008-2009 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+
+using Mono.Unix;
+
+using Banshee.Library;
+using Banshee.Collection;
+using Banshee.SmartPlaylist;
+
+namespace Banshee.Audiobook
+{
+ public class AudiobookLibrarySource : LibrarySource
+ {
+ public AudiobookLibrarySource () : base (Catalog.GetString ("Audiobooks, etc"), "AudiobookLibrary", 49)
+ {
+ MediaTypes = TrackMediaAttributes.AudioBook;
+ NotMediaTypes = TrackMediaAttributes.Podcast | TrackMediaAttributes.VideoStream | TrackMediaAttributes.Music;
+
+ // FIXME
+ Properties.SetStringList ("Icon.Name", "document", "source-library");
+ Properties.SetString ("TrackView.ColumnControllerXml", String.Format (@"
+ <column-controller>
+ <add-all-defaults />
+ <remove-default column=""DiscColumn"" />
+ <remove-default column=""AlbumColumn"" />
+ <remove-default column=""ComposerColumn"" />
+ <remove-default column=""AlbumArtistColumn"" />
+ <remove-default column=""ConductorColumn"" />
+ <remove-default column=""ComposerColumn"" />
+ <remove-default column=""BpmColumn"" />
+ <sort-column direction=""asc"">track_title</sort-column>
+ <column modify-default=""ArtistColumn"">
+ <title>{0}</title>
+ <long-title>{0}</long-title>
+ </column>
+ </column-controller>
+ ", Catalog.GetString ("Author")));
+ }
+
+ public override string DefaultBaseDirectory {
+ get { return Banshee.Base.XdgBaseDirectorySpec.GetUserDirectory ("XDG_AUDIOBOOKS_DIR", "Audiobooks"); }
+ }
+
+ public override bool ShowBrowser {
+ get { return false; }
+ }
+
+ protected override bool HasArtistAlbum {
+ get { return false; }
+ }
+
+ public override IEnumerable<SmartPlaylistDefinition> DefaultSmartPlaylists {
+ get { yield break; }
+ }
+ }
+}
diff --git a/src/Extensions/Banshee.Audiobook/Makefile.am b/src/Extensions/Banshee.Audiobook/Makefile.am
new file mode 100644
index 0000000..b6fa398
--- /dev/null
+++ b/src/Extensions/Banshee.Audiobook/Makefile.am
@@ -0,0 +1,12 @@
+ASSEMBLY = Banshee.Audiobook
+TARGET = library
+LINK = $(REF_EXTENSION_AUDIOBOOK)
+INSTALL_DIR = $(EXTENSIONS_INSTALL_DIR)
+
+SOURCES = \
+ Banshee.Audiobook/AudiobookLibrarySource.cs
+
+RESOURCES = \
+ Banshee.Audiobook.addin.xml
+
+include $(top_srcdir)/build/build.mk
diff --git a/src/Extensions/Makefile.am b/src/Extensions/Makefile.am
index c38928e..58f66a7 100644
--- a/src/Extensions/Makefile.am
+++ b/src/Extensions/Makefile.am
@@ -1,4 +1,5 @@
SUBDIRS = \
+ Banshee.Audiobook \
Banshee.AudioCd \
Banshee.Bookmarks \
Banshee.BooScript \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]