mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
various tweaks to Freesound UI and code. keep a single mootcher to speed up operations; add text to progress bar, stop storing xml files, auto-increment pages until user clicks stop.
git-svn-id: svn://localhost/ardour2/branches/3.0@11801 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
49240fe7c5
commit
164db566b0
3 changed files with 140 additions and 124 deletions
|
|
@ -50,6 +50,8 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
|
|
||||||
|
#include "i18n.h"
|
||||||
|
|
||||||
#include "ardour/audio_library.h"
|
#include "ardour/audio_library.h"
|
||||||
|
|
||||||
static const std::string base_url = "http://www.freesound.org/api";
|
static const std::string base_url = "http://www.freesound.org/api";
|
||||||
|
|
@ -67,6 +69,7 @@ Mootcher::Mootcher()
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
Mootcher:: ~Mootcher()
|
Mootcher:: ~Mootcher()
|
||||||
{
|
{
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
@ -192,6 +195,7 @@ std::string Mootcher::doRequest(std::string uri, std::string params)
|
||||||
xml_page.size = 0;
|
xml_page.size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//printf("freesound result: %s\n", result.c_str());
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -215,6 +219,8 @@ std::string Mootcher::searchText(std::string query, int page, std::string filter
|
||||||
if (sort)
|
if (sort)
|
||||||
params += "&s=" + sortMethodString(sort);
|
params += "&s=" + sortMethodString(sort);
|
||||||
|
|
||||||
|
params += "&fields=id,original_filename,duration,serve";
|
||||||
|
|
||||||
return doRequest("/sounds/search", params);
|
return doRequest("/sounds/search", params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -225,7 +231,6 @@ std::string Mootcher::getSoundResourceFile(std::string ID)
|
||||||
|
|
||||||
std::string originalSoundURI;
|
std::string originalSoundURI;
|
||||||
std::string audioFileName;
|
std::string audioFileName;
|
||||||
std::string xmlFileName;
|
|
||||||
std::string xml;
|
std::string xml;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -250,28 +255,12 @@ std::string Mootcher::getSoundResourceFile(std::string ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLNode *name = freesound->child("original_filename");
|
XMLNode *name = freesound->child("original_filename");
|
||||||
XMLNode *filesize = freesound->child("filesize");
|
|
||||||
|
|
||||||
|
|
||||||
// get the file name and size from xml file
|
// get the file name and size from xml file
|
||||||
if (name && filesize) {
|
if (name) {
|
||||||
|
|
||||||
audioFileName = basePath + "snd/" + ID + "-" + name->child("text")->content();
|
audioFileName = basePath + "snd/" + ID + "-" + name->child("text")->content();
|
||||||
|
|
||||||
// create new filename with the ID number
|
|
||||||
xmlFileName = basePath;
|
|
||||||
xmlFileName += "snd/";
|
|
||||||
xmlFileName += freesound->child("id")->child("text")->content();
|
|
||||||
xmlFileName += "-";
|
|
||||||
xmlFileName += name->child("text")->content();
|
|
||||||
xmlFileName += ".xml";
|
|
||||||
|
|
||||||
// std::cerr << "getSoundResourceFile: saving XML: " << xmlFileName << std::endl;
|
|
||||||
|
|
||||||
// save the xml file to disk
|
|
||||||
ensureWorkingDir();
|
|
||||||
doc.write(xmlFileName.c_str());
|
|
||||||
|
|
||||||
//store all the tags in the database
|
//store all the tags in the database
|
||||||
XMLNode *tags = freesound->child("tags");
|
XMLNode *tags = freesound->child("tags");
|
||||||
if (tags) {
|
if (tags) {
|
||||||
|
|
@ -326,6 +315,11 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID,
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if already canceling a previous download, bail out here ( this can happen b/c getAudioFile gets called by various UI update funcs )
|
||||||
|
if ( caller->freesound_download_cancel ) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
//now download the actual file
|
//now download the actual file
|
||||||
FILE* theFile;
|
FILE* theFile;
|
||||||
theFile = g_fopen( audioFileName.c_str(), "wb" );
|
theFile = g_fopen( audioFileName.c_str(), "wb" );
|
||||||
|
|
@ -344,8 +338,12 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID,
|
||||||
|
|
||||||
std::cerr << "downloading " << audioFileName << " from " << audioURL << "..." << std::endl;
|
std::cerr << "downloading " << audioFileName << " from " << audioURL << "..." << std::endl;
|
||||||
/* hack to get rid of the barber-pole stripes */
|
/* hack to get rid of the barber-pole stripes */
|
||||||
caller->progress_bar.hide();
|
caller->freesound_progress_bar.hide();
|
||||||
caller->progress_bar.show();
|
caller->freesound_progress_bar.show();
|
||||||
|
|
||||||
|
std::string prog;
|
||||||
|
prog = string_compose (_("%1: [Stop]->"), originalFileName);
|
||||||
|
caller->freesound_progress_bar.set_text(prog);
|
||||||
|
|
||||||
curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 0); // turn on the progress bar
|
curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 0); // turn on the progress bar
|
||||||
curl_easy_setopt (curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
|
curl_easy_setopt (curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
|
||||||
|
|
@ -355,7 +353,8 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID,
|
||||||
fclose(theFile);
|
fclose(theFile);
|
||||||
|
|
||||||
curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 1); // turn off the progress bar
|
curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 1); // turn off the progress bar
|
||||||
caller->progress_bar.set_fraction(0.0);
|
caller->freesound_progress_bar.set_fraction(0.0);
|
||||||
|
caller->freesound_progress_bar.set_text("");
|
||||||
|
|
||||||
if( res != 0 ) {
|
if( res != 0 ) {
|
||||||
std::cerr << "curl error " << res << " (" << curl_easy_strerror(res) << ")" << std::endl;
|
std::cerr << "curl error " << res << " (" << curl_easy_strerror(res) << ")" << std::endl;
|
||||||
|
|
@ -377,12 +376,12 @@ int Mootcher::progress_callback(void *caller, double dltotal, double dlnow, doub
|
||||||
SoundFileBrowser *sfb = (SoundFileBrowser *) caller;
|
SoundFileBrowser *sfb = (SoundFileBrowser *) caller;
|
||||||
//XXX I hope it's OK to do GTK things in this callback. Otherwise
|
//XXX I hope it's OK to do GTK things in this callback. Otherwise
|
||||||
// I'll have to do stuff like in interthread_progress_window.
|
// I'll have to do stuff like in interthread_progress_window.
|
||||||
if (sfb->freesound_stop) {
|
if (sfb->freesound_download_cancel) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sfb->progress_bar.set_fraction(dlnow/dltotal);
|
sfb->freesound_progress_bar.set_fraction(dlnow/dltotal);
|
||||||
/* Make sure the progress widget gets updated */
|
/* Make sure the progress widget gets updated */
|
||||||
while (Glib::MainContext::get_default()->iteration (false)) {
|
while (Glib::MainContext::get_default()->iteration (false)) {
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
|
|
|
||||||
|
|
@ -188,10 +188,10 @@ SoundFileBox::SoundFileBox (bool persistent)
|
||||||
main_box.pack_start (bottom_box, false, false);
|
main_box.pack_start (bottom_box, false, false);
|
||||||
|
|
||||||
play_btn.set_image (*(manage (new Image (Stock::MEDIA_PLAY, ICON_SIZE_BUTTON))));
|
play_btn.set_image (*(manage (new Image (Stock::MEDIA_PLAY, ICON_SIZE_BUTTON))));
|
||||||
play_btn.set_label (_("Play"));
|
// play_btn.set_label (_("Play"));
|
||||||
|
|
||||||
stop_btn.set_image (*(manage (new Image (Stock::MEDIA_STOP, ICON_SIZE_BUTTON))));
|
stop_btn.set_image (*(manage (new Image (Stock::MEDIA_STOP, ICON_SIZE_BUTTON))));
|
||||||
stop_btn.set_label (_("Stop"));
|
// stop_btn.set_label (_("Stop"));
|
||||||
|
|
||||||
bottom_box.set_homogeneous (false);
|
bottom_box.set_homogeneous (false);
|
||||||
bottom_box.set_spacing (6);
|
bottom_box.set_spacing (6);
|
||||||
|
|
@ -439,6 +439,10 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
|
||||||
chooser.add_shortcut_folder_uri("file:///Volumes");
|
chooser.add_shortcut_folder_uri("file:///Volumes");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef FREESOUND
|
||||||
|
mootcher = new Mootcher();
|
||||||
|
#endif
|
||||||
|
|
||||||
//add the file chooser
|
//add the file chooser
|
||||||
{
|
{
|
||||||
chooser.set_border_width (12);
|
chooser.set_border_width (12);
|
||||||
|
|
@ -502,6 +506,8 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
|
||||||
found_search_btn.signal_clicked().connect(sigc::mem_fun(*this, &SoundFileBrowser::found_search_clicked));
|
found_search_btn.signal_clicked().connect(sigc::mem_fun(*this, &SoundFileBrowser::found_search_clicked));
|
||||||
found_entry.signal_activate().connect(sigc::mem_fun(*this, &SoundFileBrowser::found_search_clicked));
|
found_entry.signal_activate().connect(sigc::mem_fun(*this, &SoundFileBrowser::found_search_clicked));
|
||||||
|
|
||||||
|
freesound_stop_btn.signal_clicked().connect(sigc::mem_fun(*this, &SoundFileBrowser::freesound_stop_clicked));
|
||||||
|
|
||||||
notebook.append_page (*vbox, _("Search Tags"));
|
notebook.append_page (*vbox, _("Search Tags"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -540,15 +546,8 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
|
||||||
freesound_sort.append_text(_("Lowest rated"));
|
freesound_sort.append_text(_("Lowest rated"));
|
||||||
freesound_sort.set_active(0);
|
freesound_sort.set_active(0);
|
||||||
|
|
||||||
label = manage (new Label);
|
|
||||||
label->set_text (_("Page:"));
|
|
||||||
passbox->pack_start (*label, false, false);
|
|
||||||
passbox->pack_start (freesound_page, false, false);
|
|
||||||
freesound_page.set_range(1, 1000);
|
|
||||||
freesound_page.set_increments(1, 10);
|
|
||||||
|
|
||||||
passbox->pack_start (freesound_search_btn, false, false);
|
passbox->pack_start (freesound_search_btn, false, false);
|
||||||
passbox->pack_start (progress_bar);
|
passbox->pack_start (freesound_progress_bar);
|
||||||
passbox->pack_end (freesound_stop_btn, false, false);
|
passbox->pack_end (freesound_stop_btn, false, false);
|
||||||
freesound_stop_btn.set_label(_("Stop"));
|
freesound_stop_btn.set_label(_("Stop"));
|
||||||
|
|
||||||
|
|
@ -575,6 +574,7 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
|
||||||
freesound_stop_btn.signal_clicked().connect(sigc::mem_fun(*this, &SoundFileBrowser::freesound_stop_clicked));
|
freesound_stop_btn.signal_clicked().connect(sigc::mem_fun(*this, &SoundFileBrowser::freesound_stop_clicked));
|
||||||
notebook.append_page (*vbox, _("Search Freesound"));
|
notebook.append_page (*vbox, _("Search Freesound"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -736,13 +736,13 @@ SoundFileBrowser::found_list_view_selected ()
|
||||||
void
|
void
|
||||||
SoundFileBrowser::freesound_list_view_selected ()
|
SoundFileBrowser::freesound_list_view_selected ()
|
||||||
{
|
{
|
||||||
|
freesound_download_cancel = false;
|
||||||
|
|
||||||
#ifdef FREESOUND
|
#ifdef FREESOUND
|
||||||
if (!reset_options ()) {
|
if (!reset_options ()) {
|
||||||
set_response_sensitive (RESPONSE_OK, false);
|
set_response_sensitive (RESPONSE_OK, false);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Mootcher theMootcher; // XXX should be a member of SoundFileBrowser
|
|
||||||
|
|
||||||
string file;
|
string file;
|
||||||
|
|
||||||
TreeView::Selection::ListHandle_Path rows = freesound_list_view.get_selection()->get_selected_rows ();
|
TreeView::Selection::ListHandle_Path rows = freesound_list_view.get_selection()->get_selected_rows ();
|
||||||
|
|
@ -760,8 +760,7 @@ SoundFileBrowser::freesound_list_view_selected ()
|
||||||
gdk_window_set_cursor (get_window()->gobj(), gdk_cursor_new(GDK_WATCH));
|
gdk_window_set_cursor (get_window()->gobj(), gdk_cursor_new(GDK_WATCH));
|
||||||
gdk_flush();
|
gdk_flush();
|
||||||
|
|
||||||
freesound_stop = false;
|
file = mootcher->getAudioFile(ofn, id, uri, this);
|
||||||
file = theMootcher.getAudioFile(ofn, id, uri, this);
|
|
||||||
|
|
||||||
gdk_window_set_cursor (get_window()->gobj(), prev_cursor);
|
gdk_window_set_cursor (get_window()->gobj(), prev_cursor);
|
||||||
|
|
||||||
|
|
@ -805,13 +804,15 @@ SoundFileBrowser::found_search_clicked ()
|
||||||
void
|
void
|
||||||
SoundFileBrowser::freesound_search_clicked ()
|
SoundFileBrowser::freesound_search_clicked ()
|
||||||
{
|
{
|
||||||
|
freesound_search_cancel = false;
|
||||||
freesound_search();
|
freesound_search();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SoundFileBrowser::freesound_stop_clicked ()
|
SoundFileBrowser::freesound_stop_clicked ()
|
||||||
{
|
{
|
||||||
freesound_stop = true;
|
freesound_download_cancel = true;
|
||||||
|
freesound_search_cancel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -821,45 +822,48 @@ SoundFileBrowser::freesound_search()
|
||||||
#ifdef FREESOUND
|
#ifdef FREESOUND
|
||||||
freesound_list->clear();
|
freesound_list->clear();
|
||||||
|
|
||||||
Mootcher theMootcher;
|
|
||||||
|
|
||||||
string search_string = freesound_entry.get_text ();
|
string search_string = freesound_entry.get_text ();
|
||||||
enum sortMethod sort_method = (enum sortMethod) freesound_sort.get_active_row_number();
|
enum sortMethod sort_method = (enum sortMethod) freesound_sort.get_active_row_number();
|
||||||
int page = freesound_page.get_value_as_int();
|
|
||||||
|
|
||||||
GdkCursor *prev_cursor;
|
GdkCursor *prev_cursor;
|
||||||
prev_cursor = gdk_window_get_cursor (get_window()->gobj());
|
prev_cursor = gdk_window_get_cursor (get_window()->gobj());
|
||||||
gdk_window_set_cursor (get_window()->gobj(), gdk_cursor_new(GDK_WATCH));
|
gdk_window_set_cursor (get_window()->gobj(), gdk_cursor_new(GDK_WATCH));
|
||||||
gdk_flush();
|
gdk_flush();
|
||||||
|
for (int page = 1; page <= 99; page++ ) {
|
||||||
|
|
||||||
string theString = theMootcher.searchText(
|
std::string prog;
|
||||||
|
prog = string_compose (_("Page %1, [Stop]->"), page);
|
||||||
|
freesound_progress_bar.set_text(prog);
|
||||||
|
while (Glib::MainContext::get_default()->iteration (false)) {
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string theString = mootcher->searchText(
|
||||||
search_string,
|
search_string,
|
||||||
page,
|
page,
|
||||||
"", // filter, could do, e.g. "type:wav"
|
"", // filter, could do, e.g. "type:wav"
|
||||||
sort_method
|
sort_method
|
||||||
);
|
);
|
||||||
|
|
||||||
gdk_window_set_cursor (get_window()->gobj(), prev_cursor);
|
|
||||||
|
|
||||||
XMLTree doc;
|
XMLTree doc;
|
||||||
doc.read_buffer( theString );
|
doc.read_buffer( theString );
|
||||||
XMLNode *root = doc.root();
|
XMLNode *root = doc.root();
|
||||||
|
|
||||||
if (!root) {
|
if (!root) {
|
||||||
cerr << "no root XML node!" << endl;
|
cerr << "no root XML node!" << endl;
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( strcmp(root->name().c_str(), "response") != 0) {
|
if ( strcmp(root->name().c_str(), "response") != 0) {
|
||||||
cerr << "root node name == " << root->name() << ", != \"response\"!" << endl;
|
cerr << "root node name == " << root->name() << ", != \"response\"!" << endl;
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLNode *sounds_root = root->child("sounds");
|
XMLNode *sounds_root = root->child("sounds");
|
||||||
|
|
||||||
if (!sounds_root) {
|
if (!sounds_root) {
|
||||||
cerr << "no child node \"sounds\" found!" << endl;
|
cerr << "no child node \"sounds\" found!" << endl;
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLNodeList sounds = sounds_root->children();
|
XMLNodeList sounds = sounds_root->children();
|
||||||
|
|
@ -869,7 +873,8 @@ SoundFileBrowser::freesound_search()
|
||||||
node = *niter;
|
node = *niter;
|
||||||
if( strcmp( node->name().c_str(), "resource") != 0 ){
|
if( strcmp( node->name().c_str(), "resource") != 0 ){
|
||||||
cerr << "node->name()=" << node->name() << ",!= \"resource\"!" << endl;
|
cerr << "node->name()=" << node->name() << ",!= \"resource\"!" << endl;
|
||||||
continue; // return;
|
freesound_search_cancel = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// node->dump(cerr, "node:");
|
// node->dump(cerr, "node:");
|
||||||
|
|
@ -912,6 +917,16 @@ SoundFileBrowser::freesound_search()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (freesound_search_cancel)
|
||||||
|
break;
|
||||||
|
|
||||||
|
} //page "for" loop
|
||||||
|
|
||||||
|
gdk_window_set_cursor (get_window()->gobj(), prev_cursor);
|
||||||
|
|
||||||
|
freesound_progress_bar.set_text("");
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -948,9 +963,6 @@ SoundFileBrowser::get_paths ()
|
||||||
#ifdef FREESOUND
|
#ifdef FREESOUND
|
||||||
typedef TreeView::Selection::ListHandle_Path ListPath;
|
typedef TreeView::Selection::ListHandle_Path ListPath;
|
||||||
|
|
||||||
Mootcher theMootcher; // XXX should be a member of SoundFileBrowser
|
|
||||||
|
|
||||||
|
|
||||||
ListPath rows = freesound_list_view.get_selection()->get_selected_rows ();
|
ListPath rows = freesound_list_view.get_selection()->get_selected_rows ();
|
||||||
for (ListPath::iterator i = rows.begin() ; i != rows.end(); ++i) {
|
for (ListPath::iterator i = rows.begin() ; i != rows.end(); ++i) {
|
||||||
TreeIter iter = freesound_list->get_iter(*i);
|
TreeIter iter = freesound_list->get_iter(*i);
|
||||||
|
|
@ -963,8 +975,7 @@ SoundFileBrowser::get_paths ()
|
||||||
gdk_window_set_cursor (get_window()->gobj(), gdk_cursor_new(GDK_WATCH));
|
gdk_window_set_cursor (get_window()->gobj(), gdk_cursor_new(GDK_WATCH));
|
||||||
gdk_flush();
|
gdk_flush();
|
||||||
|
|
||||||
freesound_stop = false;
|
string str = mootcher->getAudioFile(ofn, id, uri, this);
|
||||||
string str = theMootcher.getAudioFile(ofn, id, uri, this);
|
|
||||||
if (str != "") {
|
if (str != "") {
|
||||||
results.push_back (str);
|
results.push_back (str);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ namespace ARDOUR {
|
||||||
};
|
};
|
||||||
|
|
||||||
class GainMeter;
|
class GainMeter;
|
||||||
|
class Mootcher;
|
||||||
|
|
||||||
class SoundFileBox : public Gtk::VBox, public ARDOUR::SessionHandlePtr
|
class SoundFileBox : public Gtk::VBox, public ARDOUR::SessionHandlePtr
|
||||||
{
|
{
|
||||||
|
|
@ -167,12 +168,17 @@ class SoundFileBrowser : public ArdourDialog
|
||||||
|
|
||||||
Gtk::Button freesound_search_btn;
|
Gtk::Button freesound_search_btn;
|
||||||
Gtk::TreeView freesound_list_view;
|
Gtk::TreeView freesound_list_view;
|
||||||
Gtk::ProgressBar progress_bar;
|
Gtk::ProgressBar freesound_progress_bar;
|
||||||
|
|
||||||
bool freesound_stop;
|
bool freesound_search_cancel;
|
||||||
|
bool freesound_download_cancel;
|
||||||
|
|
||||||
void freesound_search();
|
void freesound_search();
|
||||||
|
|
||||||
|
#ifdef FREESOUND
|
||||||
|
Mootcher *mootcher;
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool resetting_ourselves;
|
bool resetting_ourselves;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue