Rename KotoIndexedFile and "files" to KotoIndexedTrack and "tracks"
This commit is contained in:
parent
cf81682f8c
commit
b6db2003b8
13 changed files with 126 additions and 134 deletions
|
@ -122,9 +122,9 @@ static void koto_playlist_init(KotoPlaylist *self) {
|
|||
self->tracks = g_queue_new(); // Set as an empty GQueue
|
||||
}
|
||||
|
||||
void koto_playlist_add_track(KotoPlaylist *self, KotoIndexedFile *file) {
|
||||
void koto_playlist_add_track(KotoPlaylist *self, KotoIndexedTrack *track) {
|
||||
gchar *uuid = NULL;
|
||||
g_object_get(file, "uuid", &uuid, NULL); // Get the UUID
|
||||
g_object_get(track, "uuid", &uuid, NULL); // Get the UUID
|
||||
koto_playlist_add_track_by_uuid(self, uuid); // Add by the file's UUID
|
||||
}
|
||||
|
||||
|
@ -195,15 +195,16 @@ gchar* koto_playlist_go_to_previous(KotoPlaylist *self) {
|
|||
return koto_playlist_get_current_uuid(self); // Return the new UUID
|
||||
}
|
||||
|
||||
void koto_playlist_remove_track(KotoPlaylist *self, KotoIndexedFile *file) {
|
||||
gchar *file_uuid = NULL;
|
||||
g_object_get(file, "uuid", &file_uuid, NULL);
|
||||
void koto_playlist_remove_track(KotoPlaylist *self, KotoIndexedTrack *track) {
|
||||
gchar *track_uuid = NULL;
|
||||
g_object_get(track, "uuid", &track_uuid, NULL);
|
||||
|
||||
if (file_uuid == NULL) {
|
||||
return;
|
||||
if (track_uuid != NULL) {
|
||||
koto_playlist_remove_track_by_uuid(self, track_uuid);
|
||||
g_free(track_uuid);
|
||||
}
|
||||
|
||||
koto_playlist_remove_track_by_uuid(self, file_uuid);
|
||||
return;
|
||||
}
|
||||
|
||||
void koto_playlist_remove_track_by_uuid(KotoPlaylist *self, gchar *uuid) {
|
||||
|
|
|
@ -35,7 +35,7 @@ G_DECLARE_FINAL_TYPE(KotoPlaylist, koto_playlist, KOTO, PLAYLIST, GObject);
|
|||
|
||||
KotoPlaylist* koto_playlist_new();
|
||||
KotoPlaylist* koto_playlist_new_with_uuid(const gchar *uuid);
|
||||
void koto_playlist_add_track(KotoPlaylist *self, KotoIndexedFile *file);
|
||||
void koto_playlist_add_track(KotoPlaylist *self, KotoIndexedTrack *track);
|
||||
void koto_playlist_add_track_by_uuid(KotoPlaylist *self, const gchar *uuid);
|
||||
void koto_playlist_debug(KotoPlaylist *self);
|
||||
void koto_playlist_debug_foreach(gpointer data, gpointer user_data);
|
||||
|
@ -48,7 +48,7 @@ GQueue* koto_playlist_get_tracks(KotoPlaylist *self);
|
|||
gchar* koto_playlist_get_uuid(KotoPlaylist *self);
|
||||
gchar* koto_playlist_go_to_next(KotoPlaylist *self);
|
||||
gchar* koto_playlist_go_to_previous(KotoPlaylist *self);
|
||||
void koto_playlist_remove_track(KotoPlaylist *self, KotoIndexedFile *file);
|
||||
void koto_playlist_remove_track(KotoPlaylist *self, KotoIndexedTrack *track);
|
||||
void koto_playlist_remove_track_by_uuid(KotoPlaylist *self, gchar *uuid);
|
||||
void koto_playlist_set_artwork(KotoPlaylist *self, const gchar *path);
|
||||
void koto_playlist_save_state(KotoPlaylist *self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue