Source: btag
Version: 1.1.3-1
Followup-For: Bug #997224
X-Debbugs-Cc: [email protected]
tag -1 patch thanks
Hello,
Attached is a patch that replaces deprecated methods and variables according to
TagLib official docs [1]. It fixes FTBFS and it should work well too.
If more help is needed, please let me know.
Cheers,
Eric
[1]: https://taglib.org/api/classTagLib_1_1String.html
--- a/src/InteractiveTagger.cpp
+++ b/src/InteractiveTagger.cpp
@@ -198,7 +198,7 @@
// Ask for the artist
artist_confirmation.reset();
- if (!f.tag()->artist().isNull())
+ if (!f.tag()->artist().isEmpty())
artist_confirmation.set_local_default(m_input_filter->filter(f.tag()->artist().toWString()));
artist_confirmation.ask(L"Artist:");
while (!artist_confirmation.complies())
@@ -207,7 +207,7 @@
// Ask for the album
album_confirmation.reset();
- if (!f.tag()->album().isNull())
+ if (!f.tag()->album().isEmpty())
album_confirmation.set_local_default(m_input_filter->filter(f.tag()->album().toWString()));
album_confirmation.ask(L"Album:");
while (!album_confirmation.complies())
@@ -236,7 +236,7 @@
// Ask for the song title
ConfirmationHandler title_confirmation(*m_terminal, m_input_filter,
m_output_filter);
title_confirmation.reset();
- if (!f.tag()->title().isNull())
+ if (!f.tag()->title().isEmpty())
title_confirmation.set_local_default(m_input_filter->filter(f.tag()->title().toWString()));
title_confirmation.ask(L"Title:");
while (!title_confirmation.complies())
@@ -244,8 +244,8 @@
f.tag()->setTitle(title_confirmation.answer());
// Reset the comment and genre fields
- f.tag()->setComment(TagLib::String::null);
- f.tag()->setGenre(TagLib::String::null);
+ f.tag()->setComment(TagLib::String());
+ f.tag()->setGenre(TagLib::String());
// Add it to the list of unsaved files
m_unsaved_files.push_back(f);