Reference iTunes playlist by name hash rather than native playlist id

This commit is contained in:
Ron Pedde 2006-11-27 00:00:00 +00:00
parent 27492139d9
commit 9239e0ad36
3 changed files with 19 additions and 13 deletions

View File

@ -207,8 +207,8 @@ void rend_callback(void *info) {
rend_stoprunloop();
break;
case REND_MSG_TYPE_STATUS:
DPRINTF(E_DBG,L_REND,"Status inquiry -- returning 0\n");
rend_send_response(0); /* success */
DPRINTF(E_DBG,L_REND,"Status inquiry -- returning 1\n");
rend_send_response(1); /* success */
break;
default:
break;

View File

@ -933,8 +933,14 @@ int scan_xml_playlists_section(int action, char *info) {
current_id=0;
if(dont_scan == 0) {
DPRINTF(E_DBG,L_SCAN,"Creating playlist for %s\n",current_name);
/* we won't actually use the iTunes pl_id, as it seems
* to change for no good reason. We'll hash the name,
* instead. */
/* delete the old one first */
/* FIXME: Error handling */
native_plid = util_djb_hash_str(current_name);
pm3u = db_fetch_playlist(NULL,scan_xml_file,native_plid);
if(pm3u) {
db_delete_playlist(NULL,pm3u->id);