banshee r4494 - in trunk/banshee: . src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp src/Dap/Banshee.Dap/Banshee.Dap src/Dap/Banshee.Dap/Banshee.Dap.Gui src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4494 - in trunk/banshee: . src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp src/Dap/Banshee.Dap/Banshee.Dap src/Dap/Banshee.Dap/Banshee.Dap.Gui src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui
- Date: Mon, 8 Sep 2008 22:47:53 +0000 (UTC)
Author: gburt
Date: Mon Sep 8 22:47:53 2008
New Revision: 4494
URL: http://svn.gnome.org/viewvc/banshee?rev=4494&view=rev
Log:
2008-09-08 Gabriel Burt <gabriel burt gmail com>
* src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs:
* src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs:
Set the PlayCount of items to zero when marked new and 1 when marked read,
and add PlayCount = 0 as a SyncCondition so that only new items are synced.
* src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs:
* src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs:
* src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs:
* src/Dap/Banshee.Dap/Banshee.Dap/DapSource.cs: Call SyncPlaylists when
ejecting and Sync not enabled, because while tracks are transferred
immeidately when you DnD them etc, playlists aren't saved.
* src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs: Remove the testing
status label and hrule.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs
trunk/banshee/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
trunk/banshee/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs
trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs
trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap/DapSource.cs
trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs
trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
Modified: trunk/banshee/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs
==============================================================================
--- trunk/banshee/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs (original)
+++ trunk/banshee/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs Mon Sep 8 22:47:53 2008
@@ -110,7 +110,8 @@
// WARNING: This will be called from a thread!
protected override void Eject ()
- {
+ {
+ base.Eject ();
if (ipod_device.CanUnmount) {
ipod_device.Unmount ();
}
@@ -437,7 +438,11 @@
public override void SyncPlaylists ()
{
- QueueSync ();
+ if (sync_thread_wait == null) {
+ PerformSyncThreadCycle ();
+ } else {
+ QueueSync ();
+ }
}
private void QueueSync ()
Modified: trunk/banshee/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
==============================================================================
--- trunk/banshee/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs (original)
+++ trunk/banshee/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs Mon Sep 8 22:47:53 2008
@@ -412,6 +412,7 @@
protected override void Eject ()
{
+ base.Eject ();
if (volume.CanUnmount) {
volume.Unmount ();
}
Modified: trunk/banshee/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs
==============================================================================
--- trunk/banshee/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs (original)
+++ trunk/banshee/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs Mon Sep 8 22:47:53 2008
@@ -390,9 +390,14 @@
return f;
}
+ private bool disposed = false;
public override void Dispose ()
{
- base.Dispose ();
+ if (disposed)
+ return;
+
+ disposed = true;
+ base.Dispose ();
if (mtp_device != null) {
lock (mtp_device) {
@@ -407,6 +412,7 @@
protected override void Eject ()
{
+ base.Eject ();
Dispose ();
}
Modified: trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs
==============================================================================
--- trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs (original)
+++ trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs Mon Sep 8 22:47:53 2008
@@ -44,7 +44,7 @@
private DapSource dap;
private VBox vbox;
- private WrapLabel dap_stats;
+ //private WrapLabel dap_stats;
public DapContent (DapSource source) : base (source)
{
@@ -70,20 +70,20 @@
vbox.PackStart (new Banshee.Preferences.Gui.NotebookPage (dap.Preferences), false, false, 0);
- vbox.PackStart (new HSeparator (), false, false, 0);
+ //vbox.PackStart (new HSeparator (), false, false, 0);
- dap_stats = new WrapLabel ();
+ /*dap_stats = new WrapLabel ();
dap.Sync.Updated += delegate { Banshee.Base.ThreadAssist.ProxyToMain (UpdateStatus); };
dap_stats.Text = dap.Sync.ToString ();
- vbox.PackStart (dap_stats, false, false, 0);
+ vbox.PackStart (dap_stats, false, false, 0);*/
ShowAll ();
}
- private void UpdateStatus ()
+ /*private void UpdateStatus ()
{
- dap_stats.Text = dap.Sync.ToString ();
- }
+ //dap_stats.Text = dap.Sync.ToString ();
+ }*/
private void BuildActions ()
{
Modified: trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap/DapSource.cs
==============================================================================
--- trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap/DapSource.cs (original)
+++ trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap/DapSource.cs Mon Sep 8 22:47:53 2008
@@ -285,6 +285,15 @@
{
}
+ protected override void Eject ()
+ {
+ if (!Sync.Enabled) {
+ // If sync isn't enabled, then make sure we've written saved our playlists
+ // Track transfers happen immediately, but playlists saves don't
+ SyncPlaylists ();
+ }
+ }
+
private void AttemptToAddTrackToDevice (DatabaseTrackInfo track, SafeUri fromUri)
{
if (BytesAvailable - Banshee.IO.File.GetSize (fromUri) >= 0) {
Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs Mon Sep 8 22:47:53 2008
@@ -98,7 +98,7 @@
this.baseDirectory = baseDirectory;
MediaTypes = TrackMediaAttributes.Podcast;
NotMediaTypes = TrackMediaAttributes.AudioBook;
- SyncCondition = "substr(CoreTracks.Uri, 0, 4) != 'http'";
+ SyncCondition = "(substr(CoreTracks.Uri, 0, 4) != 'http' AND CoreTracks.PlayCount = 0)";
// For now..
SupportsPlaylists = false;
Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs Mon Sep 8 22:47:53 2008
@@ -459,6 +459,11 @@
if (track.Item.IsRead != markRead) {
track.Item.IsRead = markRead;
track.Item.Save ();
+
+ if (track.Item.IsRead ^ track.PlayCount > 0) {
+ track.PlayCount = track.Item.IsRead ? 1 : 0;
+ track.Save (false);
+ }
any = true;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]