diff options
author | Aaron Bockover <abock@src.gnome.org> | 2005-10-27 15:42:05 +0000 |
---|---|---|
committer | Aaron Bockover <abock@src.gnome.org> | 2005-10-27 15:42:05 +0000 |
commit | e026f2e3b7f6dc961455a6357a5dcaaf688db228 (patch) | |
tree | d55907f64bfc5fe5a7b46b2993fd1f6f9d4184d4 | |
parent | 948b5a5b1928eb0536894db101ed8d68dabe2d6f (diff) |
Use code from Utilities.cs
-rw-r--r-- | src/AudioCdCore.cs | 4 | ||||
-rw-r--r-- | src/LibraryTrackInfo.cs | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/AudioCdCore.cs b/src/AudioCdCore.cs index 463a4876f..463d3ac98 100644 --- a/src/AudioCdCore.cs +++ b/src/AudioCdCore.cs @@ -231,8 +231,8 @@ namespace Banshee { try { using(UnixStream stream = UnixFile.Open(device_node, - Mono.Unix.Native.OpenFlags.O_RDONLY | - Mono.Unix.Native.OpenFlags.O_NONBLOCK)) { + (Mono.Unix.OpenFlags)(UnixFileUtil.OpenFlags.O_RDONLY | + UnixFileUtil.OpenFlags.O_NONBLOCK))) { return ioctl(stream.Handle, open ? EjectOperation.Open : EjectOperation.Close) == 0; diff --git a/src/LibraryTrackInfo.cs b/src/LibraryTrackInfo.cs index 43b0f3d02..b73b2f887 100644 --- a/src/LibraryTrackInfo.cs +++ b/src/LibraryTrackInfo.cs @@ -301,7 +301,7 @@ namespace Banshee "Title", title, "Genre", genre, "Year", year, - "DateAddedStamp", Mono.Unix.Native.NativeConvert.FromDateTime(dateAdded), + "DateAddedStamp", DateTimeUtil.FromDateTime(dateAdded), "TrackNumber", trackNumber, "TrackCount", trackCount, "Duration", duration, @@ -311,7 +311,7 @@ namespace Banshee "AlbumPeak", albumPeak, "Rating", rating, "NumberOfPlays", numberOfPlays, - "LastPlayedStamp", Mono.Unix.Native.NativeConvert.FromDateTime(lastPlayed)); + "LastPlayedStamp", DateTimeUtil.FromDateTime(lastPlayed)); } else { tracksQuery = new Update("Tracks", "Uri", uri, @@ -324,7 +324,7 @@ namespace Banshee "Title", title, "Genre", genre, "Year", year, - "DateAddedStamp", Mono.Unix.Native.NativeConvert.FromDateTime(dateAdded), + "DateAddedStamp", DateTimeUtil.FromDateTime(dateAdded), "TrackNumber", trackNumber, "TrackCount", trackCount, "Duration", duration, @@ -334,7 +334,7 @@ namespace Banshee "AlbumPeak", albumPeak, "Rating", rating, "NumberOfPlays", numberOfPlays, - "LastPlayedStamp", Mono.Unix.Native.NativeConvert.FromDateTime(lastPlayed)) + + "LastPlayedStamp", DateTimeUtil.FromDateTime(lastPlayed)) + new Where(new Compare("TrackID", Op.EqualTo, trackId));// + // new Limit(1); } @@ -408,7 +408,7 @@ namespace Banshee string s = (string)reader ["LastPlayedStamp"]; if (s != null){ long time = Int64.Parse (s); - lastPlayed = Mono.Unix.Native.NativeConvert.ToDateTime(time); + lastPlayed = DateTimeUtil.ToDateTime(time); } } catch(Exception e) { Console.WriteLine ("E1: " + e); @@ -422,7 +422,7 @@ namespace Banshee string s = (string)reader ["LastPlayedStamp"]; if (s != null){ long time = Int64.Parse (s); - dateAdded = Mono.Unix.Native.NativeConvert.ToDateTime(time); + dateAdded = DateTimeUtil.ToDateTime(time); } } catch(Exception e) { Console.WriteLine ("E2: " + e); |