kodi
FileItem.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
16 #include "LockType.h"
17 #include "XBDateTime.h"
18 #include "guilib/GUIListItem.h"
19 #include "threads/CriticalSection.h"
20 #include "utils/IArchivable.h"
21 #include "utils/ISerializable.h"
22 #include "utils/ISortable.h"
23 #include "utils/SortUtils.h"
24 
25 #include <map>
26 #include <memory>
27 #include <string>
28 #include <utility>
29 #include <vector>
30 
31 enum class VideoDbContentType;
32 
33 namespace ADDON
34 {
35 class IAddon;
36 }
37 
38 namespace MUSIC_INFO
39 {
40  class CMusicInfoTag;
41 }
42 class CVideoInfoTag;
43 class CPictureInfoTag;
44 
45 namespace KODI
46 {
47 namespace GAME
48 {
49  class CGameInfoTag;
50 }
51 }
52 
53 namespace PVR
54 {
55 class CPVRChannel;
56 class CPVRChannelGroupMember;
57 class CPVREpgInfoTag;
58 class CPVREpgSearchFilter;
59 class CPVRRecording;
60 class CPVRTimerInfoTag;
61 }
62 
63 class CAlbum;
64 class CArtist;
65 class CSong;
66 class CGenre;
67 
68 class CURL;
69 class CVariant;
70 
71 class CFileItemList;
72 class CCueDocument;
73 typedef std::shared_ptr<CCueDocument> CCueDocumentPtr;
74 
75 class IEvent;
76 typedef std::shared_ptr<const IEvent> EventPtr;
77 
78 /* special startoffset used to indicate that we wish to resume */
79 #define STARTOFFSET_RESUME (-1)
80 
81 class CMediaSource;
82 
83 class CBookmark;
84 
85 enum EFileFolderType {
86  EFILEFOLDER_TYPE_ALWAYS = 1<<0,
87  EFILEFOLDER_TYPE_ONCLICK = 1<<1,
88  EFILEFOLDER_TYPE_ONBROWSE = 1<<2,
89 
90  EFILEFOLDER_MASK_ALL = 0xff,
91  EFILEFOLDER_MASK_ONCLICK = EFILEFOLDER_TYPE_ALWAYS
92  | EFILEFOLDER_TYPE_ONCLICK,
93  EFILEFOLDER_MASK_ONBROWSE = EFILEFOLDER_TYPE_ALWAYS
94  | EFILEFOLDER_TYPE_ONCLICK
95  | EFILEFOLDER_TYPE_ONBROWSE,
96 };
97 
102 class CFileItem :
103  public CGUIListItem, public IArchivable, public ISerializable, public ISortable
104 {
105 public:
106  CFileItem(void);
107  CFileItem(const CFileItem& item);
108  explicit CFileItem(const CGUIListItem& item);
109  explicit CFileItem(const std::string& strLabel);
110  explicit CFileItem(const char* strLabel);
111  CFileItem(const CURL& path, bool bIsFolder);
112  CFileItem(const std::string& strPath, bool bIsFolder);
113  explicit CFileItem(const CSong& song);
114  CFileItem(const CSong& song, const MUSIC_INFO::CMusicInfoTag& music);
115  CFileItem(const CURL &path, const CAlbum& album);
116  CFileItem(const std::string &path, const CAlbum& album);
117  explicit CFileItem(const CArtist& artist);
118  explicit CFileItem(const CGenre& genre);
119  explicit CFileItem(const MUSIC_INFO::CMusicInfoTag& music);
120  explicit CFileItem(const CVideoInfoTag& movie);
121  explicit CFileItem(const std::shared_ptr<PVR::CPVREpgInfoTag>& tag);
122  explicit CFileItem(const std::shared_ptr<PVR::CPVREpgSearchFilter>& filter);
123  explicit CFileItem(const std::shared_ptr<PVR::CPVRChannelGroupMember>& channelGroupMember);
124  explicit CFileItem(const std::shared_ptr<PVR::CPVRRecording>& record);
125  explicit CFileItem(const std::shared_ptr<PVR::CPVRTimerInfoTag>& timer);
126  explicit CFileItem(const CMediaSource& share);
127  explicit CFileItem(std::shared_ptr<const ADDON::IAddon> addonInfo);
128  explicit CFileItem(const EventPtr& eventLogEntry);
129 
130  ~CFileItem(void) override;
131  CGUIListItem* Clone() const override { return new CFileItem(*this); }
132 
133  const CURL GetURL() const;
134  void SetURL(const CURL& url);
135  bool IsURL(const CURL& url) const;
136  const std::string& GetPath() const { return m_strPath; }
137  void SetPath(const std::string& path) { m_strPath = path; }
138  bool IsPath(const std::string& path, bool ignoreURLOptions = false) const;
139 
140  const CURL GetDynURL() const;
141  void SetDynURL(const CURL& url);
142  const std::string &GetDynPath() const;
143  void SetDynPath(const std::string &path);
144 
149  void Reset();
150  CFileItem& operator=(const CFileItem& item);
151  void Archive(CArchive& ar) override;
152  void Serialize(CVariant& value) const override;
153  void ToSortable(SortItem &sortable, Field field) const override;
154  void ToSortable(SortItem &sortable, const Fields &fields) const;
155  bool IsFileItem() const override { return true; }
156 
157  bool Exists(bool bUseCache = true) const;
158 
164  bool IsPicture() const;
165  bool IsLyrics() const;
166 
172  bool IsAudio() const;
173 
178  bool IsDeleted() const;
179 
184  bool IsAudioBook() const;
185 
186  bool IsGame() const;
187  bool IsCUESheet() const;
188  bool IsInternetStream(const bool bStrictCheck = false) const;
189  bool IsStreamedFilesystem() const;
190  bool IsPlayList() const;
191  bool IsSmartPlayList() const;
192  bool IsLibraryFolder() const;
193  bool IsPythonScript() const;
194  bool IsPlugin() const;
195  bool IsScript() const;
196  bool IsAddonsPath() const;
197  bool IsSourcesPath() const;
198  bool IsNFO() const;
199  bool IsDiscImage() const;
200  bool IsOpticalMediaFile() const;
201  bool IsBluray() const;
202  bool IsRAR() const;
203  bool IsAPK() const;
204  bool IsZIP() const;
205  bool IsCBZ() const;
206  bool IsCBR() const;
207  bool IsISO9660() const;
208  bool IsCDDA() const;
209  bool IsDVD() const;
210  bool IsOnDVD() const;
211  bool IsOnLAN() const;
212  bool IsHD() const;
213  bool IsNfs() const;
214  bool IsRemote() const;
215  bool IsSmb() const;
216  bool IsURL() const;
217  bool IsStack() const;
218  bool IsFavourite() const;
219  bool IsMultiPath() const;
220  bool IsMusicDb() const;
221  bool IsEPG() const;
222  bool IsPVRChannel() const;
223  bool IsPVRChannelGroup() const;
224  bool IsPVRRecording() const;
225  bool IsUsablePVRRecording() const;
226  bool IsDeletedPVRRecording() const;
227  bool IsInProgressPVRRecording() const;
228  bool IsPVRTimer() const;
229  bool IsType(const char *ext) const;
230  bool IsVirtualDirectoryRoot() const;
231  bool IsReadOnly() const;
232  bool CanQueue() const;
233  void SetCanQueue(bool bYesNo);
234  bool IsParentFolder() const;
235  bool IsFileFolder(EFileFolderType types = EFILEFOLDER_MASK_ALL) const;
236  bool IsRemovable() const;
237  bool IsPVR() const;
238  bool IsLiveTV() const;
239  bool IsRSS() const;
240  bool IsAndroidApp() const;
241 
242  bool HasVideoVersions() const;
243  bool HasVideoExtras() const;
244 
245  void RemoveExtension();
246  void CleanString();
247  void FillInDefaultIcon();
248  void SetFileSizeLabel();
249  void SetLabel(const std::string &strLabel) override;
250  VideoDbContentType GetVideoContentType() const;
251  bool IsLabelPreformatted() const { return m_bLabelPreformatted; }
252  void SetLabelPreformatted(bool bYesNo) { m_bLabelPreformatted=bYesNo; }
253  bool SortsOnTop() const { return m_specialSort == SortSpecialOnTop; }
254  bool SortsOnBottom() const { return m_specialSort == SortSpecialOnBottom; }
255  void SetSpecialSort(SortSpecial sort) { m_specialSort = sort; }
256 
257  inline bool HasMusicInfoTag() const
258  {
259  return m_musicInfoTag != NULL;
260  }
261 
262  MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag();
263 
264  inline const MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag() const
265  {
266  return m_musicInfoTag;
267  }
268 
269  bool HasVideoInfoTag() const;
270 
271  CVideoInfoTag* GetVideoInfoTag();
272 
273  const CVideoInfoTag* GetVideoInfoTag() const;
274 
275  inline bool HasEPGInfoTag() const
276  {
277  return m_epgInfoTag.get() != NULL;
278  }
279 
280  inline const std::shared_ptr<PVR::CPVREpgInfoTag> GetEPGInfoTag() const
281  {
282  return m_epgInfoTag;
283  }
284 
285  bool HasEPGSearchFilter() const { return m_epgSearchFilter != nullptr; }
286 
287  const std::shared_ptr<PVR::CPVREpgSearchFilter> GetEPGSearchFilter() const
288  {
289  return m_epgSearchFilter;
290  }
291 
292  inline bool HasPVRChannelGroupMemberInfoTag() const
293  {
294  return m_pvrChannelGroupMemberInfoTag.get() != nullptr;
295  }
296 
297  inline const std::shared_ptr<PVR::CPVRChannelGroupMember> GetPVRChannelGroupMemberInfoTag() const
298  {
299  return m_pvrChannelGroupMemberInfoTag;
300  }
301 
302  bool HasPVRChannelInfoTag() const;
303  const std::shared_ptr<PVR::CPVRChannel> GetPVRChannelInfoTag() const;
304 
305  inline bool HasPVRRecordingInfoTag() const
306  {
307  return m_pvrRecordingInfoTag.get() != NULL;
308  }
309 
310  inline const std::shared_ptr<PVR::CPVRRecording> GetPVRRecordingInfoTag() const
311  {
312  return m_pvrRecordingInfoTag;
313  }
314 
315  inline bool HasPVRTimerInfoTag() const
316  {
317  return m_pvrTimerInfoTag != NULL;
318  }
319 
320  inline const std::shared_ptr<PVR::CPVRTimerInfoTag> GetPVRTimerInfoTag() const
321  {
322  return m_pvrTimerInfoTag;
323  }
324 
329  CFileItem GetItemToPlay() const;
330 
335  bool IsResumePointSet() const;
336 
341  double GetCurrentResumeTime() const;
342 
349  bool GetCurrentResumeTimeAndPartNumber(int64_t& startOffset, int& partNumber) const;
350 
357  bool IsResumable() const;
358 
364  int64_t GetStartOffset() const { return m_lStartOffset; }
365 
371  void SetStartOffset(const int64_t offset) { m_lStartOffset = offset; }
372 
377  int64_t GetEndOffset() const { return m_lEndOffset; }
378 
383  void SetEndOffset(const int64_t offset) { m_lEndOffset = offset; }
384 
385  inline bool HasPictureInfoTag() const
386  {
387  return m_pictureInfoTag != NULL;
388  }
389 
390  inline const CPictureInfoTag* GetPictureInfoTag() const
391  {
392  return m_pictureInfoTag;
393  }
394 
395  bool HasAddonInfo() const { return m_addonInfo != nullptr; }
396  const std::shared_ptr<const ADDON::IAddon> GetAddonInfo() const { return m_addonInfo; }
397 
398  inline bool HasGameInfoTag() const
399  {
400  return m_gameInfoTag != NULL;
401  }
402 
403  KODI::GAME::CGameInfoTag* GetGameInfoTag();
404 
405  inline const KODI::GAME::CGameInfoTag* GetGameInfoTag() const
406  {
407  return m_gameInfoTag;
408  }
409 
410  CPictureInfoTag* GetPictureInfoTag();
411 
417  std::string GetLocalFanart() const;
418 
426  std::string GetLocalArtBaseFilename() const;
434  std::string GetLocalArtBaseFilename(bool& useFolder) const;
435 
443  std::string GetLocalArt(const std::string& artFile, bool useFolder = false) const;
444 
452  std::string FindLocalArt(const std::string &artFile, bool useFolder) const;
453 
458  bool SkipLocalArt() const;
459 
465  std::string GetThumbHideIfUnwatched(const CFileItem* item) const;
466 
467  // Gets the .tbn file associated with this item
468  std::string GetTBNFile() const;
469  // Gets the folder image associated with this item (defaults to folder.jpg)
470  std::string GetFolderThumb(const std::string &folderJPG = "folder.jpg") const;
471  // Gets the correct movie title
472  std::string GetMovieName(bool bUseFolderNames = false) const;
473 
481  std::string GetBaseMoviePath(bool useFolderNames) const;
482 
483  // Gets the user thumb, if it exists
484  std::string GetUserMusicThumb(bool alwaysCheckRemote = false, bool fallbackToFolder = false) const;
485 
498  std::string GetLocalMetadataPath() const;
499 
500  // finds a matching local trailer file
501  std::string FindTrailer() const;
502 
503  bool LoadMusicTag();
504  bool LoadGameTag();
505 
511  bool LoadDetails();
512 
513  /* Returns the content type of this item if known */
514  const std::string& GetMimeType() const { return m_mimetype; }
515 
516  /* sets the mime-type if known beforehand */
517  void SetMimeType(const std::string& mimetype) { m_mimetype = mimetype; } ;
518 
524  void FillInMimeType(bool lookup = true);
525 
530  bool ContentLookup() { return m_doContentLookup; }
531 
536  void SetMimeTypeForInternetFile();
537 
542  void SetContentLookup(bool enable) { m_doContentLookup = enable; }
543 
544  /* general extra info about the contents of the item, not for display */
545  void SetExtraInfo(const std::string& info) { m_extrainfo = info; }
546  const std::string& GetExtraInfo() const { return m_extrainfo; }
547 
556  void UpdateInfo(const CFileItem &item, bool replaceLabels = true);
557 
564  void MergeInfo(const CFileItem &item);
565 
566  bool IsSamePath(const CFileItem *item) const;
567 
568  bool IsAlbum() const;
569 
574  void SetFromVideoInfoTag(const CVideoInfoTag &video);
575 
580  void SetFromMusicInfoTag(const MUSIC_INFO::CMusicInfoTag &music);
581 
587  void SetFromAlbum(const CAlbum &album);
593  void SetFromSong(const CSong &song);
594 
598  int64_t m_dwSize;
599  std::string m_strDVDLabel;
600  std::string m_strTitle;
601  int m_iprogramCount;
602  int m_idepth;
603  int m_lStartPartNumber;
604  LockType m_iLockMode;
605  std::string m_strLockCode;
606  int m_iHasLock; // 0 - no lock 1 - lock, but unlocked 2 - locked
607  int m_iBadPwdCount;
608 
609  void SetCueDocument(const CCueDocumentPtr& cuePtr);
610  void LoadEmbeddedCue();
611  bool HasCueDocument() const;
612  bool LoadTracksFromCueDocument(CFileItemList& scannedItems);
613 private:
618  void Initialize();
619 
624  void UpdateMimeType(bool lookup = true);
625 
630  CBookmark GetResumePoint() const;
631 
635  void FillMusicInfoTag(const std::shared_ptr<const PVR::CPVREpgInfoTag>& tag);
636 
637  std::string m_strPath;
638  std::string m_strDynPath;
639 
640  SortSpecial m_specialSort;
641  bool m_bIsParentFolder;
642  bool m_bCanQueue;
643  bool m_bLabelPreformatted;
644  std::string m_mimetype;
645  std::string m_extrainfo;
646  bool m_doContentLookup;
647  MUSIC_INFO::CMusicInfoTag* m_musicInfoTag;
648  CVideoInfoTag* m_videoInfoTag;
649  std::shared_ptr<PVR::CPVREpgInfoTag> m_epgInfoTag;
650  std::shared_ptr<PVR::CPVREpgSearchFilter> m_epgSearchFilter;
651  std::shared_ptr<PVR::CPVRRecording> m_pvrRecordingInfoTag;
652  std::shared_ptr<PVR::CPVRTimerInfoTag> m_pvrTimerInfoTag;
653  std::shared_ptr<PVR::CPVRChannelGroupMember> m_pvrChannelGroupMemberInfoTag;
654  CPictureInfoTag* m_pictureInfoTag;
655  std::shared_ptr<const ADDON::IAddon> m_addonInfo;
656  KODI::GAME::CGameInfoTag* m_gameInfoTag;
657  EventPtr m_eventLogEntry;
658  bool m_bIsAlbum;
659  int64_t m_lStartOffset;
660  int64_t m_lEndOffset;
661 
662  CCueDocumentPtr m_cueDocument;
663 };
664 
669 typedef std::shared_ptr<CFileItem> CFileItemPtr;
670 
675 typedef std::vector< CFileItemPtr > VECFILEITEMS;
676 
681 typedef std::vector< CFileItemPtr >::iterator IVECFILEITEMS;
682 
687 typedef std::map<std::string, CFileItemPtr > MAPFILEITEMS;
688 
693 typedef std::pair<std::string, CFileItemPtr > MAPFILEITEMSPAIR;
694 
695 typedef bool (*FILEITEMLISTCOMPARISONFUNC) (const CFileItemPtr &pItem1, const CFileItemPtr &pItem2);
696 typedef void (*FILEITEMFILLFUNC) (CFileItemPtr &item);
697 
702 class CFileItemList : public CFileItem
703 {
704 public:
705  enum CACHE_TYPE { CACHE_NEVER = 0, CACHE_IF_SLOW, CACHE_ALWAYS };
706 
707  CFileItemList();
708  explicit CFileItemList(const std::string& strPath);
709  ~CFileItemList() override;
710  void Archive(CArchive& ar) override;
711  CFileItemPtr operator[] (int iItem);
712  const CFileItemPtr operator[] (int iItem) const;
713  CFileItemPtr operator[] (const std::string& strPath);
714  const CFileItemPtr operator[] (const std::string& strPath) const;
715  void Clear();
716  void ClearItems();
717  void Add(CFileItemPtr item);
718  void Add(CFileItem&& item);
719  void AddFront(const CFileItemPtr &pItem, int itemPosition);
720  void Remove(CFileItem* pItem);
721  void Remove(int iItem);
722  CFileItemPtr Get(int iItem) const;
723  const VECFILEITEMS& GetList() const { return m_items; }
724  CFileItemPtr Get(const std::string& strPath) const;
725  int Size() const;
726  bool IsEmpty() const;
727  void Append(const CFileItemList& itemlist);
728  void Assign(const CFileItemList& itemlist, bool append = false);
729  bool Copy (const CFileItemList& item, bool copyItems = true);
730  void Reserve(size_t iCount);
731  void Sort(SortBy sortBy, SortOrder sortOrder, SortAttribute sortAttributes = SortAttributeNone);
732  /* \brief Sorts the items based on the given sorting options
733 
734  In contrast to Sort (see above) this does not change the internal
735  state by storing the sorting method and order used and therefore
736  will always execute the sorting even if the list of items has
737  already been sorted with the same options before.
738  */
739  void Sort(SortDescription sortDescription);
740  void Randomize();
741  void FillInDefaultIcons();
742  int GetFolderCount() const;
743  int GetFileCount() const;
744  int GetSelectedCount() const;
745  int GetObjectCount() const;
746  void FilterCueItems();
747  void RemoveExtensions();
748  void SetIgnoreURLOptions(bool ignoreURLOptions);
749  void SetFastLookup(bool fastLookup);
750  bool Contains(const std::string& fileName) const;
751  bool GetFastLookup() const { return m_fastLookup; }
752 
758  void Stack(bool stackFiles = true);
759 
760  SortOrder GetSortOrder() const { return m_sortDescription.sortOrder; }
761  SortBy GetSortMethod() const { return m_sortDescription.sortBy; }
762  void SetSortOrder(SortOrder sortOrder) { m_sortDescription.sortOrder = sortOrder; }
763  void SetSortMethod(SortBy sortBy) { m_sortDescription.sortBy = sortBy; }
764 
775  bool Load(int windowID = 0);
776 
787  bool Save(int windowID = 0);
788  void SetCacheToDisc(CACHE_TYPE cacheToDisc) { m_cacheToDisc = cacheToDisc; }
789  bool CacheToDiscAlways() const { return m_cacheToDisc == CACHE_ALWAYS; }
790  bool CacheToDiscIfSlow() const { return m_cacheToDisc == CACHE_IF_SLOW; }
800  void RemoveDiscCache(int windowID = 0) const;
801  void RemoveDiscCache(const std::string& cachefile) const;
802  void RemoveDiscCacheCRC(const std::string& crc) const;
803  bool AlwaysCache() const;
804 
805  void Swap(unsigned int item1, unsigned int item2);
806 
811  bool UpdateItem(const CFileItem *item);
812 
813  void AddSortMethod(SortBy sortBy, int buttonLabel, const LABEL_MASKS &labelMasks, SortAttribute sortAttributes = SortAttributeNone);
814  void AddSortMethod(SortBy sortBy, SortAttribute sortAttributes, int buttonLabel, const LABEL_MASKS &labelMasks);
815  void AddSortMethod(SortDescription sortDescription, int buttonLabel, const LABEL_MASKS &labelMasks);
816  bool HasSortDetails() const { return m_sortDetails.size() != 0; }
817  const std::vector<GUIViewSortDetails> &GetSortDetails() const { return m_sortDetails; }
818 
825  void SetSortIgnoreFolders(bool sort) { m_sortIgnoreFolders = sort; }
826  bool GetReplaceListing() const { return m_replaceListing; }
827  void SetReplaceListing(bool replace);
828  void SetContent(const std::string& content) { m_content = content; }
829  const std::string& GetContent() const { return m_content; }
830 
831  void ClearSortState();
832 
833  VECFILEITEMS::iterator begin() { return m_items.begin(); }
834  VECFILEITEMS::iterator end() { return m_items.end(); }
835  VECFILEITEMS::iterator erase(VECFILEITEMS::iterator first, VECFILEITEMS::iterator last);
836  VECFILEITEMS::const_iterator begin() const { return m_items.begin(); }
837  VECFILEITEMS::const_iterator end() const { return m_items.end(); }
838  VECFILEITEMS::const_iterator cbegin() const { return m_items.cbegin(); }
839  VECFILEITEMS::const_iterator cend() const { return m_items.cend(); }
840  std::reverse_iterator<VECFILEITEMS::const_iterator> rbegin() const { return m_items.rbegin(); }
841  std::reverse_iterator<VECFILEITEMS::const_iterator> rend() const { return m_items.rend(); }
842 
843 private:
844  void Sort(FILEITEMLISTCOMPARISONFUNC func);
845  void FillSortFields(FILEITEMFILLFUNC func);
846  std::string GetDiscFileCache(int windowID) const;
847 
852  void StackFiles();
853 
858  void StackFolders();
859 
860  VECFILEITEMS m_items;
861  MAPFILEITEMS m_map;
862  bool m_ignoreURLOptions = false;
863  bool m_fastLookup = false;
864  SortDescription m_sortDescription;
865  bool m_sortIgnoreFolders = false;
866  CACHE_TYPE m_cacheToDisc = CACHE_IF_SLOW;
867  bool m_replaceListing = false;
868  std::string m_content;
869 
870  std::vector<GUIViewSortDetails> m_sortDetails;
871 
872  mutable CCriticalSection m_lock;
873 };
CDateTime m_dateTime
file creation date & time
Definition: FileItem.h:597
Definition: GUIListItem.h:29
int64_t m_dwSize
file size (0 for folders)
Definition: FileItem.h:598
std::shared_ptr< CFileItem > CFileItemPtr
A shared pointer to CFileItem.
Definition: FileItem.h:669
Definition: ContextMenuManager.h:24
std::vector< CFileItemPtr >::iterator IVECFILEITEMS
Iterator for VECFILEITEMS.
Definition: FileItem.h:681
Represents a list of files.
Definition: FileItem.h:702
Definition: URL.h:21
int64_t GetStartOffset() const
Get the offset where start the playback.
Definition: FileItem.h:364
Definition: Bookmark.h:14
void SetSortIgnoreFolders(bool sort)
Specify whether this list should be sorted with folders separate from files By default we sort with f...
Definition: FileItem.h:825
void SetStartOffset(const int64_t offset)
Set the offset where start the playback.
Definition: FileItem.h:371
Definition: GameInfoTag.h:24
Represents a share.
Definition: MediaSource.h:22
Definition: LabelFormatter.h:21
Definition: Variant.h:31
int64_t GetEndOffset() const
Get the end offset.
Definition: FileItem.h:377
Definition: IEvent.h:26
Definition: ISerializable.h:13
Definition: AudioDecoder.h:18
Definition: CueDocument.h:20
Definition: Archive.h:29
Class to store and read album information from CMusicDatabase.
Definition: Song.h:34
int m_iDriveType
If m_bIsShareOrDrive is true, use to get the share type. Types see: CMediaSource::m_iDriveType.
Definition: FileItem.h:596
DateTime class, which uses FileTime as it&#39;s base.
Definition: XBDateTime.h:63
Definition: ISortable.h:15
bool ContentLookup()
Some sources do not support HTTP HEAD request to determine i.e. mime type.
Definition: FileItem.h:530
Definition: Album.h:26
SortBy
Definition: SortUtils.h:49
std::map< std::string, CFileItemPtr > MAPFILEITEMS
A map of pointers to CFileItem.
Definition: FileItem.h:687
std::vector< CFileItemPtr > VECFILEITEMS
A vector of pointer to CFileItem.
Definition: FileItem.h:675
void SetContentLookup(bool enable)
Lookup via HTTP HEAD request might not be needed, use this setter to disable ContentLookup.
Definition: FileItem.h:542
bool m_bIsShareOrDrive
is this a root share/drive
Definition: FileItem.h:595
Definition: Addon.cpp:39
Definition: PictureInfoTag.h:30
Definition: SortUtils.h:176
std::pair< std::string, CFileItemPtr > MAPFILEITEMSPAIR
Pair for MAPFILEITEMS.
Definition: FileItem.h:693
Definition: VideoInfoTag.h:53
Definition: Artist.h:40
Definition: MusicInfoTag.h:27
Definition: IArchivable.h:13
Class to store and read song information from CMusicDatabase.
Definition: Song.h:48
Represents a file on a share.
Definition: FileItem.h:102
void SetEndOffset(const int64_t offset)
Set the end offset.
Definition: FileItem.h:383
Definition: Application.h:77