| 107 | } |
| 108 | |
| 109 | bool |
| 110 | Song::UpdateFileInArchive(ArchiveFile &archive) noexcept |
| 111 | { |
| 112 | assert(parent.device == DEVICE_INARCHIVE); |
| 113 | |
| 114 | std::string path_utf8(filename); |
| 115 | |
| 116 | for (const Directory *directory = &parent; |
| 117 | directory->parent != nullptr && |
| 118 | directory->parent->device == DEVICE_INARCHIVE; |
| 119 | directory = directory->parent) { |
| 120 | path_utf8.insert(path_utf8.begin(), '/'); |
| 121 | path_utf8.insert(0, directory->GetName()); |
| 122 | } |
| 123 | |
| 124 | TagBuilder tag_builder; |
| 125 | if (!tag_archive_scan(archive, path_utf8.c_str(), tag_builder)) |
| 126 | return false; |
| 127 | |
| 128 | tag_builder.Commit(tag); |
| 129 | return true; |
| 130 | } |
| 131 | |
| 132 | #endif |
| 133 |
no test coverage detected