(MediaEntry e, boolean isPermanent)
| 186 | } |
| 187 | |
| 188 | public MediaEntry.MediaFile getCurrentFile(MediaEntry e, boolean isPermanent) { |
| 189 | if (e == null) { |
| 190 | return null; |
| 191 | } |
| 192 | if (e.files == null || e.files.isEmpty()) { |
| 193 | e.files = new ArrayList<>(); |
| 194 | getLocalLibrary().add(e); |
| 195 | getLocalLibrary().createBlankFile(e, "Initial", !isPermanent); |
| 196 | // getLocalLibrary().downloadImage(e, e.files.get(0), true); |
| 197 | } |
| 198 | for (MediaEntry.MediaFile f : e.files) { |
| 199 | if (f.activeVersion) { |
| 200 | return f; |
| 201 | } |
| 202 | } |
| 203 | e.files.get(0).activeVersion = true; |
| 204 | return e.files.get(0); |
| 205 | } |
| 206 | |
| 207 | public void saveFile(MediaEntry e, InputStream data) { |
| 208 | // saveFile(getCurrentFile(e, MediaLibrary.CREATE_LOCAL_ON_SAVE), data); |
no test coverage detected