OSDN Git Service

libktorrent: build fix
authorIvailo Monev <xakepa10@gmail.com>
Sun, 24 Jan 2021 13:33:19 +0000 (15:33 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Sun, 24 Jan 2021 13:33:19 +0000 (15:33 +0200)
upstream commit:
https://github.com/KDE/libktorrent/commit/4790ad38b6b8b0d9e8e0b3d9535ae652a9cd1f51

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
libktorrent/src/diskio/chunkmanager.cpp
libktorrent/src/util/constants.h

index b418e8f..5058c02 100644 (file)
@@ -514,21 +514,17 @@ namespace bt
                                switch(buf[i+1])
                                {
                                case FIRST_PRIORITY:
-                               case 3:
                                        tf.setPriority(FIRST_PRIORITY);
                                        break;
                                case NORMAL_PRIORITY:
-                               case 2:
                                        // By default priority is set to normal, so do nothing
                                        //tf.setPriority(NORMAL_PRIORITY);
                                        break;
                                case EXCLUDED:
-                               case 0:
                                        //tf.setDoNotDownload(true);
                                        tf.setPriority(EXCLUDED);
                                        break;
                                case ONLY_SEED_PRIORITY:
-                               case -1:
                                        tf.setPriority(ONLY_SEED_PRIORITY);
                                        break;
                                default:
index 7a76531..3db89c5 100644 (file)
@@ -38,14 +38,6 @@ namespace bt
        
        typedef enum 
        {
-               /* These are the old values, for compatibility reasons with old chunk_info files we leave them here :
-               PREVIEW_PRIORITY = 4,
-               FIRST_PRIORITY = 3,
-               NORMAL_PRIORITY = 2,
-               LAST_PRIORITY = 1,
-               EXCLUDED = 0,
-               ONLY_SEED_PRIORITY = -1
-               */
                // make sure new values are different from old values
                // also leave some room if we want to add new priorities in the future
                PREVIEW_PRIORITY = 60,